“ It’s not who you are underneath, It’s what you do that defines you “ . Cibin has kept this a secret for a long time, he is one of the Avengers. He needs to help the Avengers to save the world from a new evil. But as always, even if the world is at a threat, attendance is the most important thing for students.
All Cibin needs to do, is to keep his attendance greater than or equal to 75%.
There are a total of N lectures. Cibin has attended P lectures till now, and has bunked A lectures till now. As Cibin also needs to save the world, find out the minimum number of more lectures he needs to attend so that his attendance will be greater than or equal to 75%.
The first line of the input consists of a single integer T, denoting the number of Test Cases.
Each test case consists of one single line.
Each of these single lines consists of 3 space separated integers N, P and A.
For each test case, output one single line.
Each line should contain the answer to the corresponding test case, the minimum number of more lectures he needs to attend so that his attendance will be greater than or equal to 75%.
If there is a chance that even after attending all the remaining lectures, his attendance remains less than 75%, print -1 instead.
1 <= T <= 50
0 <= A, P <= N <= 1000
20 10 3
5 1 0
20 5 12
Test Case 1:
Cibin can attend 5 lectures out of 7 remaining lectures, which makes his attendance 15/20 = 75%.
Test Case 3:
Even if Cibin attends the remaining 3 lectures, his attendance remains 8/20 = 40%.
As it is less than 75%, answer is -1.