12 lines
166 B
Python
12 lines
166 B
Python
|
#!/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
|