题目链接:HDU2041
斐波那契数列
ACcode:
/*
2017年9月19日10:54:58
HDU2041
AC
*/
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
const ll maxn=50;
ll f[maxn];
void tb(){
f[1]=1;
f[2]=1;
for(ll i=3;i<=50;i++){
f[i]=f[i-1]+f[i-2];
}
}
int main(){
ll t;
scanf("%lld",&t);
tb();
while(t--){
ll n;
scanf("%lld",&n);
printf("%lld\n",f[n]);
}
return 0;
}