暴力做法
时间复杂度 O(n*根号x[i])
#include<bits/stdc++.h>
using namespace std;
struct what_is_this_it_is_an_orange_qwq_this_is_a_meaningless_name{
int x;
bool isprime(){
if(x<2) return false;
for(int i=2;i<=x/i;i++){
if(x%i==0) return false;
}
return true;
}
} a;
int n;
int main(){
cin>>n;
while(n--){
cin>>a.x;
cout<<(a.isprime()?"Yes":"No")<<endl;
}
return 0;
}