페이지

5086번: 배수와 약수

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


$O(t)$


#include<cstdio>
int a, b;
int main() {
    while (scanf("%d %d", &a, &b) && a) puts(a%b ? b%a ? "neither" : "factor" : "multiple");
    return 0;
}

댓글 없음 :

댓글 쓰기