You are viewing a single comment's thread. Return to all comments →
Python 3 solution. Thoughts?
import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip()) a, b, s = 1, 2, 0 while b <= n: if b % 2 == 0: s += b a, b = b, a + b print(s)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #2: Even Fibonacci numbers
You are viewing a single comment's thread. Return to all comments →
Python 3 solution. Thoughts?