题目描述
不太会
样例
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--){
int x;
cin>>x;
bool prime = 0;
for(int i=2;i*i<=x;i++){
if(x%i==0){
prime =1;
break;
}
}
if(prime)cout<<x<<" is not prime"<<endl;
else cout<<x<<" is prime"<<endl;
}
}