90分求助
查看原帖
90分求助
779036
封禁用户楼主2023/7/18 22:27
#include<bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int Ac;
    cin>>Ac;
    for(int i=1;i<=Ac;i++){
        int n,m,a=0;
        cin>>n;
        while(n>1){
            m=2;
            while(n%m!=0)
                m++;
                n/=m;
            if(m%2!=0){
                a+=0;
            }
            else{
                a++;
            }
        }
        if(a==0){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}
2023/7/18 22:27
加载中...