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