#C5497. Spice Mixture Combinations

    ID: 49152 Type: Default 1000ms 256MiB

Spice Mixture Combinations

Spice Mixture Combinations

Valeria is an avid cook who likes experimenting with different spice blends. With a total of \(q\) available spices, she wants to choose exactly \(p\) spices to create her unique recipe. The problem asks you to determine the number of different ways she can choose these spices. This corresponds to computing the binomial coefficient given by \(C(q, p) = \frac{q!}{p!(q-p)!}\). For instance, if \(p = 2\) and \(q = 4\), then there are \(6\) possible combinations.

inputFormat

The input is given via standard input (stdin) and consists of two integers \(p\) and \(q\) separated by a space. Here, \(p\) is the number of spices to choose, and \(q\) is the total number of available spices.

outputFormat

Output a single integer to standard output (stdout), representing the number of ways to choose \(p\) spices out of \(q\) available spices. This number is computed using the binomial coefficient \(C(q, p)\).

## sample
2 4
6