Farz0l1x

Untitled

Feb 17th, 2023
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def f(curr, end):
  2.     if curr > end or curr == 9:
  3.         return 0
  4.     if curr == end:
  5.         return 1
  6.     if curr < end:
  7.         return f(curr + 1, end) + f(curr * 2, end)
  8. print(f(2, 12)*f(12, 42))
Advertisement
Add Comment
Please, Sign In to add comment