Paying optimally
The currency of Dholakpur is pretty awesome. There notes have values 1, C, C2, C3 ... . The sequence goes on till infinity, so notes have unbounded values. Little Bheem is a resident of Dholakpur and runs a Laddu shop. He always keeps infinite number of notes of each value with him, but pays using minimum number of notes. For example, if C = 5 and he has to pay 32 rupees, he will pay using one no
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