Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
41921 | 陈栋 | 阿克曼函数 | C++ | Accepted | 122 MS | 396 KB | 261 | 2022-11-11 20:16:39 |
#include<bits/stdc++.h> using namespace std; int mai(int x,int y){ if(x==0) return y+1; else if(x>0&&y==0) return mai(x-1,1); else if(x>0&&y>0) return mai(x-1,mai(x,y-1)); } int main(){ long long n,m; cin>>n>>m; cout<<mai(n,m); return 0; }