提交时间:2024-08-19 15:08:39

运行 ID: 166675

#include <bits/stdc++.h> using namespace std; int main(){ int t;cin>>t; int s[t]; int jg[t]={0}; for (int i=0;i<t;i++){ cin>>s[i]; } for (int x=0;x<t;x++){ for (int y=0;y<sqrt(s[x]);y++){ for (int y1=0;y1<sqrt(s[x]);y1++){ if (pow(2,y)+pow(2,y1)==s[x]){ jg[x]=1; break; } }if (jg[x]==1){ break; } }if (jg[x]==1){ continue; } } for (int i=0;i<t;i++){ if (jg[i]){ cout<<"yes"<<endl; }else{ cout<<"no"<<endl; } } return 0; }