← All problemsSign in

Diwali Discount

CodeChefRating 180Open on judge ↗

Chef is trying to buy a Diwali gift for Rs. $A$, and he has a voucher for Rs. $B$. Chef will have to pay the remaining amount after applying the voucher. If the voucher's value exceeds the gift's value, Chef will not have to pay anything. Find the amount that Chef will pay for buying the gift. ### Input - The first and only line of input contains $2$ integers - $A$ and $B$. ### Output For each

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start