Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166474 | A班陈旻霄 | 二进制半整数 | C++ | 解答错误 | 0 | 6 MS | 244 KB | 252 | 2024-08-19 14:37:43 |
#include<bits/stdc++.h> using namespace std; void calc() { int n; cin>>n; int k=0; while(n) { if(n&1) k++; n>>=1; } if(k<=1) cout<<"yes"; else cout<<"no"; } int main() { int t; cin>>t; while(t--) calc(); return 0; }