1762: 阿克曼(Ackmann)函数
Memory Limit:256 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:7
Solved:7
Description
阿克曼(Ackmann)函数A(m,n)中,m,n定义域是非负整数(m≤3,n≤10),函数值定义为:
akm(m,n) = n+1; (m=0时)
akm(m,n) = akm(m-1,1); (m>0,n=0时)
akm(m,n) = akm(m-1,akm(m, n-1)); (m,n>0时)
akm(m,n) = n+1; (m=0时)
akm(m,n) = akm(m-1,1); (m>0,n=0时)
akm(m,n) = akm(m-1,akm(m, n-1)); (m,n>0时)
Input
输入m和n。
Output
函数值
Sample Input Copy
2 3
Sample Output Copy
9