解题思路:
注意事项:
参考代码:
def max(n,m):
if n < m:
a = m
b = n
else:
a = n
b = m
r = b%a
while r != 0:
r = b % a#辗转相除
b = a
a = r
return b
n,m = map(int,input().split())
d = max(n,m)
s = n*m/d
print(d,end = " ")
print("%d"%s)
0.0分
3 人评分