摘要:
import math def lcm(a, b): return a * b // math.gcd(a, b) def lcm_range(n): lcm_value = 1 for i in range(2, n+1): lcm_value = lcm(lcm_value, i) return 阅读全文
摘要:
import math def lcm(a, b): print('最大公约数 math.gcd({}, {})'.format(a,b),math.gcd(a, b)) return a * b // math.gcd(a, b) def lcm_range(n): lcm_value = 1 f 阅读全文