Given the value , and . Find the number of non-negative integer pairs which satisfies the following inequality.
First line contains an integer denoting the number of test cases.
Each test case contains three integers , and .
Subtask (10 Points): ,
Subtask (30 Points): ,
Subtask (60 Points): ,
For all subtasks .
For each test print the answer in a single line.
Input | Output |
---|---|
2 5 2 3 10 4 1 | 5 21 |
The first inequality is . The following pairs of satisfies it. . |