Advertisement
ForestFox

Untitled

Apr 12th, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #Problem 8
  2. def f(current, end):
  3. if current > end:
  4. return 0
  5. elif current == end:
  6. return 1
  7. elif current//10%10!=9:
  8. return f(current+1, end) + f(current+10, end)
  9. else:
  10. return f( current + 1, end )
  11. print(f(10, 33))
  12. #25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement