The Cooler Dilemma 2
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 $X$ coins per month. - Purchase a cooler for $Y$ 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. ###
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start