vgrabovets
9/23/2018 - 8:07 AM

least_common_multiple

least common multiple

def gcd(a, b):
    if b > a:
        return gcd(b, a)
 
    if a % b == 0:
        return b
 
    return gcd(b, a % b)


def lcm(x, y):
    return (x * y) // gcd(x, y)

lcm(28851538, 1183019)