题目描述
#include <iostream>
using namespace std;
int main()
{
long long t, a[60] = {0, 1};//int精度不够用longlong 长整型 %ld
cin >> t;
for (int i = 2; i < 60; i ++) a[i] = a[i - 1] + a[i - 2];
while (t --)
{
int x;
cin >> x;
printf("Fib(%d) = %ld\n", x, a[x]);
}
return 0;
}