提交时间:2024-08-19 18:29:13
运行 ID: 167824
#include <bits/stdc++.h> using namespace std; int main(){ int n,a[1001]; cin >> n; for(int i = 1;i <= n;i++){ cin >> a[i]; } for(int i = 1;i <= n;i++){ for(int j = 1;;j *= 2){ if(j == a[i]){ cout << "Yes"; if(i != n){ cout << endl; } break; } else if(j > a[i]){ cout << "No"; if(i != n){ cout << endl; } break; } } } return 0; }