Update appNew update is available. Click here to update.

Choose Students

Posted: 3 Jan, 2021
Difficulty: Moderate

PROBLEM STATEMENT

Try Problem

You are the teacher of a class and you have N students in the class. You are asked to choose R students from your class for a competition. All your students are equally competent. Find the number of ways you can choose R students from a class of N students.

Note : Number of ways of choosing 0 students from N students is 1.

Input format:

The first line of input contains an integer ‘T’ denoting the number of test cases.

Then the T test cases follow.

The first line of each test case contains two space separated integers ‘N’ and ‘R’ denoting the total number of students in the class and number of students to choose respectively.

Output format:

For each test case, the number of ways to choose R students out of N is printed.
The output of each test case is printed in a separate line. 
Constraints :
1 <= T <= 10
1 <= N <= 200
0 <= R <= N
where ‘T’ is the number of test cases, ‘N’ is the total number of students in the class and ‘R’ is the number of students to choose.