约 8 分钟
最小公倍数 lcm(a,b)=a×b/gcd(a,b)。为防溢出,先除后乘:a/gcd(a,b)*b。因为 a 一定能被 gcd 整除,先除不会丢精度。
a/gcd(a,b)*b
lcm(4,6) 等于多少?
登录 后可看答案