[BOJ 11051] 이항 계수 2

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 256M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

자연수 (N)과 정수 (K)가 주어졌을 때 이항 계수 (\binom{N}{K})를 10,007로 나눈 나머지를 구하는 프로그램을 작성하시오.

입력 형식

첫째 줄에 (N)과 (K)가 주어진다. (1 ≤ (N) ≤ 1,000, 0 ≤ (K) ≤ (N))

출력 형식

 (\binom{N}{K})를 10,007로 나눈 나머지를 출력한다.

예제 입력

5 2

예제 출력

10

Comments

There are no comments at the moment.