Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def minBills(x,w):
- n = len(w)
- result = 0
- i = 0
- while(n != 0 and i < n):
- result += x // w[i]
- x %= w[i]
- i += 1
- return result
- wages = [100,20,10,5,1]
- x = int(input())
- print(minBills(x, wages))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement