提交时间:2024-08-19 17:04:32

运行 ID: 167626

#include<bits/stdc++.h> using namespace std; int main(){ int t,b; cin>>t; int s,c=0; for(int i=1;i<=t;i++){ cin>>b; s=b; for(int j=1;j<=b;j++){ s*=b; if(s==b){ cout<<"Yes"; break; c++; } } if(c!=0){ cout<<"NO"; } } } }