Problem 5
CodeChefOpen on judge ↗
The monetary system in Absurdistan is really simple and systematic. The locals only use coins.The coins come in different values. The values used are: 1, 10, 25, 100, 1000, 2500, 10000, 100000, 250000, 1000000, ... Formally, for each K>=0 there are coins worth 10K, and coins worth 25*100K. You want to buy a new car. Its price is cost. Assuming you have a sufficient supply of coins of each of
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