Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166954 王梓阳 整数幂 C++ 解答错误 0 6 MS 264 KB 625 2024-08-19 15:43:16

Tests(0/4):


#include <iostream> using namespace std; int main() { int n; bool d=false; cin>>n; int a[10005]; for(long long i=0;i<n;i++) { cin>>a[i]; if(a[i]%2==0) { int s=1; while(s<=a[i]) { s*=2; if(s==a[i]) { cout<<"Yes"<<endl; d=true; } } if(!d) { cout<<"No"<<endl; } } else { if(a[i]==1) { cout<<"Yes"<<endl; d=true; } else { cout<<"No"; } } } return 0; }


测评信息: