Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
165976 赖泓君 整数幂 C++ 解答错误 0 7 MS 252 KB 426 2024-08-19 08:57:10

Tests(0/4):


#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[1001]; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ int p=1; while(a[i]>1){ if(a[i]%2!=0){ p=0; break; }else if(a[i]==2){ break; } a[i]=a[i]/2; } if(a[i]==1){ cout<<"no"<<endl; } else if(p==1){ cout<<"yes"<<endl; }else{ cout<<"no"<<endl; } } }


测评信息: