提交时间:2024-08-19 10:13:14

运行 ID: 166222

#include <iostream> using namespace std; int main() { int n,x,k,l; cin >> n; for (int i = 1;i <= n;i++) { cin >> x; l=2; k=1 while (l>x) { for (int j=1;j < k;j++) { l*=2; } k++; } if (l==x) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }