Currency Change
Bino has to provide cents of change and wishes to give this change with as few coins as possible. Bino has infinite coins of one real (Brazilian currency), fifty cents, twenty-five cents, ten cents, five cents and one penny.
Make a program to read an integer representing the number of cents that Bino has to provide in exchange. Print the number of coins Bino has provided and then print out the amount of each type of coin Bino has provided. Be very careful with the formatting of your output.
Input
The input consists of a single line containing the integer .
Output
The output consists of seven lines. The first consists of an integer representing the total number of coins. The second consists of the number of coins of a real user. The third line consists of the amount of fifty-cent coins used. The fourth consists of the number of coins of twenty-five cents used. The fifth consists of the amount of ten-cent coins used. The sixth is the number of coins of five cents used. The seventh line consists of the number of one-cent coins used.
Constraints
- The value provided will not be negative or higher than 10000
Input Samples | Output Samples |
---|---|
80
|
3
0 1 1 0 1 0 |
999
|
17
9 1 1 2 0 4 |