You are viewing a single comment's thread. Return to all comments →
t = int(input().strip()) for a0 in range(t): n = int(input().strip()) a, b = 1, 2 sum1 = 0 while b < n: if b % 2 == 0: sum1 += b a, b = b, a+b print(sum1)
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 →