提交时间:2024-08-19 09:51:26
运行 ID: 166088
#include <bits/stdc++.h> using namespace std; int a[25]; int main() { for (int i = 1; i <= 20; 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 <= 20; i++) if (n == a[i]) flag = true; if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }