题解 | #牛牛的Ackmann#
牛牛的Ackmann
https://www.nowcoder.com/practice/3a7a4c26420c4358a1a5cda3da2fa1c8
#include <stdio.h> int Ackmann(int m,int n) { if(m > 0&& n > 0) { return Ackmann(m-1, Ackmann(m, n-1)); }else if(m > 0 && n == 0) { return Ackmann(m-1, 1); } return n+1; } int main() { int a,b; scanf("%d %d",&a,&b); int ret = Ackmann(b,a); printf("%d",ret); return 0; }