Which Fuel is Cheaper
The current price of petrol is $X$ rupees, and the current price of diesel is $Y$ rupees. At the start of each month, the price of petrol increases by $A$ rupees and the price of diesel increases by $B$ rupees. Chef is curious to know which fuel costs less at the end of the $K^{th}$ month. If petrol is cheaper than diesel at the end of $K^{th}$ month, then print $\verb+PETROL+$. If diesel is che
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