이호진

swea 1970 - 쉬운 거스름돈 - 2021/05/12 본문

SWEA문제풀이

swea 1970 - 쉬운 거스름돈 - 2021/05/12

이호진 2021. 5. 12. 17:03
T = int(input())
for test_case in range(1, T + 1):
    money=[0]*8
    arr=[50000,10000,5000,1000,500,100,50,10]
    n=int(input())
    count=0
    for i in range(len(arr)):
        count=n//arr[i]
        money[i]=count
        n%=arr[i]
    print('#{}'.format(test_case))
    print(*money)