diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2022-01-28 18:51:40 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2022-01-28 18:51:40 +0100 |
commit | 24b3966960a65775bfffca514600e2e47304d000 (patch) | |
tree | 332e19d923e1bf930c5370e97e84d9ab74f9e438 /002.py | |
parent | 7f93a4f807499441826042f59f9d5dad59854e69 (diff) | |
download | projecteuler-24b3966960a65775bfffca514600e2e47304d000.tar.gz |
002: Add python and elixir solutions
Diffstat (limited to '002.py')
-rw-r--r-- | 002.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -0,0 +1,8 @@ +def fibo(max): + a, b = 1, 2 + while a < max: + yield a + a, b = b, a + b + + +print(sum(list(filter(lambda n: n % 2 == 0, list(fibo(4000000)))))) |