You are viewing a single comment's thread. Return to all comments →
from math import log10, ceil, sqrt phi = (1+sqrt(5))/2 #phi is the golden ratio t = int(input()) for a0 in range(t): d = int(input()) term = ceil((log10(5)/2+d-1)/ log10(phi)) print(term)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #25: N-digit Fibonacci number
You are viewing a single comment's thread. Return to all comments →
This Will Help You