LogiQuest

139. Combinations nCr

EasyCombinatorics

Print C(n, r) exactly.

Input format

A single line: n r

Output format

C(n, r)

Example 1

Input

5 2

Output

10

Example 2

Input

10 0

Output

1

Constraints

0 ≤ r ≤ n ≤ 100

Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.

Loading the MyLoginn IDE…