Question
Magical World
Alice has two coloured shapes:
- A red rectangle with length A units, and width B units.
- A blue square with an edge length of X units.
Alice lives in a magical world where the dimensions of red shapes can be changed.
Each change in dimension costs 1 unit of money, using which you can change any single dimension of a red object to any positive integer.
Alice wants to make the area of the blue square greater than or equal to the area of the red rectangle.
Find the minimum cost needed to make this possible.
Input
The first line of input will contain a single integer T, denoting the number of test cases.
The first and only line of each test case will contain three space-separated integers A, B, and X - the length of the red rectangle, the width of the red rectangle, and the length of the edge of the blue square.
Constraints
1 ≤ T ≤ 103
1 ≤ A, B, X ≤ 10
The first and only line of each test case will contain three space-separated integers A, B, and X - the length of the red rectangle, the width of the red rectangle, and the length of the edge of the blue square.
Constraints
1 ≤ T ≤ 103
1 ≤ A, B, X ≤ 10
Output
For each test case, output on a new line the minimum cost required to make the area of the blue square greater than or equal to the area of the red rectangle.
Example
Sample Input
3
2 3 2
4 3 4
8 8 2
Sample Output
1
0
2
Explanation
Test case 1: If Alice changes the width of the red rectangle (the value B) to 2, the rectangle will have an area of 2 x 2 = 4, while the square will have an area of 22 = 4. They are equal, which Alice is fine with.
Test case 2: The square's area is 42 = 16, while the rectangle's is 4 x 3 = 12, Since 16 ≥ 12 already, no change of dimension is needed.
3
2 3 2
4 3 4
8 8 2
Sample Output
1
0
2
Explanation
Test case 1: If Alice changes the width of the red rectangle (the value B) to 2, the rectangle will have an area of 2 x 2 = 4, while the square will have an area of 22 = 4. They are equal, which Alice is fine with.
Test case 2: The square's area is 42 = 16, while the rectangle's is 4 x 3 = 12, Since 16 ≥ 12 already, no change of dimension is needed.