From ab379ffdb2500ad627465b979bf91d2ec8165749 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Thu, 27 Oct 2016 19:31:56 +0800 Subject: [PATCH] Create 1411_1232123212.c --- QUSTOJ/1411_1232123212.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 QUSTOJ/1411_1232123212.c diff --git a/QUSTOJ/1411_1232123212.c b/QUSTOJ/1411_1232123212.c new file mode 100644 index 0000000..3a8f361 --- /dev/null +++ b/QUSTOJ/1411_1232123212.c @@ -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; +}