zty747 @ 2021-10-02 15:30:54
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int n[1000],k[1000],d[1000];
int main()
{int m=2,f,i=0,j,len=1;
n[0]=1;d[0]=2;k[0]=0;
cin>>f;
if (f<=3) cout<<f;
else {
for(m=2;m!=f;m++)
{ for(i=0;i<len;i++)
k[i]=n[i]+d[i];
if (k[i]>=10) {k[i+1]+=1;k[i]=k[i]%10;len++;}
for (j=0;j<len;j++)
{n[j]=d[j];d[j]=k[j];} }
for(i=0;i<len;i++)
cout<<k[i];}
return 0;
}