题目链接:http://bailian.openjudge.cn/practice/2786
# include <stdio.h>
int main()
{
int a[10000],t,i;
a[0]=1,a[1]=2;
for(i=2;i<150;i++)
{
a[i]=2*a[i-1]+a[i-2];
a[i]%=32767;
}
scanf("%d",&t);
while(t--)
{
scanf("%d",&i);
printf("%d\n",a[i%150-1]);
}
return 0;
}