#t335. 阿克曼(Ackmann)函数
阿克曼(Ackmann)函数
The Ackmann Function
Problem Background
Special for beginners, ^_^
Problem Description
For the Ackmann function , are non-negative integers . The function is defined as:
$$\nA(m,n)=\n\begin{cases}\nn+1, &m=0\\\\\nA(m-1,1),&m>0,n=0\\\\\nA(m-1,A(m,n-1)) &m,n>0\n\end{cases}\n$$Input Format
Input and .
Output Format
The value of .
Sample Input
2 3
Sample Output
9
Constraints
1s, 1024KiB for each test case.