Binomial Coefficient 2
InterviewTime limit1sMemory limit256 MB
Compute the binomial coefficient C(N, K) modulo 10007 for N up to 1000.
- Level
Easy3 of 10
- Topics
- Dynamic programming, Combinatorics
- Solved
- No attempts yet
Problem
Given a natural number and an integer , write a program that computes the binomial coefficient modulo 10,007.
Input
The first line contains and , separated by a space. (, )
Output
Print modulo 10,007 on the first line.