Advertisement
Bad_Programist

Untitled

Feb 5th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import sys
  2.  
  3. sys.setrecursionlimit(6000)
  4. def A(m, n):
  5.     if m == 0:
  6.         return n + 1
  7.     if m > 0 and n == 0:
  8.         return A(m - 1, 1)
  9.     if m > 0 and n > 0:
  10.         return A(m - 1, A(m, n - 1))
  11.  
  12. m = int(input())
  13. n = int(input())
  14. print(A(m, n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement