#include <bits/stdc++.h>
/*
author:hzj
id:23020201153760
*/
using namespace std;
long long f[51]={0,1,2};
long long fc(int x){
if(f[x]==0){
f[x]=fc(x-1)+fc(x-2);
}
return f[x];
}
int main()
{
int n ;
while(cin>>n){
cout<<fc(n)<<endl;
}
return 0;
}
HDOJ2046
最新推荐文章于 2021-09-03 19:46:45 发布