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