The Cooler Dilemma 2 Codechef Solution
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 XX coins per month.
- Purchase a cooler for YY 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.
- The first line of input will contain an integer TT — the number of test cases. The description of TT test cases follows.
- The first and only line of each test case contains two integers XX and YY, as described in the problem statement.
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 00.
Sample Input 1
Sample Output 1
Test case 11: Cost of renting the cooler =5=5 coins per month. Cost of purchasing the cooler =12=12 coins. So, Chef can rent the cooler for 22 months at the cost of 1010 coins, which is strictly less than 1212 coins.
Test case 22: Cost of renting the cooler =5=5 coins per month. Cost of purchasing the cooler =5=5 coins. If Chef rents the cooler for 11 month, it will cost 55 coins, which is not strictly less than the cost of purchasing it. So, Chef should not rent the cooler.
login to google play console, youtube video search by image, how to add a google account, which are the google apps, what is the google app, how to add a new google account, all the google apps, which service is the part of google, adsetting google, google data studio, google DNS, GCP console, bigquery, google studio, google api console, google app engine, anthos, google apis, google public DNS, google audio, google launcher, gcloud console, google compute engine, google webmaster console, google logged-in devices, gdrive unlimited,google console tools,google studio login,my google voice,hey google service,find similar images google, my google forms, www google com bd search, search using images in google,google image search scan,google sea console,website console google, google sound, gdrive storage for students, google site console, google console login, webmaster console, searc h console, google server down, google backup login, photo finder google, google products and services, google console tool, google image check, google cloud search is used for, google dashboard studio, google voice and audio activity,gcp dashboards, google services down, google go app, google dns down, google image identifier,check picture on google,google new launcher,google image finder online,image check google google google go, image finder on google, finding images on google, photo find google, find a picture in google, find the photo on google, picture find google, image find on google, find with photo google, image finder google online, google find with image, photo finder in google, google find image search, search using image in google, search on google with image, google server down today, google server down news
Read More Post Here