#include <iostream>
using namespace std;
int func(int n){
if(n==0) return 1;
if(n==1) return 1;
if(n==2) return 2;
return func(n-1) + func (n-2) + func(n-3);
}
int main(){
int n = 0;
cin>>n;
int res = func(n);
cout<<res<<endl;
return 0;
}
标签:std,return,int,func,3643,Acing
From: https://www.cnblogs.com/poteitoutou/p/17120444.html