Marks Distribution#1524

Marks Distribution

1 second
64 megabytes
Very easy

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.

Input

The first line contains the number of test cases. Each test case consists of one line containing three integers , , and , each not exceeding .

Output

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.

Examples

Example 1

Loading
Loading