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