A geyser has a capacity of
litres of water and a bucket has a capacity of litres of water.
One person requires exactly buckets of water to take a bath. Find the maximum number of people that can take bath using water from one completely filled geyser..
Input Format
- First line will contain , number of test cases. Then the test cases follow.
- Each test case contains a single line of input, two integers .
Output Format
For each test case, output the maximum number of people that can take bath.
Constraints
Sample Input 1
4
10 6
25 1
100 10
30 40
Sample Output 1
0
12
5
0
Explanation
Test Case : One bucket has a capacity of litres. This means that one person requires litres of water to take a bath. Since this is less than the total water present in geyser, people can take bath.
Test Case : One bucket has a capacity of litre. This means that one person requires litres of water to take a bath. The total amount of water present in geyser is litres. Thus, people can take bath. Note that litre water would remain unused in the geyser.
Test Case : One bucket has a capacity of litres. This means that one person requires litres of water to take a bath. The total amount of water present in geyser is litres. Thus, people can take bath. Note that litres of water would remain unused in the geyser after this.
No comments:
Post a Comment