Least Common Multiple

Find the least common multiple (LCM) of two numbers using the GCD-based formula.

Code

Algorithms
import math
return abs(a * b) // math.gcd(a, b)

Parameters

First number

Second number

Server

More Python Snippets