Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(a, b):
- if a > b:
- return 0
- if a == b:
- return 1
- if a < b:
- return f(a+1, b) + f(a+2, b) + f(a*3, b)
- all_with_8 = f(1, 8)*f(8, 27)
- without_10_11 = f(1, 8) * f(8, 10) * f(10, 11) * f(10, 11) * f(11, 27)
- print(all_with_8 - without_10_11)
Advertisement
Add Comment
Please, Sign In to add comment