All pastes #1388378 Raw Edit

Project Euler #2

public python v1 · immutable
#1388378 ·published 2009-04-10 22:00 UTC
rendered paste body
# simple recursive function with memoizationn1, n2 = 0, 1total = 0while n2 < 4000000:    print(n2)    n1, n2 = n2, n1 + n2    if n2 % 2 == 0:        total += n2            print('Sum: ', total)