![]() |
#2
yangfrancis2017-12-16 17:35
|
#include<iostream>
using namespace std;
int main()
{
int f(int n);
int n;
while(cin>>n)
cout<<f(n)<<endl;
return 0;
}
int f(int n)
{
if(n<=6)
return n;
else
return f(n-1)+f(n-3);
}