Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 157 Bytes

lcm.md

File metadata and controls

10 lines (7 loc) · 157 Bytes

Least Common Multiple (LCM)

lcm(a, b) = a * b / gcd(a, b)
lcm(a, b, c) = lcm(lcm(a, b), c)

std::lcm

In STL, there is a built-in std::lcm