提交时间:2024-08-19 20:17:51

运行 ID: 167891

#include<bits/stdc++.h> using namespace std; int t,n; bool f(int x) { int s=1; while(x>=s) { if(x==s) { return 1; } s*=2; } return 0; } int main() { cin>>t; while(t--) { cin>>n; if(f(n)==1) { cout<<"Yes\n"; } else { cout<<"No\n"; } } return 0; }