페이지

2720번: 세탁소 사장 동혁

https://www.acmicpc.net/problem/2720


$O(t)$

큰 단위 동전을 최대한 많이 준다.


#include<cstdio>
int t, x;
int main() {
    scanf("%d", &t);
    while (t--) scanf("%d", &x), printf("%d %d %d %d\n", x / 25, x % 25 / 10, x % 25 % 10 / 5, x % 5);
    return 0;
}

댓글 없음 :

댓글 쓰기