Hungry Chef
Chef is very hungry. So, Chef goes to a shop selling burgers. The shop has $2$ types of burgers: - Normal burgers, which cost $X$ rupees each - Premium burgers, which cost $Y$ rupees each (where $Y \gt X$) Chef has $R$ rupees. Chef wants to buy **exactly** $N$ burgers. He also wants to maximize the number of premium burgers he buys. Determine the number of burgers of both types Chef must buy. Ou
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