提交时间:2024-08-19 09:41:29

运行 ID: 166069

#include<bits/stdc++.h> using namespace std; int main(){ long int t,n; int temp=1; bool tmp=false; cin>>t; for(int i=1;i<=t;i++){ cin>>n; temp=1; tmp=false; while(temp<=n){ temp=temp*2; if(temp==n){ cout<<"Yes"<<endl; tmp=true; break; } } if(tmp==false) cout<<"No"<<endl; } }