Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166102 | 李澄 | 整数幂 | C++ | 通过 | 100 | 340 MS | 1024 KB | 455 | 2024-08-19 09:55:08 |
#include <bits/stdc++.h> using namespace std; long long a[100005]; int main() { a[0] = 1; for (int i = 1; i <= 100000; i++) { a[i] = a[i - 1] * 2; } int t; cin >> t; while (t--) { int n; cin >> n; bool flag = false; for (int i = 0; i <= 100000; i++) if (n == a[i]) flag = true; if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }