https://www.acmicpc.net/problem/5585
a = 1000 - int(input())
change = [500, 100, 50, 10, 5, 1]
count = 0
for coin in change:
count += a // coin
a %= coin
print(count)
'Python > Baekjoon' 카테고리의 다른 글
백준 2798번 : 블랙잭 (0) | 2022.11.21 |
---|---|
백준 11399번 : ATM (0) | 2022.11.16 |
백준 6603번 : 로또 (0) | 2022.11.14 |
백준 1759번 : 암호 만들기 (0) | 2022.11.14 |
백준 11659번 : 구간 합 구하기 4 (0) | 2022.11.14 |