#include<bits/stdc++.h>
using namespace std;
int a[1000000],n,x;
int main() {
cin>>n;
a[1]=1,a[2]=2;
for(int i=3; i<1000000; i++)
{
a[i]=(a[i-1]*2+a[i-2])%32767;
}
while(n--) {
cin>>x;
cout<<a[x]<<endl;
}
return 0;
}
02-21
597
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-28
4868
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-23