You are viewing a single comment's thread. Return to all comments →
Python:
from functools import reduce gcd = lambda a, b: a if not b else gcd(b, a % b) lcm = lambda a, b: (a * b) // gcd(a, b) [print(reduce(lcm, range(1, int(input())+1))) for _ in range(int(input()))]
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 →
Python: