点击查看代码
#include <iostream>
using namespace std;
int ack(int x,int y)
{if (x==0){return y + 1;}else if (x > 0 && y == 0){return ack(x - 1, 1);}else if (x > 0 && y > 0){return ack(x - 1, ack(x, y - 1));}
}
int main()
{int m, n;cin >> m >> n;cout << ack(m, n) << endl;return 0;
}