Advertisement
ForestFox

Untitled

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