Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166695 账号已封禁@magicoj 整数幂 C++ 解答错误 0 9 MS 256 KB 505 2024-08-19 15:14:05

Tests(0/4):


#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) { temp*=2; temp2=n-temp; 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; } }


测评信息: