Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166665 | 彭远智 | 整数幂 | C++ | 解答错误 | 0 | 8 MS | 260 KB | 329 | 2024-08-19 15:07:45 |
#include<iostream> #include<cmath> using namespace std; bool em(int a) { int j; for(j=1;j<=pow(2,31);j++) if(a==pow(2,j)) return true; else return false; } int main() { int T,s[T],i; cin>>T; for(i=1;i<=T;i++){ cin>>s[i]; if(em(s[i])==true) cout<<"yes"<<endl; else cout<<"no"; } return 0; }