Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166028 | C班-姚长钦 | 二进制半整数 | C++ | 解答错误 | 0 | 4 MS | 252 KB | 333 | 2024-08-19 09:26:49 |
#include <bits/stdc++.h> using namespace std; int main(){ int t,n; cin>>t; while(t--){ cin>>n; int sum=0; long long flag=1; while(flag){ if(flag&n){ sum++; if(sum>2){ break; } }flag=flag<<1; } if(sum>2 || n==1){ cout<<"no"; }else{ cout<<"yes"; } } return 0; }