a= 1000 -int(input())
b= [500, 100, 50, 10, 5, 1]
cnt=0
for i in b:
cnt+=a//i
a=a%i
print(cnt)
'백준 풀이' 카테고리의 다른 글
백준 10797번 파이썬 (0) | 2022.08.22 |
---|---|
백준 10162번 파이썬 (0) | 2022.08.22 |
백준 3053번 파이썬 (0) | 2022.08.21 |
백준 1037번 파이썬 (0) | 2022.08.21 |
백준 11050번 파이썬 (0) | 2022.08.21 |