I read an interesting DailyWTF post today, \"Out of All The Possible Answers...\" and it interested me enough to dig up the original forum post where it was submitted. This
This is probably the cleanest, shortest answer (both in terms of lines of code) that I've seen so far.
def gcd(a,b): return b and gcd(b, a % b) or a def lcm(a,b): return a * b / gcd(a,b) n = 1 for i in xrange(1, 21): n = lcm(n, i)
source : http://www.s-anand.net/euler.html