문제풀이/백준(Boj) 문제풀이

[백준][정수론 및 조합론] 5086. 배수와 약수 (파이썬/Python)

얄루몬 2021. 9. 23. 18:48

import sys
input = sys.stdin.readline

while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    if b%a ==0:
        print("factor")
    elif a%b == 0:
        print("multiple")
    else:
        print('neither')