Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
167123 | 仇浩然B班 | 二进制半整数 | C++ | 解答错误 | 0 | 12 MS | 248 KB | 339 | 2024-08-19 16:09:35 |
#include<bits/stdc++.h> using namespace std; int main(){ int n;long long x; cin>>n; for(int i=1;i<=n;i++){ cin>>x; if((x==1)||(x&1)&&((x-1)&(x-2))!=0)cout<<"no"<<endl; else{ while(!(x&1)){ x>>=1; x--; if(x&(x-1))cout<<"no"<<endl; else{ cout<<"yes"<<endl; } } } } return 0; }