challenges/e2/e2.py

12 lines
166 B
Python
Executable File

#!/usr/bin/python
last = sum = 0
current = 1
while (current < 4000000):
if current % 2 == 0:
sum += current
tmp = current
current += last
last = tmp
print sum