Run ID:71470
提交时间:2024-04-24 19:30:16
def gcd(a, b): """ 求两个整数的最大公约数 """ while b: a, b = b, a % b return a def lcm(a, b): """ 求两个整数的最小公倍数 """ return a * b // gcd(a, b) a, b = list(map(int, input().split())) print(gcd(a, b), lcm(a, b), sep=' ')