Weird transaction
CodeChefOpen on judge ↗
Neeraj went on a trip to wonderland during his vacation. While visiting different places there he was hungry and decided to get a pizza for himself, he found a shop nearby and went there to buy a pizza. As he noticed a weird transaction style there in which you have to pay another amount that is mentioned in your bill. The trend was like if the bill amount is, 0 -> 0 1 -> 0 2 -> 0 5 -> 4
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