BETA

Difficulty Level: Medium

Submissions: 15510 Accuracy:

19.83%

nCr
       

Find nCr for given n and r.

Input:
First line contains no of test cases T, for every test case 2 integers as inputs (n,r).


Output:
Compute and print the value in seperate line. Modulus your output to 109+7. If n


Constraints:
1<=T<=50
1<=n<=1000
1<=r<=800


Example:
Input:
1
3 2

Output:
3

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.