Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136997 王金檐 阿克曼函数 C++ Accepted 155 MS 400 KB 277 2025-11-15 17:25:13

Tests(10/10):


Code:

#include <iostream> #include <cmath> using namespace std; int A(int m,int n){ if(m==0){ return n+1; } if(m>0 && n==0){ return A(m-1,1); } if(m>0 && n>0){ return A(m-1,A(m, n-1)); } } int main(){ int a,b; cin>>a>>b; cout<<A(a,b); return 0; }