from math import gcd from functools import reduce def LCM(a, b): return a // gcd(a, b) * b N = int(input("The LCM for numbers 1 through ")) print ("is", reduce(LCM, range(N//2+1, N+1)))