Minimum Transaction
CodeChefOpen on judge ↗
The problem we will be concerned with will be to minimize the number of coins that change hands at such a transaction, given that the shopkeeper has an adequate supply of all coins. (Indian coins comprise 5p, 10p, 20p, 50p, 1 Rupee and 2 Rupee.) Thus if we need to pay 55p, and we do not hold a 50p coin, we could pay this as 2*20p + 10p + 5p to make a total of 4 coins. If we tender 1Rupee we will r
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