We want to distribute 'n' indistinguishable one Rupees coins among 'k' pupils, such that each of them receives at least one Rupees.
We have to count the number of ways, we can distribute the amount under the given condition? Note:
Two distributions are said to be different if they have at least one pupil who got a different amount of rupees.
Since, the answer can be very large, Output it modulo 1000000007
The first line contains an Integer 't' denoting the number of test cases.
Each of the next t lines contains two Integers - n and k.
Print the total number of different such distributions Modulo 1000000007 for each test case on a new line
1 ≤ n,k ≤ 1000000
1 ≤ t ≤ 1000
We can give These amounts to its pupils.
so,In Total 15 ways.
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.