提交时间:2024-08-19 16:50:16
运行 ID: 167437
#include <bits/stdc++.h> using namespace std; bool check(int x) { int cnt=2; while(cnt<=x) { if(cnt==x) return true; cnt*=2; } return false; } int main() { int n,x; cin>>n; for(int i=1;i<=n;i++) { cin>>x; cout<<(check(x)?"Yes":"No")<<endl; } return 0; }