You are viewing a single comment's thread. Return to all comments →
import math n = int(input()) for i in range(n): a = int(input()) lcm = 1 for j in range(1,a+1,1): lcm = math.lcm(lcm,j) print(lcm)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #5: Smallest multiple
You are viewing a single comment's thread. Return to all comments →