提交时间:2024-08-19 09:52:56
运行 ID: 166094
#include <bits/stdc++.h> using namespace std; long long a[1005]; int main() { for (int i = 1; i <= 1000; i++) { a[i]++; for (int j = 1; j <= i; j++) { a[i] *= 2; } } int t; cin >> t; while (t--) { int n; cin >> n; bool flag = false; for (int i = 1; i <= 1000; i++) if (n == a[i]) flag = true; if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }