A,B = map(int,input().split())
if A>B:
num = B
num2 =A
else:
num = A
num2 = B
for i in range(1,num+1):
if num2 % i ==0 and num % i==0:
total = i
print(total)
print(int(A*B/total))
카테고리 없음
A,B = map(int,input().split())
if A>B:
num = B
num2 =A
else:
num = A
num2 = B
for i in range(1,num+1):
if num2 % i ==0 and num % i==0:
total = i
print(total)
print(int(A*B/total))
댓글