提交时间:2024-08-19 18:53:28
运行 ID: 167829
#include <bits/stdc++.h> using namespace std; bool is(int x) { if (x <= 0) return false; return (x & (x - 1)) == 0; } int main() { int n; scanf("%d", &n); while (n--) { int x; scanf("%d", &x); if (is(x)) cout << "Yes\n"; else cout << "No\n"; } return 0; }