```
//质数的性质
include [HTML_REMOVED]
int main()
{
int n;
std::cin>>n;
while(n–)
{
int x,flag =1;
std::cin>>x;
if( x % 6 !=1 && x % 6 != 5)
{
flag = 0;
}
for(int j =5;j * j<x;j += 6)
{
if(x % j ==0 || x % (j+2) == 0) flag = 0;
}
if(x <=3) flag=1;
if(flag == 1) printf("%d is prime\n",x);
if(flag == 0) printf("%d is not prime\n",x);
}
return 0;
}
````