Create 1584.cpp

This commit is contained in:
Kirigaya Kazuto 2016-07-21 10:15:13 +08:00 committed by GitHub
parent d907659b38
commit 6f7d2d609f

20
QUSTOJ/1584.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <stdio.h>
#include <math.h>
int main()
{
int m,i,k,pc;
scanf("%d",&pc);
for(;pc>0;pc--)
{
scanf("%d",&m);
k=(int)sqrt(m);
for(i=2;i<=k;i++)
if(m%i==0)
break;
if(i>k)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}