#5: Smallest multiple | Ben Cunningham

#5: Smallest multiple

Problem by Project Euler · on November 30, 2001

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

Python

check = [11, 13, 14, 16, 17, 18, 19]

ans = 2520
while not (all(ans % f == 0 for f in check)):
    ans += 20
    
print(ans)
## 232792560