Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166383 B班 林子翀 整数幂 C++ 解答错误 0 6 MS 248 KB 400 2024-08-19 14:05:48

Tests(0/4):


#include<iostream> using namespace std; long long n,a; bool m(int x) { while(2) { if(x==1) return 1; else if(x%2==0) { x/=2; } else return 0; } } main() { cin>>n; bool b[n]; for(int i=0;i<n;i++) { cin>>a; if(m(a)) b[i]=true; } for(int i=0;i<n;i++) { if(b[i]) cout<<"Yes"; else cout<<"No"; cout<<endl; } return 0; }


测评信息: