Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
75698 廖元方 T2小清新判断题 C++ 通过 100 82 MS 252 KB 645 2026-07-09 19:47:52

Tests(3/3):


#include<bits/stdc++.h> using namespace std; int main(){ int q; cin>>q; while(q--){ long long x; cin>>x; if(x==1){ cout<<"No"<<endl; continue; } long long p=-1; for(long long i=2;i*i<=x;i++){ if(x%i==0){ p=i;break; } }if (p==-1){ cout<<"No"<<endl; }else{ while(x%p==0) { x=x/p; }if(x==1) { cout<<"No"<<endl; }else{ cout<<"Yes"<<endl; } } } return 0; }


测评信息: