Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117145 | 刘珩宇 | 阿克曼函数 | C++ | Accepted | 177 MS | 396 KB | 475 | 2025-04-13 19:15:14 |
#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 a(int m,int n){ if(m==0){ return n+1; } else if(m>0&&n==0){ return a(m-1,1); } else{ return a(m-1,a(m, n-1)); } } int main(){ int m,n; cin>>m>>n; cout<<a(m,n); return 0; }