#C8111. Taco Ball Arrangements

    ID: 52058 Type: Default 1000ms 256MiB

Taco Ball Arrangements

Taco Ball Arrangements

You are given two integers N and K representing the number of distinguishable bins and the number of indistinguishable balls respectively. The task is to compute the number of ways to place the K balls into the N bins such that no bin contains more than one ball. Note that if K equals 0 or K is greater than N, the answer is defined to be 0. Otherwise, the answer is given by the binomial coefficient \(\binom{N}{K}\), which counts the number of ways to choose K bins from N bins.

Formula: \[\text{Answer} = \begin{cases} 0, & \text{if } K=0 \text{ or } K>N,\\ \binom{N}{K}, & \text{otherwise}. \end{cases}\]

inputFormat

The input is provided via stdin as two space-separated integers, N and K, where:

  • N (1 ≤ N ≤ 10^5) is the number of bins.
  • K (0 ≤ K ≤ 10^5) is the number of balls.

outputFormat

Output a single integer to stdout which is the number of valid arrangements according to the rules described above.

## sample
3 2
3

</p>