Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Problem 3
- def f(current, end):
- if current < end:
- return 0
- elif current == end:
- return 1
- else:
- return f(current-1, end) + f(current//2, end)
- print(f(int('110111', 2), 6))
- #343
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement