Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102225 夏梓瑞 阿克曼函数 C++ Accepted 172 MS 396 KB 705 2024-12-21 14:06:31

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()\fabs() #include<ctime> #include<cstdlib> using namespace std; int w(int a,int b){ if(a==0) return b+=1; else if(a>0&&b==0) return w(a-1,1); else return w(a-1,w(a,b-1)); } int main(){ int a,b; cin>>a>>b; cout<<w(a,b)<<endl; return 0; }