2020-11-09
用函数求最大公约数和最小公倍数def max_divider(x,y):while y: t = x % y x = y y = t return xdef min_multipliter(a, b): for i in range(2, min(a, b) + 1): if a % i == 0 and b % i == 0: return i * min_multipliter(a // i, b // i)
原创
2020-11-09 09:20:09 ·
1428 阅读 ·
0 评论