Hungry Ashish
It's dinner time. Ashish is very hungry and wants to eat something. He has $X$ rupees in his pocket. Since Ashish is very picky, he only likes to eat either `PIZZA` or `BURGER`. In addition, he prefers eating `PIZZA` over eating `BURGER`. The cost of a `PIZZA` is $Y$ rupees while the cost of a `BURGER` is $Z$ rupees. Ashish can eat at most one thing. Find out what will Ashish eat for his dinner
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