← All problemsSign in

Euro

There is a bank which provides coins of various denominations of euros. In particular, it provides you coins of value 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000 euros. Today, Chef went to market with a coin of C euros, i.e. the coin with value C is among one of the above given 15 coins. Chef wanted to buy a brand new laptop worth L euros from a shop. Sadly the shop

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