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
Last updated
Was this helpful?
lcm(a, b) = a * b / gcd(a, b)
lcm(a, b, c) = lcm(lcm(a, b), c)
In STL, there is a built-in std::lcm
Last updated
Was this helpful?