Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166726 | 账号已封禁@magicoj | 二进制半整数 | C++ | 通过 | 100 | 5 MS | 252 KB | 505 | 2024-08-19 15:18:07 |
#include<bits/stdc++.h> using namespace std; long long int t,n,i=0,j=0,temp=1; double temp2; int tmp; int main() { cin>>t; for(int k=0;k<t;k++) { cin>>n; i=1; j=1; temp=1; tmp=0; temp2=1; while(temp<n) { temp2=n-temp; temp*=2; if(temp2==1) { cout<<"yes"<<endl; tmp=1; break; } while(temp2>=1)temp2=temp2/2; if(temp2*2==1) { cout<<"yes"<<endl; tmp=1; break; } } if(tmp==0)cout<<"no"<<endl; } }