Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166066 | 李澄 | 整数幂 | C++ | 解答错误 | 50 | 3 MS | 252 KB | 451 | 2024-08-19 09:39:31 |
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; bool flag = true; while (n > 0) { if (n % 2 == 0) n /= 2; else { flag = false; break; } } if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }