Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166079 李澄 整数幂 C++ 解答错误 75 5 MS 252 KB 490 2024-08-19 09:47:30

Tests(3/4):


#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; bool flag = true; while (n > 0) { if (n == 2) break; else if (n % 2 == 0) n /= 2; else { flag = false; break; } } if (flag) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }


测评信息: