euler/python/e025.py

13 lines
278 B
Python

from lib_fibonacci import fibonacci_generator
def euler_025():
for i, f in enumerate(fibonacci_generator()):
if len(str(f)) >= 1000:
return i + 1
if __name__ == "__main__":
print("e025.py: {}".format(euler_025()))
assert(euler_025() == 4782)