#C2884. Maximum Chocolates
Maximum Chocolates
Maximum Chocolates
In this problem, you are given multiple test cases. For each test case, you have three integers C, D, and S. Anita wants to buy as many chocolates as possible without dipping into her emergency savings. Formally, if the price of one chocolate is C, the total money she has is D, and she must save S dollars, then the maximum number of chocolates she can buy is given by ( \left\lfloor \frac{D - S}{C} \right\rfloor ) when (D \geq S); otherwise, she cannot buy any (result is 0).
For instance, if C = 10, D = 100, and S = 20, then Anita can buy (\lfloor (100-20)/10 \rfloor = 8) chocolates.
inputFormat
The first line of input contains an integer (T), the number of test cases. Each of the next (T) lines contains three space-separated integers: (C) (the cost per chocolate), (D) (the total money available), and (S) (the amount that must be saved).
outputFormat
For each test case, output a single integer on a new line representing the maximum number of chocolates that can be bought.## sample
3
10 100 20
5 50 10
2 30 5
8
8
12
</p>