In an examination period, a student took subjects and received a total of marks. The minimum passing mark for each subject is . Your task is to calculate the number of ways the student could have obtained the marks in the exams. For example, if n = 3, t = 34, and p = 10, then the marks in the three subjects could be distributed as follows:
So, the student can pass in different ways.
The first line contains the number of test cases. Each test case consists of one line containing three integers , , and , each not exceeding .
For each test case, print the number of ways the student could have obtained the marks in the exams on a separate line. The answer will always fit in a signed -bit integer.
Example 1