Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Problem 8
- def f(current, end):
- if current > end:
- return 0
- elif current == end:
- return 1
- elif current//10%10!=9:
- return f(current+1, end) + f(current+10, end)
- else:
- return f( current + 1, end )
- print(f(10, 33))
- #25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement