#Skip to menu

Smallest multiple

First read the problem description.

We just need to find the lcm.

from math import gcd

def lcm(a, b):
    return a*b // gcd(a, b)

l = 1
for n in range(1,20+1):
    l = lcm(l, n)
l
232792560

Source code of the solution(s):