Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166054 | D班-柯铭皓 | 整数幂 | C++ | 通过 | 100 | 4 MS | 256 KB | 306 | 2024-08-19 09:36:35 |
#include<bits/stdc++.h> using namespace std; bool f(int n) { double m=n; while(m>=1) { m/=2; } if(m*2==1) return 1; return 0; } int main(){ int n; cin>>n; for(int i=1;i<=n;i++) { int m; cin>>m; if(f(m)) cout<<"Yes\n"; else cout<<"No\n"; } return 0; }