Write a program to calculate nPr. nPr represents n permutation r and value of nPr is (n!) / (n-r)!.
The first line of the input contains T denoting the number of testcases. T testcases follow. First line of the test case will be the value of n and r respectively.
For each test case, in a new line, output will be the value of nPr.
1 <= T <= 100
1 <= n,r <= 20
n >= r
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.