백준 5086 - 배수와 약수 (파이썬)

Updated:

Answer

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

Categories:

Updated: