Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166860 彭远智 整数幂 C++ 运行出错 0 12 MS 260 KB 357 2024-08-19 15:27:19

Tests(0/4):


#include<iostream> #include<cmath> using namespace std; bool em(int a) { for(int j=1;j<=pow(2,31);j++) if(a==pow(2,j)) return true; else if(a!=pow(2,j)) 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"<<endl; } return 0; }


测评信息: