거스름돈
last update: 2021.09.08.WED
5585 거스름돈, Bronze 2
Memory 29200KB, Time 68ms
price = int(input())
change = 1000 - price
temp = 0
coin = [500, 100, 50, 10, 5, 1]
for i in range(len(coin)):
temp = temp + (change//coin[i])
change = change - coin[i]*(change//coin[i])
print(temp)