The summer is at its peak in Chefland. Chef is planning to purchase a water cooler to keep his room cool. He has two options available:
- Rent a cooler at the cost of
- coins.
Chef wonders what is the maximum number of months for which he can rent the cooler such that the cost of renting is strictly less than the cost of purchasing it.
Input Format
- The first line of input will contain an integer
- , as described in the problem statement.
Output Format
For each test case, output the maximum number of months for which he can rent the cooler such that the cost of renting is strictly less than the cost of purchasing it.
If Chef should not rent a cooler at all, output
.
Constraints
Sample Input 1
2
5 12
5 5
Sample Output 1
2
0
Explanation
Test case
: Cost of renting the cooler coins per month. Cost of purchasing the cooler coins. So, Chef can rent the cooler for months at the cost of coins, which is strictly less thancoins.
Test case
: Cost of renting the cooler coins per month. Cost of purchasing the cooler coins. If Chef rents the cooler for month, it will cost coins, which is not strictly less than the cost of purchasing it. So, Chef should not rent the cooler.
No comments:
Post a Comment