mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1584.cpp
This commit is contained in:
parent
d907659b38
commit
6f7d2d609f
20
QUSTOJ/1584.cpp
Normal file
20
QUSTOJ/1584.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user