변수
- 거스름돈 money
- 동전 종류 listM
- 동전의 개수 total
로직
- 동전 종류만큼 for문을 돌면서
- money / list_coin --> +total
// 거스름돈을 동전으로 나눈 몫을 동전 개수로 +
- money - (list값 * money/list_coin)
// 맨 처음 거스름돈에서 빠져나간 동전만큼 돈을 - 해준다
코드
money = int(input())
list_coin = [500,100,50,10]
total = 0
for coin in list_coin :
a = money//coin
total += a
money = money%coin
print(total)
25/03/03 다시 풀었음 ~