diff --git a/QUSTOJ/1584.cpp b/QUSTOJ/1584.cpp new file mode 100644 index 0000000..b222ab6 --- /dev/null +++ b/QUSTOJ/1584.cpp @@ -0,0 +1,20 @@ +#include +#include +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; +}