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)
= 1
l for n in range(1,20+1):
= lcm(l, n)
l l
232792560
Source code of the solution(s):