提交时间:2024-08-19 17:11:23
运行 ID: 167700
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while (t!=0){ int n,flag=0; cin >> n; for (int i=1;i<=20;i++){ if ((n>>i)==1 and n%(1<<i)==0){ cout << "Yes" << endl; flag=1; break; }else if (n==1){ cout << "Yes" << endl; flag=1; break; } } if (!flag){ cout << "No" << endl; } t-=1; } return 0; }