5086번: 배수와 약수
5086번: 배수와 약수 (acmicpc.net) 5086번: 배수와 약수 각 테스트 케이스마다 첫 번째 숫자가 두 번째 숫자의 약수라면 factor를, 배수라면 multiple을, 둘 다 아니라면 neither를 출력한다. www.acmicpc.net while True: N,M=map(int,input().split()) if N==0 and M==0: break elif M%N==0: print("factor") elif N%M==0: print("multiple") else: print("neither")