뭐하는 문제인가?
약수랑 배수 관계에 있는지 확인하는 문제.
너무 쉽다
그저 나머지 연산(%)만 쓰면 된다.
#include <stdio.h>
int main() {
int a,b;
while(1) {
scanf("%d%d",&a,&b);
if(!(a||b)) return 0;
if(b%a==0) printf("factor\n");
else if(a%b==0) printf("multiple\n");
else printf("neither\n");
}
}
더 이상의 설명이 필요한지?