Papyrus在审判你 • 1年前
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
while(n--){
int k,f,f1=1,f2=1;
cin>>k;
f=1;
for(int i=3;i<=k;i++){
f=f1+f2;
f1=f2;
f2=f;
}
cout<<f<<endl;
}
return 0;
}
评论:
请先登录,才能进行评论