
#include<bits/stdc++.h>
using namespace std;
int cal(int x){
if(x==1 || x==2) { return x; }
else if(x==3)
{ return 4; }
else{
return cal(x-1)+cal(x-2)+ cal(x-3);
}
}
int main(){
int m;
cin>>m;
cout<<cal(m);
}
由于博客内容为空,暂无法提供包含关键信息的摘要。
1433

被折叠的 条评论
为什么被折叠?



