Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
165941 王容宇 二进制半整数 C++ 解答错误 60 4 MS 244 KB 344 2024-08-19 08:22:06

Tests(3/5):


#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) { cout << "yes" << endl; } else { cout << "no" << endl; } } return 0; }


测评信息: