Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166176 | JasonYin-HV | 整数幂 | C++ | 解答错误 | 0 | 2 MS | 268 KB | 350 | 2024-08-19 10:04:05 |
#include<bits/stdc++.h> using namespace std; int n,t,i,j,s; bool f; int main() { cin>>t; for(i=1;i<=t;i++){ cin>>n; j=0; s=0; f=false; if(n==1){ goto sk; } while(s<n){ j++; s=pow(2,j); if(s==n){ sk:cout<<"Yes"; f=true; continue; } } } if(!f){ cout<<"No"; } return 0; }