Skip to content

Instantly share code, notes, and snippets.

@mavant
Created November 22, 2013 00:30
Show Gist options
  • Save mavant/7592563 to your computer and use it in GitHub Desktop.
Save mavant/7592563 to your computer and use it in GitHub Desktop.
Project Euler problem 25
i = 1
n = 0
a = 1
b = 1
while n < 1000:
temp = b
b = a + b
a = temp
n = len(str(b))
i += 1
print ("The {}th term is {}".format(i+1, b))
#this problem was ambiguous about whether they wanted the term's number or the value of the term...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment