Combination
InterviewTime limit2sMemory limit128 MB
Given n and m within 100, compute the exact value of the binomial coefficient C(n, m).
- Level
Easy3 of 10
- Topics
- Math, Combinatorics, Dynamic programming
- Solved
- No attempts yet
Problem
Given n and m, compute the combination count C(n, m) exactly and print it.
Input
The first line contains two integers n and m, separated by a space.
5 ≤ n ≤ 1005 ≤ m ≤ 100m ≤ n
Output
Print the combination count C(n, m) as an integer.