点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1042
#include<iostream>
using namespace std;
int main()
{
int n;
int fbc[50]={0,1,1,0};
for(int i=3;i<=48;i++)
fbc[i]=fbc[i-1]+fbc[i-2];
cin>>n;
cout<<fbc[n]<<endl;
return 0;
}
点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1042
#include<iostream>
using namespace std;
int main()
{
int n;
int fbc[50]={0,1,1,0};
for(int i=3;i<=48;i++)
fbc[i]=fbc[i-1]+fbc[i-2];
cin>>n;
cout<<fbc[n]<<endl;
return 0;
}