Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
68599 祝家懿 阿克曼函数 C++ Wrong Answer 1 MS 272 KB 274 2024-03-24 08:58:11

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int s(int x,int n){ if(x>0){ return n+1; } if(x>0&&n==0){ n=1; return s(x-1,n); } if(x>0&&n>0){ return s(x-1,s(x,n-1)); } } int main() { int a,b; cin>>a>>b; cout<<s(a,b)<<endl; return 0; }


Run Info:

------Input------
1 1
------Answer-----
3
------Your output-----
2