#SDNU1311. Binomial Coeffcients
Binomial Coeffcients
Description
The binomial coefficient is the number of ways of picking unordered outcomes from possibilities, also known as a combination or combinatorial number.
Give and , you are required to calculate mod 10000003.
Format
Input
The input contains several test cases. The first line of the input contains one positive integer, , denoting the number of test cases.
Each of the following lines contains two integers, and , denoting that you are required to calculate mod 10000003.
Output
For each test case, output one line containing mod 10000003.
Samples
3
1 1
10 2
954 723
1
45
3557658