http://ybt.ssoier.cn:8088/problem_show.php?pid=1189
**
跟上一题的区别
**
#include<bits/stdc++.h>
using namespace std;
int a1,a2,a3;
int n;
int k;
int main(){
freopen("cpp.in","r",stdin);
freopen("cpp.out","w",stdout);
cin>>n;
while(n--){
a1=1;
a2=2;
cin>>k;
if(k<3){
cout<<1<<endl;
continue;
}
for(int i=3;i<=k;i++){
a3 = (a1+2*a2)%32767;
// cout<<a3<<" ";
a1 = a2;
a2 = a3;
}
// cout<<endl;
cout<<a3<<endl;
}
return 0;
}