Oops! No dollar bills!

Amy is a cashier at a convenience store and has run out of all dollar bills. But she has plenty of coins--pennies (1 cent), nickels (5 cents), dimes (10 cents), quarters (25 cents)--in the cash drawer, and is well trained for an emergency situation like this: give the change with the fewest possible coins!

She just gave a change with 20 coins. What is the minimum possible value of the change, in cents?

Clarification: For example, if you think the change she just gave her customer is 2 dollars and 37 cents, write 237.


You need to be connected to run code

Bonus Question: What's the general formula when the number of coins is not 20 but some integer \(n\ge 6?\)


Problem Loading...

Note Loading...

Set Loading...