Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- sys.setrecursionlimit(6000)
- def A(m, n):
- if m == 0:
- return n + 1
- if m > 0 and n == 0:
- return A(m - 1, 1)
- if m > 0 and n > 0:
- return A(m - 1, A(m, n - 1))
- m = int(input())
- n = int(input())
- print(A(m, n))
Advertisement
Add Comment
Please, Sign In to add comment