题目描述
blablabla
样例
blablabla
算法1
(暴力枚举)
blablabla
C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
long long a = 0,b = 1,c;
for(int i = 0;i <= n;i++)
{
if(i == n)printf("Fib(%d) = %lld\n",n,a);
c = a + b;
a = b;
b = c;
}
}
return 0;
}