백준-5585

Seogyu Gim·2020년 11월 24일
0

코딩테스트

목록 보기
2/47
import math

coins = [500, 100, 50, 10, 5, 1]

N = 1000 - int(input())

# print(f"거스름돈 : {N}")
result = 0
for coin in coins:
  result += math.floor(N / coin)
  print(coin, result)
  N = N % coin
  

print(result)
profile
의미 있는 일을 하고싶은 개발자

0개의 댓글