Development/Algorithm & Coding Test
[파이썬, Python] 백준 5585번 : 거스름돈
컴공 K
2021. 8. 24. 00:01
728x90
백준 5585번 : 거스름돈

내 코드
n = 1000 - int(input())
coins = (500,100,50,10,5,1)
count = 0
for coin in coins:
count += n//coin
n%=coin
print(count)
728x90
반응형