提交时间:2023-08-22 14:22:58
运行 ID: 99243
#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; if(a==1){ cout<<"no"<<endl; continue; } int i=1; while(a){ s[i]=a%2; a/=2; i++; } for(;i>=1;i--){ if(s[i]==1) sum++; } if(sum==1||sum==2) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }