746. Lockdown in Mirzapur

0

Easy

The nationwide lockdown due to COVID-19 has also affected Mirzapur. Guddu Bhaiya and Bablu Bhaiya are adhering to the lockdown rules and practicing social distancing. However, they are getting bored at home and have come up with a list of activities to keep themselves occupied, such as counting kattas and planning barfi transport routes. They want to know how many ways they can choose a specific number of activities to do each day.

Input Format

The first line of the input contains an integer T, which represents the number of test cases. Each subsequent line contains two integers N and R, representing the total number of activities and the number of activities they can choose to do on a given day, respectively.

Output Format

For each test case, output a single integer.

Example

Input

2
8 1
9 7

Output

8
36

Constraints

1 <= T <= 100

1 <= R <= N <= 20

1 <= R <= N <= 20

Loading...

View Submissions

Console