Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166948 | 刘子隽bylz | 二进制半整数 | C++ | 通过 | 100 | 6 MS | 248 KB | 306 | 2024-08-19 15:42:01 |
#include<bits/stdc++.h> using namespace std; int main(){ int t,n; cin>>t; while(t--) { cin>>n; int sum=0; long long f=1; while(f) { if(f&n) { sum++; if(sum>2) break; } f=f<<1; } if(sum>2||n==1) cout<<"no\n"; else cout<<"yes\n"; } return 0; }