You are viewing a single comment's thread. Return to all comments →
n =int(input()) for j in range(n): x= int(input()) z =[1, 2]; s =2 while(z[-1]+z[-2]<=x): z.append(z[-2]+z[-1]) if(z[-1]%2 == 0): s+=z[-1]; print(s)
the Program is very simple
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 →
the Program is very simple