解题思路:
注意事项:
参考代码:
def function(a, b): c = min(a, b) max_GCD = 0 for i in range(1, c + 1): if a % i == 0 and b % i == 0: max_GCD = i min_LCM = (a * b) // max_GCD return print(max_GCD, min_LCM) if __name__ == '__main__': a, b = map(int, input().split()) function(a, b)
0.0分
0 人评分