Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
165944 | 王容宇 | 二进制半整数 | C++ | 解答错误 | 0 | 5 MS | 244 KB | 352 | 2024-08-19 08:23:06 |
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; for(int i = 1; i<=t; i++) { long long n; cin >> n; int sum = 0; while(n!=1) { if(n%2) { sum++; } n/=2; } if(sum<=1 && n>=4) { cout << "yes" << endl; } else { cout << "no" << endl; } } return 0; }