Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
167437 | 刘峻驿 | 整数幂 | C++ | 解答错误 | 75 | 5 MS | 244 KB | 294 | 2024-08-19 16:50:16 |
#include <bits/stdc++.h> using namespace std; bool check(int x) { int cnt=2; while(cnt<=x) { if(cnt==x) return true; cnt*=2; } return false; } int main() { int n,x; cin>>n; for(int i=1;i<=n;i++) { cin>>x; cout<<(check(x)?"Yes":"No")<<endl; } return 0; }