Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(curr, end):
- if curr > end:
- return 0
- if curr == end:
- return 1
- if curr < end:
- return f(curr + 2, end) + f(curr + 4, end) + f(curr + 5, end)
- for i in range(31, 1000):
- if f(31, i) == 1001:
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment