Points:10
The Indian Heights School believes that learning with the aid of technology is the fastest way to do so. It is a pioneer in innovation and virtual classrooms in the country. Keeping in accordance with its practices, the school wants to integrate software and automate various functions at the classroom level. 
As college students, your team volunteered for this assignment and your proposal has been accepted by the school's director. Each day the class teacher picks a random number of students to delegate them duties for the day such as wiping the board, managing the class, maintaining the display boards and so on. But sometimes the students complain about being picked more frequently than the others.  Thus the teacher wants to know the number of ways to pick a certain number of students out of the total class. Your job is to help her do so...



Input:

The first line consists of total no of test cases. 
Each test case consists of one line containing two integers(space separated) a ≥ 1(i.e. total students) and 0 ≤ b ≤ a (i.e. number of students to be picked).


Output:

For each test case, print one line containing the required number. This number will always fit into an integer, i.e. it will be less than 2^31.



Example:
Input:

2
5 3
10 5



Output:

10
252
import sys

t=int(sys.stdin.readline())

for _ in range(0,t):
    s=sys.stdin.readline().split()
    n,r=int(s[0]),int(s[1])
    x=1
    if r>(n//2):
        r=n-r
    for i in range(1,r+1):
        x=n*x
        n-=1
        x=x//i
        
    print(x)