Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = 72
- c = [1, 5, 10, 25]
- def coins(n, c):
- for i in range(len(c)):
- max_coin = c[len(c)-1-i]
- print(max_coin, 'x', n//max_coin)
- n -= (n//max_coin) * max_coin
- print("For " + str(n))
- coins(n, c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement