Create 1411_1232123212.c

pull/45/head
Kirigaya Kazuto 2016-10-27 19:31:56 +08:00 committed by GitHub
parent 150885ddef
commit ab379ffdb2
1 changed files with 27 additions and 0 deletions

27
QUSTOJ/1411_1232123212.c Normal file
View File

@ -0,0 +1,27 @@
#include "stdio.h"
#include "math.h"
int main ()
{
int n;
scanf ("%d", &n);
int x=0;
x = sqrt(n);
int i;
for (i=2; i<=x; i++)
{
if (n%i==0)
{
printf ("0");
break;
}
if (i=x-1)
{
printf ("1");
break;
}
}
return 0;
}