Advertisement
ForestFox

Untitled

Apr 12th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #Problem 6
  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+4, end) + f(current+5, end)
  9. for i in range(32,100):
  10. if f(31,i)==1001:
  11. print(i)
  12. break
  13. #56
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement