Skip to content

Instantly share code, notes, and snippets.

@ganadist
Created April 28, 2013 01:10
Show Gist options
  • Save ganadist/5475395 to your computer and use it in GitHub Desktop.
Save ganadist/5475395 to your computer and use it in GitHub Desktop.
n1 = 0
n2 = 1
MAX = 400 * 10000
sum = 0
while n2 <= MAX:
n3 = n1 + n2
if n3 % 2 == 0:
sum += n3
n1, n2 = n2, n3
print sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment