본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#123 백준 파이썬 [5086] 배수와 약수

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

 

 

#Solution

x, y = map(int, input().split())

while (x, y) != (0, 0):
    if x % y == 0:
        print("multiple")
    elif y % x == 0:
        print("factor")
    else:
        print("neither")
    
    x, y = map(int, input().split())