You are viewing a single comment's thread. Return to all comments →
Following @dusty_mehul logic, python code is:
for a0 in range(t): n = int(input().strip()) l=[0,2] s=0 while l[-1]<n: temp=4*l[-1]+l[-2] l.append(temp) print(sum(l[:-1]))
Project Euler #2: Even Fibonacci numbers
You are viewing a single comment's thread. Return to all comments →
Following @dusty_mehul logic, python code is: