diff --git a/euler/q2.py b/euler/q2.py new file mode 100644 index 00000000..6d7e66d6 --- /dev/null +++ b/euler/q2.py @@ -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)