提交时间:2024-08-19 09:44:39

运行 ID: 166073

#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; bool flag = true; while (n > 0) { if (n == 2) break; else if (n % 2 == 0) n /= 2; else { flag = false; break; } } if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }