Write a program that, given a quantity of money expressed in euro cents, prints the minimal number of coins that you need to reach that quantity. You have an unlimited number of coins of each kind: 1 cents, 2 cents, 5 cents, 10 cents, 20 cents, 50 cents, 100 cents and 200 cents.
The input is a sequence of naturals between 0 and , ended in -1. The sequence will not contain more than 10000 numbers.
For each quantity of the input, that quantity has to be printed, followed by a colon, a space, and the minimal number of coins that you need to reach that quantity.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T11:56:13.499Z
© Jutge.org, 2006–2026.
https://jutge.org