Skip to content

Commit

Permalink
euler p2
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhatelmas committed Apr 11, 2022
1 parent 345b18a commit a79d519
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions euler/q2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
s, p1, p2 = 2, 1, 2
while p2 < 4000000:
p1, p2 = p2, p1 + p2
if p2 % 2 == 0:
s += p2
print(s)

0 comments on commit a79d519

Please sign in to comment.