跳到主要内容

资源 · 指南或文章

Least common multiple

讲解最小公倍数:定义、适用于小数的列举法,以及基于最大公约数的公式。

审核日期

打开原站: Least common multiple (在新标签页中打开原网站)

添加到路线图

把这个资源放进你正在跟进的路线图。它会作为你自己的补充资源显示;路线图的步骤不会改变,也不计入你已记录的步骤。

来源内容语言:英语

In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by LCM(a, b), is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a,0) as 0 for all a, which is the result of taking the lcm to be the least upper bound in the lattice of divisibility. Common multiples of 4 and 6 are simply the numbers that are in both lists: So, from this list of the first few common multiples of the numbers 4 and 6, their least common multiple is 12.

PrepKit 概览

本概览由 PrepKit 编辑根据源代码仓库撰写并审核,并非资源本身的文字。

适合人群
来源未说明适用级别
形式
参考资料

涵盖内容

  • 定义,以及关于零的注意事项和 lcm(a, 0) 的约定
  • 通过列举倍数求得 LCM(4, 6) = 12
  • lcm(a, b) = |a * b| / gcd(a, b)
  • 一张包含 2、3、4、5 和 7 的韦恩图,以及一个 60 张牌的发牌示例

使用建议

这是 PrepKit 的学习建议,并非来源的说法。

借助最大公约数实现 lcm,先除后乘,并把它依次作用于 2、3、4 和 5,得到 60。

范围与局限

没有讨论溢出、复杂度或求最大公约数的方法。

获取方式与形式

GitHub 上采用 MIT 许可的 trekhleb/javascript-algorithms 仓库中的免费英文 README。

PrepKit 于 2026年10月2日 审核。 资源来源提交: 85293e3e2b88

本概览的依据
  • src/algorithms/math/least-common-multiple/README.md

收录此条目的页面

订阅 PrepKit 通讯

可选。使用 PrepKit 并不需要订阅。

我们如何处理你的邮箱