#C6823. Counting Valid Teams

    ID: 50626 Type: Default 1000ms 256MiB

Counting Valid Teams

Counting Valid Teams

Given a total of N participants, your task is to determine the number of ways to select a team of K participants. This is a typical combination problem where the answer is given by the binomial coefficient:

\( \binom{N}{K} = \frac{N!}{K!(N-K)!} \)

If \( K > N \), then it is not possible to form a valid team and the answer should be 0.

inputFormat

The input is given via standard input (stdin) as two space-separated integers: N and K, where N is the total number of participants, and K is the number of participants to choose.

outputFormat

Output a single integer to standard output (stdout) representing the number of ways to choose K participants from N participants, computed as \( \binom{N}{K} \).

## sample
5 3
10