Skip to content

Instantly share code, notes, and snippets.

@jeek
Created October 16, 2011 03:45
Show Gist options
  • Save jeek/1290482 to your computer and use it in GitHub Desktop.
Save jeek/1290482 to your computer and use it in GitHub Desktop.
project euler
sum = 0
for i in range(0,1000):
if (i % 3 == 0 or i % 5 == 0):
sum += i
print sum
a = 0
b = 1
c = 1
sum = 0
while (c < 4000000):
if ((c % 2) == 0):
sum += c
a = b
b = c
c = a + b
print sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment