PCPOTATO
Navigation

Home
About
Contact
Resume

Projects

None yet

Categories

General
Programming

Archives

July 2008
June 2008
May 2008
April 2008
Project Euler #5 April 14th, 2008

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

1
2
3
4
5
6
7
i = 20
while((i%20 != 0) or (i%19 != 0) or (i%18 != 0) or 
(i%17 != 0) or (i%16 != 0) or (i%15 != 0) or (i%14 != 0)
 or (i%13 != 0) or (i%12 != 0) or (i%11 != 0)):
	i = i + 20
	print i
print i

I am going to hell.

Leave a Reply

You must be logged in to post a comment.

Domains


Links


Presence


Meta

Log in