Guest User

Untitled

a guest
Nov 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. from functool import lru_cache
  2.  
  3. @lru_cache(maxsize = 10000001)
  4. def fibouncci(n):
  5. if n==0:
  6. return 0
  7. elif n==1:
  8. return 1
  9. elif n>1:
  10. return (n-1)+(n-2)
  11.  
  12. for n in range(0,10000001):
  13. print(fibouncci(n))
Add Comment
Please, Sign In to add comment