Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
221 ZRH 阿克曼函数 C++ Accepted 60 MS 388 KB 486 2022-07-22 10:14:31

Tests(10/10):


Code:

#include<iostream> //输入函数库 #include<iomanip> #include<cmath> //数学函数库 #include<cstdio> #include<ctime> #include<cstring> #include<cstdlib> #include<string> #include<stdlib.h> #include<sys/time.h> using namespace std; int t(int x,int n){ if(x==0){ return n+1; } else if(x>0&&n==0){ return t(x-1,1); } else if(x>0&&n>0){ return t(x-1,t(x, n-1)); } } int main(){ int x,n; cin>>x>>n; cout<<t(x,n); return 0; }