S representing a dollar amount, make change for that amount of money use the least number of coins to make the change and record the amount of each coin in a list. Here are the coins available to use and their value.
Coin : Value Dollar Coins : $1.00 Quarters: $0.25 Dimes: $0.10 Nickels: $0.05 Pennies: $0.01
S that contains the dollar symbol
$ and the dollar amount.
List of coin numbers separated by a space character
" ". The list must be in this order: Dollar coins, quarters, dimes, nickels, pennies.
$0.00 < S < $10.00
Sis given to two decimal places.
- make change for that amount of money use the least number of coins
4 2 0 1 3
9 3 2 0 4
shortest bytes win.