Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
166378 B班 林子翀 整数幂 C++ 解答错误 0 5 MS 252 KB 418 2024-08-19 14:03:55

Tests(0/4):


#include<iostream> using namespace std; const int num=2; long long n,a; bool m(int x) { while(2) { if(x==1) return 1; else if(x%2==0) { x/=a; } 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; }


测评信息: