Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112579 杜昊诚 阿克曼函数 C++ Accepted 177 MS 396 KB 282 2025-03-09 16:31:31

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int n,m; int f(int m,int n) { if(m==0) return n+1; if(n==0&&m>0) return f(m-1,1); if(m>0&&n>0) return f(m-1,f(m,n-1)); } int main() { cin>>m>>n; cout<<f(m,n); return 0; }