Run ID:99419
提交时间:2024-11-28 18:25:40
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; cin>>n; int a[n]; for(int j=0;j<n;j++){ cin>>a[j]; } int pell[100001]; pell[1]=1; pell[2]=2; for(int j=3;j<100001;j++){ pell[j]=(2*pell[j-1])+pell[j-2]; } for(int j=0;j<n;j++){ cout<<pell[a[j]]%32767<<endl; } return 0; }