거스름돈

·Algorithm/백준
거스름돈https://www.acmicpc.net/problem/5585 문제코드# 거스름돈# 5585import sysinput = sys.stdin.readlineN = int(input())exchange = 1000 - Nmoneys = [500, 100, 50, 10, 5, 1]result = 0for i in moneys: if exchange == 0: break result += exchange // i exchange %= i print(result)
potato_pizza
'거스름돈' 태그의 글 목록