Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147006 陈骏睿 阿克曼函数 C++ Accepted 150 MS 400 KB 445 2026-02-02 10:54:11

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int f(int m,int n){ if(m==0) return n+1; else if(n==0) return f(m-1,1); else return f(m-1,f(m,n-1)); } int main(){ int m,n; cin>>m>>n; cout<<f(m,n)<<endl; return 0; }