Created
October 12, 2016 15:56
-
-
Save j10sanders/afbf502bbee775d9780190c0b0e24dac to your computer and use it in GitHub Desktop.
My answer to project euler 25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://projecteuler.net/problem=25 | |
def fib(digits): | |
f = i = 1 | |
e = j = 0 | |
while digits > len(str(f)): | |
e = j | |
j = f | |
f = e + j | |
i += 1 | |
return f, i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment