/problem_02/problem_02.py
https://bitbucket.org/feinom/project-euler · Python · 15 lines · 11 code · 3 blank · 1 comment · 2 complexity · bc2cd4a4e99a7e6dd49c8d2fa527bd0a MD5 · raw file
- #!/usr/bin/python
- a1 = 1
- a2 = 2
- an = 0
- total = 0
- while an < 4000000:
- an = a1 + a2
- if an % 2 == 0:
- total += an
-
- a1 = a2
- a2 = an
- print total + 2