아주 기초적인 거스름돈 구하기 알고리즘
for i in range(int(input())):
C = int(input())
print(int(C / 25), end=" ")
C = C % 25
print(int(C / 10), end=" ")
C = C % 10
print(int(C / 5), end=" ")
C = C % 5
print(int(C / 1))
'백준 > 일반 수학 1' 카테고리의 다른 글
백준 - 2869 (python) (0) | 2024.02.20 |
---|---|
백준 - 2292 (python) (0) | 2024.02.16 |
백준 - 2903 (python) (0) | 2024.02.15 |
백준 - 11005 (python) (0) | 2024.02.14 |
백준 - 2745 (python) (0) | 2024.02.14 |