euler/python/e025.py

13 lines
278 B
Python
Raw Normal View History

2019-07-16 04:11:49 +02:00
from lib_fibonacci import fibonacci_generator
2015-11-16 20:56:24 +01:00
2019-07-16 04:11:49 +02:00
def euler_025():
for i, f in enumerate(fibonacci_generator()):
if len(str(f)) >= 1000:
return i + 1
2015-11-16 20:56:24 +01:00
2019-07-16 04:11:49 +02:00
if __name__ == "__main__":
print("e025.py: {}".format(euler_025()))
assert(euler_025() == 4782)