페이지

10178번: 할로윈의 사탕

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


$O(n)$


#include<cstdio>
int n, a, b;
int main() {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) scanf("%d %d", &a, &b), printf("You get %d piece(s) and your dad gets %d piece(s).\n", a / b, a%b);
    return 0;
}

댓글 없음 :

댓글 쓰기