Created
June 2, 2021 07:17
-
-
Save Kernelzero/018c7652121643e404ea51bc88001b68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
currency =[10,50,100,500,1000,5000,10000,50000] | |
exchange = int(input()) | |
count = 0 | |
currency.reverse() | |
while exchange != 0: | |
for n in currency: | |
if exchange >= n : | |
tempCount = exchange//n | |
subtract = tempCount * n | |
exchange -= subtract | |
count += tempCount | |
print(count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment