You are viewing a single comment's thread. Return to all comments →
Solution using python sustom made generator
def fibo(n:int): s=1 p=0 t=p # su=0 while s+t<n: p=s s=s+t t=p if s%2==0: yield s for _ in range(int(input())): n=int(input()) s=(sum(fibo(n))) 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 →
Solution using python sustom made generator