BETA
This is a school problem. Successful submissions of this are not counted in user ratings.

Submissions : 1475 Accuracy :

31.93

nPr
     

Write a program to calculate nPr. nPr represents n permutation r and value of nPr is (n!) / (n-r)!.

Input: The first line of the input contains T denoting the number of testcases. First line of the test case will be the value of n and r respectively.
Output: For each test case output will be the value of nPr.
Constraints:
1<=T<=100
1 <=n,r<= 20
n>=r


Example:

Input:

2
2 1
10 4

Output:

2
5040

 

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



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