Advertisement
belet

Untitled

Oct 11th, 2016
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def foo(n):
  2. if n <= 1:
  3. return n
  4. SMTN = foo(n-1)
  5. n = foo(n-2)
  6. SMTN += n
  7. return SMTN
  8.  
  9.  
  10. res =0
  11. pow = 1
  12. for b in range (40):
  13. pow /= 10
  14. res = res + pow*foo(b)
  15.  
  16. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement