4459 - 阿克曼(Ackermann)函数
时间限制 : 1 秒
内存限制 : 128 MB
阿克曼(Ackermann)函数 A(m,n) 中,m, n 定义域是非负整数(m \le 3,n \le 10),函数值定义为:
\mathit{A}(m,n)=n+1;(m=0 时)。
\mathit{A}(m,n)=\mathit{A}(m-1,1);(m>0、n=0 时)。
\mathit{A}(m,n)=\mathit{A}(m-1,\mathit{A}(m,n-1));(m,n>0 时)。
输入
m 和 n。
输出
函数值。
样例
输入
2 3
输出
9