Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
167623 | 黄锦昱 | 整数幂 | C++ | 解答错误 | 0 | 6 MS | 244 KB | 482 | 2024-08-19 17:04:16 |
#include <bits/stdc++.h> using namespace std; int x[] = {2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824}; int main() { int n; cin >> n; for (int i = 0; i <= n; ++i) { int a; bool f = 1; cin >> a; for (int i : x) { if (a == i) { cout << "Yes\n"; f = 0; break; } } if (f) cout << "No\n"; } }