Chef has
empty bottles where each bottle has a capacity of litres.
There is a water tank in Chefland having litres of water. Chef wants to fill the empty bottles using the water in the tank.
Assuming that Chef does not spill any water while filling the bottles, find out the maximum number of bottles Chef can fill completely.
Input Format
- First line will contain , number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, three integers and .
Output Format
For each test case, output in a single line answer, the maximum number of bottles Chef can fill completely.
Constraints
Sample Input 1
3
5 2 8
10 5 4
3 1 4
Sample Output 1
4
0
3
Explanation
Test Case : The amount of water in the tank is litres. The capacity of each bottle is litres. Hence, water bottles can be filled completely.
Test Case : The amount of water in the tank is litres. The capacity of each bottle is litres. Hence, no water bottle can be filled completely.
Test Case : The amount of water in the tank is litres. The capacity of each bottle is litre. Chef has bottles available. He can fill all these bottles completely using litres of water.
No comments:
Post a Comment