当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1165:Eddy's research II

题目描述
As is known, Ackermann function plays an important role in the sphere of theoretical computer science. However, in the other hand, the dramatic fast increasing pace of the function caused the value of Ackermann function hard to calcuate.

Ackermann function can be defined recursively as follows:


Now Eddy Gives you two numbers: m and n, your task is to compute the value of A(m,n) .This is so easy problem,If you slove this problem,you will receive a prize(Eddy will invite you to hdu restaurant to have supper).
输入解释
Each line of the input will have two integers, namely m, n, where 0 < m < =3.
Note that when m<3, n can be any integer less than 1000000, while m=3, the value of n is restricted within 24.
Input is terminated by end of file.
输出解释
For each value of m,n, print out the value of A(m,n).
输入样例
1 3
2 4
输出样例
5
11
来自杭电HDUOJ的附加信息
Author eddy
Recommend JGShining

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1165

最后修改于 2020-10-25T22:42:38+00:00 由爬虫自动更新

共提交 104

通过率 87.5%
时间上限 内存上限
4000/2000MS(Java/Others) 65536/32768K(Java/Others)