提交时间:2023-08-22 12:34:17
运行 ID: 99184
#include<bits/stdc++.h> using namespace std; int s[1005]; int main(){ int t,a; cin>>t; for(int j=1;j<=t;j++){ int sum=0; cin>>a; int i=1; while(a){ s[i]=a%2; a/=2; i++; } if(s[1]==1){ cout<<"no"<<endl; continue; } for(;i>1;i--){ if(s[i]==1) sum++; } if(sum==1||sum==2) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }