node_ids
sequencelengths 4
1.4k
| edge_index
sequencelengths 1
2.22k
| text
sequencelengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
37,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
6,
58
],
[
58,
59
],
[
98,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
66,
77
],
[
77,
78
],
[
78,
79
],
[
66,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
62,
93
],
[
93,
94
],
[
60,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}\n\t\n\tpublic static boolean isPrime(int a){\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}\n\t\n\tpublic static boolean isPrime(int a){\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int a;",
"a",
"int num=0;",
"num",
"0",
"for(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}",
"{\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}",
"a = Integer.parseInt(sc.next())",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"if(isPrime(a)) num++;",
"isPrime(a)",
"isPrime",
"a",
"num++",
"num",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"String[] args",
"args",
"public static boolean isPrime(int a){\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}",
"isPrime",
"{\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}",
"boolean warenai=true;",
"warenai",
"true",
"for(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(a)",
"i",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}",
"a%i==0",
"a%i",
"a",
"i",
"0",
"{\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}",
"warenai=false",
"warenai",
"false",
"break;",
"return warenai;",
"warenai",
"int a",
"a",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}\n\t\n\tpublic static boolean isPrime(int a){\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\t\n\t\tint a;\n\t\tint num=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\ta = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) num++;\n\t\t}\n\t\tSystem.out.println(num);\n\n\t}\n\t\n\tpublic static boolean isPrime(int a){\n\t\tboolean warenai=true;\n\t\tfor(int i=2;i<=Math.sqrt(a);i++){\n\t\t\tif(a%i==0) {\n\t\t\t\twarenai=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn warenai;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int a;
int num=0;
for(int i=0;i<N;i++){
a = Integer.parseInt(sc.next());
if(isPrime(a)) num++;
}
System.out.println(num);
}
public static boolean isPrime(int a){
boolean warenai=true;
for(int i=2;i<=Math.sqrt(a);i++){
if(a%i==0) {
warenai=false;
break;
}
}
return warenai;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
8,
4,
13,
4,
18,
13,
17,
17,
4,
18,
18,
13,
13,
13,
29,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
40,
13,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
34,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
8,
48
],
[
6,
49
],
[
49,
50
],
[
79,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
64,
70
],
[
70,
71
],
[
63,
72
],
[
72,
73
],
[
53,
74
],
[
74,
75
],
[
51,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
] | [
"\nimport java.util.Scanner;\n\n/**\n * Created by shoya on 2017/04/14.\n */\npublic class Main {\n public static void main(String... args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }\n\n public static boolean isPrime(int n){\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String... args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }\n\n public static boolean isPrime(int n){\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }\n}",
"Main",
"public static void main(String... args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"ans += (isPrime(sc.nextInt())) ? 1 : 0;",
"ans += (isPrime(sc.nextInt())) ? 1 : 0",
"ans",
"(isPrime(sc.nextInt())) ? 1 : 0",
"(isPrime(sc.nextInt()))",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"String... args",
"args",
"public static boolean isPrime(int n){\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }",
"isPrime",
"{\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }",
"int i = 2;",
"i",
"2",
"while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"{\n if (n % i == 0)\n return false;\n i++;\n }",
"if (n % i == 0)\n return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"i++",
"i",
"return true;",
"true",
"int n",
"n",
"public class Main {\n public static void main(String... args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }\n\n public static boolean isPrime(int n){\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }\n}",
"public class Main {\n public static void main(String... args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\n for (int i = 0; i < n; i++)\n ans += (isPrime(sc.nextInt())) ? 1 : 0;\n System.out.println(ans);\n return;\n }\n\n public static boolean isPrime(int n){\n int i = 2;\n while (i * i <= n) {\n if (n % i == 0)\n return false;\n i++;\n }\n return true;\n }\n}",
"Main"
] |
import java.util.Scanner;
/**
* Created by shoya on 2017/04/14.
*/
public class Main {
public static void main(String... args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 0;
for (int i = 0; i < n; i++)
ans += (isPrime(sc.nextInt())) ? 1 : 0;
System.out.println(ans);
return;
}
public static boolean isPrime(int n){
int i = 2;
while (i * i <= n) {
if (n % i == 0)
return false;
i++;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
35,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
6,
55
],
[
55,
56
],
[
107,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
59,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
76,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
76,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
59,
102
],
[
102,
103
],
[
57,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] | [
"import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int solve(int number) {\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int solve(int number) {\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int cnt = Integer.parseInt(s.nextLine());",
"cnt",
"Integer.parseInt(s.nextLine())",
"Integer.parseInt",
"Integer",
"s.nextLine()",
"s.nextLine",
"s",
"int result = 0;",
"result",
"0",
"for(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i<cnt",
"i",
"cnt",
"i++",
"i++",
"i",
"{\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}",
"{\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}",
"int number = Integer.parseInt(s.nextLine());",
"number",
"Integer.parseInt(s.nextLine())",
"Integer.parseInt",
"Integer",
"s.nextLine()",
"s.nextLine",
"s",
"result += solve(number)",
"result",
"solve(number)",
"solve",
"number",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public static int solve(int number) {\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}",
"solve",
"{\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}",
"if(number == 2) {\n\t\t\treturn 1;\n\t\t}",
"number == 2",
"number",
"2",
"{\n\t\t\treturn 1;\n\t\t}",
"return 1;",
"1",
"if(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}",
"number % 2 == 0",
"number % 2",
"number",
"2",
"0",
"{\n\t\t\treturn 0;\n\t\t}",
"return 0;",
"0",
"for(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"int i=3 ;",
"int i=3 ;",
"i",
"3",
"i<=Math.sqrt(number)",
"i",
"Math.sqrt(number)",
"Math.sqrt",
"Math",
"number",
"i+=2",
"i+=2",
"i",
"2",
"{\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"if(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}",
"number % i == 0",
"number % i",
"number",
"i",
"0",
"{\n\t\t\t\treturn 0;\n\t\t\t}",
"return 0;",
"0",
"return 1;",
"1",
"int number",
"number",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int solve(int number) {\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint cnt = Integer.parseInt(s.nextLine());\n\t\tint result = 0;\n\t\tfor(int i=0 ; i<cnt ; i++) {\n\t\t\tint number = Integer.parseInt(s.nextLine());\n\t\t\tresult += solve(number);\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int solve(int number) {\n\t\tif(number == 2) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(number % 2 == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=3 ; i<=Math.sqrt(number) ; i+=2){\n\t\t\tif(number % i == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int cnt = Integer.parseInt(s.nextLine());
int result = 0;
for(int i=0 ; i<cnt ; i++) {
int number = Integer.parseInt(s.nextLine());
result += solve(number);
}
System.out.println(result);
}
public static int solve(int number) {
if(number == 2) {
return 1;
}
if(number % 2 == 0) {
return 0;
}
for(int i=3 ; i<=Math.sqrt(number) ; i+=2){
if(number % i == 0) {
return 0;
}
}
return 1;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
32,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
41,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
32,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
]
] | [
"import java.util.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),count=0;\n for(int ii=0;ii<n;ii++){\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),count=0;\n for(int ii=0;ii<n;ii++){\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),count=0;\n for(int ii=0;ii<n;ii++){\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),count=0;\n for(int ii=0;ii<n;ii++){\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }\n System.out.println(count);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"count=0;",
"count",
"0",
"for(int ii=0;ii<n;ii++){\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }",
"int ii=0;",
"int ii=0;",
"ii",
"0",
"ii<n",
"ii",
"n",
"ii++",
"ii++",
"ii",
"{\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }",
"{\n int k = sc.nextInt();\n boolean flg = true;\n for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }\n if(flg){\n count++;\n }\n }",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flg = true;",
"flg",
"true",
"for(int i=2;i<=Math.sqrt(k);i++){\n if(k%i==0){flg=false;break;}\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(k)",
"i",
"Math.sqrt(k)",
"Math.sqrt",
"Math",
"k",
"i++",
"i++",
"i",
"{\n if(k%i==0){flg=false;break;}\n }",
"{\n if(k%i==0){flg=false;break;}\n }",
"if(k%i==0){flg=false;break;}",
"k%i==0",
"k%i",
"k",
"i",
"0",
"{flg=false;break;}",
"flg=false",
"flg",
"false",
"break;",
"if(flg){\n count++;\n }",
"flg",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args"
] | import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt(),count=0;
for(int ii=0;ii<n;ii++){
int k = sc.nextInt();
boolean flg = true;
for(int i=2;i<=Math.sqrt(k);i++){
if(k%i==0){flg=false;break;}
}
if(flg){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
41,
13,
17,
41,
13,
20,
13,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
18,
13,
13,
14,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
132,
5
],
[
132,
6
],
[
6,
7
],
[
6,
8
],
[
132,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
11,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
24,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
32,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
48,
54
],
[
54,
55
],
[
11,
56
],
[
56,
57
],
[
9,
58
],
[
58,
59
],
[
132,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
68,
69
],
[
68,
70
],
[
62,
72
],
[
72,
73
],
[
72,
74
],
[
62,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
62,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
62,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
99,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
62,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
60,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static int MAX = 100000;\n public static boolean isPrime(int num){\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }\n public static void main(String[] args) {\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static int MAX = 100000;\n public static boolean isPrime(int num){\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }\n public static void main(String[] args) {\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }\n}",
"Main",
"public static int MAX = 100000;",
"MAX",
"100000",
"public static boolean isPrime(int num){\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }",
"isPrime",
"{\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }",
"if(num < 2)\n return false;",
"num < 2",
"num",
"2",
"return false;",
"false",
"if(num == 2)\n return true;",
"num == 2",
"num",
"2",
"return true;",
"true",
"if(num % 2 ==0)\n return false;",
"num % 2 ==0",
"num % 2",
"num",
"2",
"0",
"return false;",
"false",
"for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i * i <= num",
"i * i",
"i",
"i",
"num",
"i += 2",
"i += 2",
"i",
"2",
"{\n if(num % i == 0)\n return false;\n }",
"{\n if(num % i == 0)\n return false;\n }",
"if(num % i == 0)\n return false;",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int num",
"num",
"public static void main(String[] args) {\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }",
"main",
"{\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }",
"int n;",
"n",
"int count = 0;",
"count",
"0",
"int[] A = new int[MAX];",
"A",
"new int[MAX]",
"MAX",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"A[i] = sc.nextInt();",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j ++",
"j ++",
"j",
"{\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }",
"{\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }",
"boolean flag = isPrime(A[j]);",
"flag",
"isPrime(A[j])",
"isPrime",
"A[j]",
"A",
"j",
"if(flag)\n count ++;",
"flag",
"count ++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static int MAX = 100000;\n public static boolean isPrime(int num){\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }\n public static void main(String[] args) {\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }\n}",
"public class Main {\n public static int MAX = 100000;\n public static boolean isPrime(int num){\n if(num < 2)\n return false;\n if(num == 2)\n return true;\n if(num % 2 ==0)\n return false;\n for(int i = 3;i * i <= num;i += 2){\n if(num % i == 0)\n return false;\n }\n return true;\n }\n public static void main(String[] args) {\n int n;\n int count = 0;\n int[] A = new int[MAX];\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n for(int i = 0;i < n;i ++)\n A[i] = sc.nextInt();\n for(int j = 0;j < n;j ++){\n boolean flag = isPrime(A[j]);\n if(flag)\n count ++;\n }\n System.out.println(count);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static int MAX = 100000;
public static boolean isPrime(int num){
if(num < 2)
return false;
if(num == 2)
return true;
if(num % 2 ==0)
return false;
for(int i = 3;i * i <= num;i += 2){
if(num % i == 0)
return false;
}
return true;
}
public static void main(String[] args) {
int n;
int count = 0;
int[] A = new int[MAX];
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
for(int i = 0;i < n;i ++)
A[i] = sc.nextInt();
for(int j = 0;j < n;j ++){
boolean flag = isPrime(A[j]);
if(flag)
count ++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
114,
11
],
[
114,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
16,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
12,
66
],
[
66,
67
],
[
114,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
70,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
70,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
85,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
107,
108
],
[
70,
109
],
[
109,
110
],
[
68,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }\n\n public static boolean isPrime(int num) {\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }\n\n public static boolean isPrime(int num) {\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }",
"main",
"{\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }",
"try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }",
"{\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt( br.readLine() );",
"n",
"Integer.parseInt( br.readLine() )",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int num;",
"num",
"int result = 0;",
"result",
"0",
"for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }",
"{\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }",
"num = Integer.parseInt(br.readLine())",
"num",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if (isPrime(num)) result++;",
"isPrime(num)",
"isPrime",
"num",
"result++",
"result",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public static boolean isPrime(int num) {\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }",
"isPrime",
"{\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }",
"if( num == 2 ) return true;",
"num == 2",
"num",
"2",
"return true;",
"true",
"if( (num % 2) == 0 ) return false;",
"(num % 2) == 0",
"(num % 2)",
"num",
"2",
"0",
"return false;",
"false",
"for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }",
"int i=3;",
"int i=3;",
"i",
"3",
"i*i <= num",
"i*i",
"i",
"i",
"num",
"i+=2",
"i+=2",
"i",
"2",
"{\n if ( num % i == 0 ) return false;\n }",
"{\n if ( num % i == 0 ) return false;\n }",
"if ( num % i == 0 ) return false;",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int num",
"num",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }\n\n public static boolean isPrime(int num) {\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.readLine() );\n int num;\n int result = 0;\n\n for (int i=0; i<n; i++) {\n num = Integer.parseInt(br.readLine());\n if (isPrime(num)) result++;\n }\n System.out.println(result);\n }\n }\n\n public static boolean isPrime(int num) {\n if( num == 2 ) return true;\n if( (num % 2) == 0 ) return false;\n\n for(int i=3; i*i <= num; i+=2 ) {\n if ( num % i == 0 ) return false;\n }\n return true;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int n = Integer.parseInt( br.readLine() );
int num;
int result = 0;
for (int i=0; i<n; i++) {
num = Integer.parseInt(br.readLine());
if (isPrime(num)) result++;
}
System.out.println(result);
}
}
public static boolean isPrime(int num) {
if( num == 2 ) return true;
if( (num % 2) == 0 ) return false;
for(int i=3; i*i <= num; i+=2 ) {
if ( num % i == 0 ) return false;
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
4,
18,
13,
13,
2,
17,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
14,
2,
2,
13,
13,
17,
30,
40,
13,
3,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
38,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
38,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
53,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
6,
78
],
[
78,
79
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tScanner scanner = new Scanner(System.in);// ??\\?????????????????????\n\t\tint count = scanner.nextInt();\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count - flag);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tScanner scanner = new Scanner(System.in);// ??\\?????????????????????\n\t\tint count = scanner.nextInt();\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count - flag);\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n\t\tScanner scanner = new Scanner(System.in);// ??\\?????????????????????\n\t\tint count = scanner.nextInt();\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count - flag);\n\t}",
"main",
"{\n\n\t\tScanner scanner = new Scanner(System.in);// ??\\?????????????????????\n\t\tint count = scanner.nextInt();\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count - flag);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int count = scanner.nextInt();",
"count",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int flag = 0;",
"flag",
"0",
"for(int i = 0; i < count; i++){\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < count",
"i",
"count",
"i++",
"i++",
"i",
"{\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = scanner.nextInt();\n\t\t\tfor(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}",
"int num = scanner.nextInt();",
"num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for(int j = (int) Math.sqrt(num); 1 < j; j--){\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}",
"int j = (int) Math.sqrt(num);",
"int j = (int) Math.sqrt(num);",
"j",
"(int) Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"1 < j",
"1",
"j",
"j--",
"j--",
"j",
"{\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}",
"{\n\t\t\t\tif(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}",
"if(j == 1){\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"j == 1",
"j",
"1",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if(num % j == 0){\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"num % j == 0",
"num % j",
"num",
"j",
"0",
"{\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag++",
"flag",
"break;",
"System.out.println(count - flag)",
"System.out.println",
"System.out",
"System",
"System.out",
"count - flag",
"count",
"flag",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);// ??\?????????????????????
int count = scanner.nextInt();
int flag = 0;
for(int i = 0; i < count; i++){
int num = scanner.nextInt();
for(int j = (int) Math.sqrt(num); 1 < j; j--){
if(j == 1){
break;
}
if(num % j == 0){
flag++;
break;
}
}
}
System.out.println(count - flag);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
0,
13,
17,
0,
13,
4,
18,
13,
13,
42,
2,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
0,
13,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
6,
47
],
[
47,
48
],
[
4,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
51,
76
],
[
76,
77
],
[
76,
78
],
[
51,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
51,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
89,
99
],
[
99,
100
],
[
99,
101
],
[
51,
102
],
[
102,
103
],
[
49,
104
],
[
104,
105
]
] | [
"import java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean isPrime(int x){\n\t\tint i, s;\n\t\tif(x==2){\n\t\t\treturn true;\n\t\t}\n\t\tif(x<2 || x%2==0){\n\t\t\treturn false;\n\t\t}\n\t\ti = 3;\n\t\ts = (int)Math.sqrt(x);\n\t\twhile(i<=s){\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean isPrime(int x){\n\t\tint i, s;\n\t\tif(x==2){\n\t\t\treturn true;\n\t\t}\n\t\tif(x<2 || x%2==0){\n\t\t\treturn false;\n\t\t}\n\t\ti = 3;\n\t\ts = (int)Math.sqrt(x);\n\t\twhile(i<=s){\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt=0;",
"cnt",
"0",
"for(int i=0; i<N; i++){\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}",
"{\n\t\t\tif(isPrime(sc.nextInt())) cnt++;\n\t\t}",
"if(isPrime(sc.nextInt())) cnt++;",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static boolean isPrime(int x){\n\t\tint i, s;\n\t\tif(x==2){\n\t\t\treturn true;\n\t\t}\n\t\tif(x<2 || x%2==0){\n\t\t\treturn false;\n\t\t}\n\t\ti = 3;\n\t\ts = (int)Math.sqrt(x);\n\t\twhile(i<=s){\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tint i, s;\n\t\tif(x==2){\n\t\t\treturn true;\n\t\t}\n\t\tif(x<2 || x%2==0){\n\t\t\treturn false;\n\t\t}\n\t\ti = 3;\n\t\ts = (int)Math.sqrt(x);\n\t\twhile(i<=s){\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}\n\t\treturn true;\n\t}",
"int i",
"i",
"s;",
"s",
"if(x==2){\n\t\t\treturn true;\n\t\t}",
"x==2",
"x",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if(x<2 || x%2==0){\n\t\t\treturn false;\n\t\t}",
"x<2 || x%2==0",
"x<2",
"x",
"2",
"x%2==0",
"x%2",
"x",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"i = 3",
"i",
"3",
"s = (int)Math.sqrt(x)",
"s",
"(int)Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"while(i<=s){\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}",
"i<=s",
"i",
"s",
"{\n\t\t\tif(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti += 2;\n\t\t}",
"if(x%i==0){\n\t\t\t\treturn false;\n\t\t\t}",
"x%i==0",
"x%i",
"x",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"i += 2",
"i",
"2",
"return true;",
"true",
"int x",
"x"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int cnt=0;
for(int i=0; i<N; i++){
if(isPrime(sc.nextInt())) cnt++;
}
System.out.println(cnt);
}
static boolean isPrime(int x){
int i, s;
if(x==2){
return true;
}
if(x<2 || x%2==0){
return false;
}
i = 3;
s = (int)Math.sqrt(x);
while(i<=s){
if(x%i==0){
return false;
}
i += 2;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
42,
2,
17,
13,
30,
14,
4,
18,
13,
4,
18,
13,
30,
40,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
17,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
29,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
25,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
24,
37
],
[
37,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
6,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
56,
77
],
[
77,
78
],
[
77,
79
],
[
56,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
80,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
80,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
56,
106
],
[
106,
107
],
[
54,
108
],
[
108,
109
],
[
49,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }\n}\n\nclass PrimeNumber{\n int result = 0;\n \n public boolean getPN(int a){\n if(a == 2){\n return true;\n }\n if(a < 2 || a % 2 == 0){\n return false;\n }\n \n int k = 3;\n for(int i = 3; i <= Math.sqrt(a); i += 2){\n if(a % i == 0){\n return false;\n }\n }\n return true;\n }\n \n public int getResult(){\n return result;\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"PrimeNumber PN = new PrimeNumber();",
"PN",
"new PrimeNumber()",
"while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }",
"0 < a",
"0",
"a",
"{\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }",
"if(PN.getPN(sc.nextInt())){\n PN.result++;\n }",
"PN.getPN(sc.nextInt())",
"PN.getPN",
"PN",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n PN.result++;\n }",
"PN.result++",
"PN.result",
"PN",
"PN.result",
"a--",
"a",
"System.out.println(PN.getResult())",
"System.out.println",
"System.out",
"System",
"System.out",
"PN.getResult()",
"PN.getResult",
"PN",
"String[] args",
"args",
"class PrimeNumber{\n int result = 0;\n \n public boolean getPN(int a){\n if(a == 2){\n return true;\n }\n if(a < 2 || a % 2 == 0){\n return false;\n }\n \n int k = 3;\n for(int i = 3; i <= Math.sqrt(a); i += 2){\n if(a % i == 0){\n return false;\n }\n }\n return true;\n }\n \n public int getResult(){\n return result;\n }\n}",
"PrimeNumber",
"int result = 0;",
"result",
"0",
"public boolean getPN(int a){\n if(a == 2){\n return true;\n }\n if(a < 2 || a % 2 == 0){\n return false;\n }\n \n int k = 3;\n for(int i = 3; i <= Math.sqrt(a); i += 2){\n if(a % i == 0){\n return false;\n }\n }\n return true;\n }",
"getPN",
"{\n if(a == 2){\n return true;\n }\n if(a < 2 || a % 2 == 0){\n return false;\n }\n \n int k = 3;\n for(int i = 3; i <= Math.sqrt(a); i += 2){\n if(a % i == 0){\n return false;\n }\n }\n return true;\n }",
"if(a == 2){\n return true;\n }",
"a == 2",
"a",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(a < 2 || a % 2 == 0){\n return false;\n }",
"a < 2 || a % 2 == 0",
"a < 2",
"a",
"2",
"a % 2 == 0",
"a % 2",
"a",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"int k = 3;",
"k",
"3",
"for(int i = 3; i <= Math.sqrt(a); i += 2){\n if(a % i == 0){\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(a)",
"i",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"i += 2",
"i += 2",
"i",
"2",
"{\n if(a % i == 0){\n return false;\n }\n }",
"{\n if(a % i == 0){\n return false;\n }\n }",
"if(a % i == 0){\n return false;\n }",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int a",
"a",
"public int getResult(){\n return result;\n }",
"getResult",
"{\n return result;\n }",
"return result;",
"result",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n PrimeNumber PN = new PrimeNumber();\n \n while(0 < a){\n if(PN.getPN(sc.nextInt())){\n PN.result++;\n }\n a--;\n }\n System.out.println(PN.getResult());\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
PrimeNumber PN = new PrimeNumber();
while(0 < a){
if(PN.getPN(sc.nextInt())){
PN.result++;
}
a--;
}
System.out.println(PN.getResult());
}
}
class PrimeNumber{
int result = 0;
public boolean getPN(int a){
if(a == 2){
return true;
}
if(a < 2 || a % 2 == 0){
return false;
}
int k = 3;
for(int i = 3; i <= Math.sqrt(a); i += 2){
if(a % i == 0){
return false;
}
}
return true;
}
public int getResult(){
return result;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
35,
13,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
1,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
18,
13,
2,
13,
17,
17,
30,
0,
18,
13,
2,
13,
17,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
9,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
9,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
23,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
39,
45
],
[
45,
46
],
[
22,
47
],
[
47,
48
],
[
6,
49
],
[
49,
50
],
[
140,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
53,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
53,
65
],
[
65,
66
],
[
65,
67
],
[
53,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
69,
73
],
[
53,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
107,
108
],
[
107,
109
],
[
53,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
110,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
123,
129
],
[
129,
130
],
[
53,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
51,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] | [
"import java.util.*;\n\npublic class Main {\n\tpublic static boolean is_prime(int x){\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static boolean is_prime(int x){\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n\n}",
"Main",
"public static boolean is_prime(int x){\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}",
"is_prime",
"{\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}",
"switch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}",
"x",
"case 2 :",
"2",
"case 2 :",
"return true;",
"true",
"case 3 :",
"3",
"case 3 :",
"return true;",
"true",
"default:",
"default:",
"for(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}",
"int e = 2 ;",
"int e = 2 ;",
"e",
"2",
"e <= Math.sqrt(x)",
"e",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"e++",
"e++",
"e",
"{\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}",
"{\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}",
"if(x % e ==0) return false;",
"x % e ==0",
"x % e",
"x",
"e",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public static void main(String[] args) {\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}",
"main",
"{\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}",
"int c = 0;",
"c",
"0",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int N = scn.nextInt();",
"N",
"scn.nextInt()",
"scn.nextInt",
"scn",
"boolean[] tof = new boolean[100000000];",
"tof",
"new boolean[100000000]",
"100000000",
"Arrays.fill(tof, false)",
"Arrays.fill",
"Arrays",
"tof",
"false",
"for(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}",
"int k = scn.nextInt();",
"k",
"scn.nextInt()",
"scn.nextInt",
"scn",
"if(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}",
"tof[k-1] == false",
"tof[k-1]",
"tof",
"k-1",
"k",
"1",
"false",
"{\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}",
"tof[k-1] = is_prime(k)",
"tof[k-1]",
"tof",
"k-1",
"k",
"1",
"is_prime(k)",
"is_prime",
"k",
"for(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < 100000000",
"j",
"100000000",
"j++",
"j++",
"j",
"{\n\t\t\tif(tof[j] == true) c++;\n\t\t}",
"{\n\t\t\tif(tof[j] == true) c++;\n\t\t}",
"if(tof[j] == true) c++;",
"tof[j] == true",
"tof[j]",
"tof",
"j",
"true",
"c++",
"c",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n\tpublic static boolean is_prime(int x){\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n\n}",
"public class Main {\n\tpublic static boolean is_prime(int x){\n\t\tswitch(x){\n\t\tcase 2 : return true;\n\t\tcase 3 : return true;\n\t\tdefault:\n\t\t\tfor(int e = 2 ; e <= Math.sqrt(x) ; e++){\n\t\t\t\tif(x % e ==0) return false;\n\t\t\t}\n\t\treturn true;\n\t\t\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tint c = 0;\n\t\tScanner scn = new Scanner(System.in);\n\t\tint N = scn.nextInt();\n\t\tboolean[] tof = new boolean[100000000];\n\t\tArrays.fill(tof, false);\n\t\tfor(int i = 1 ; i <= N ; i++){\n\t\t\tint k = scn.nextInt();\n\t\t\tif(tof[k-1] == false){\n\t\t\t\ttof[k-1] = is_prime(k);\n\t\t\t}\n\t\t}\n\t\tfor(int j = 0 ; j < 100000000 ; j++){\n\t\t\tif(tof[j] == true) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
public static boolean is_prime(int x){
switch(x){
case 2 : return true;
case 3 : return true;
default:
for(int e = 2 ; e <= Math.sqrt(x) ; e++){
if(x % e ==0) return false;
}
return true;
}
}
public static void main(String[] args) {
int c = 0;
Scanner scn = new Scanner(System.in);
int N = scn.nextInt();
boolean[] tof = new boolean[100000000];
Arrays.fill(tof, false);
for(int i = 1 ; i <= N ; i++){
int k = scn.nextInt();
if(tof[k-1] == false){
tof[k-1] = is_prime(k);
}
}
for(int j = 0 ; j < 100000000 ; j++){
if(tof[j] == true) c++;
}
System.out.println(c);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
13,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
128,
5
],
[
128,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
9,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
16,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
29,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
29,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
6,
57
],
[
57,
58
],
[
128,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
61,
70
],
[
70,
71
],
[
70,
72
],
[
61,
73
],
[
73,
74
],
[
73,
75
],
[
61,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
61,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
97,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
116,
117
],
[
117,
118
],
[
61,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
59,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] | [
"import java.util.Scanner;\npublic class Main{\n\tprivate static boolean check(int number){\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tprivate static boolean check(int number){\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"private static boolean check(int number){\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}",
"check",
"{\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}",
"if(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"number==2",
"number",
"2",
"{\t\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"number%2==0 || number<2",
"number%2==0",
"number%2",
"number",
"2",
"0",
"number<2",
"number",
"2",
"{\n\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"for(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"int j = 3;",
"int j = 3;",
"j",
"3",
"j <=Math.sqrt(number)",
"j",
"Math.sqrt(number)",
"Math.sqrt",
"Math",
"number",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"if(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"number%j==0",
"number%j",
"number",
"j",
"0",
"{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int number",
"number",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int count = 0;",
"count",
"0",
"int[] number = new int[n];",
"number",
"new int[n]",
"n",
"for(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}",
"{\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}",
"number[i]=scan.nextInt()",
"number[i]",
"number",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}",
"check(number[i])",
"check",
"number[i]",
"number",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n\tprivate static boolean check(int number){\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}\n}",
"public class Main{\n\tprivate static boolean check(int number){\n\t\tif(number==2){\t\n\t\t\treturn true;\n\t\t}\n\t\telse if(number%2==0 || number<2){\n\t\t\treturn false;\n\t\t\t}\n\t\telse\n\t\t\tfor(int j = 3; j <=Math.sqrt(number);j+=2){\n\t\t\t\tif(number%j==0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t\t\t\t\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tint[] number = new int[n]; \n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tnumber[i]=scan.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tif(check(number[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(count);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
private static boolean check(int number){
if(number==2){
return true;
}
else if(number%2==0 || number<2){
return false;
}
else
for(int j = 3; j <=Math.sqrt(number);j+=2){
if(number%j==0){
return false;
}
}
return true;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int count = 0;
int[] number = new int[n];
for(int i = 0 ; i < n ; i++){
number[i]=scan.nextInt();
}
for(int i = 0; i < n ; i++){
if(check(number[i])){
count++;
}
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
17,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
98,
8
],
[
98,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
70,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
51,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
11,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
9,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main\n{\n\t\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n\t\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i< n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}",
"int now = Integer.parseInt(br.readLine());",
"now",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}",
"now != 1",
"now",
"1",
"{\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}",
"boolean isPrime = true;",
"isPrime",
"true",
"for(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2 ;",
"int j = 2 ;",
"j",
"2",
"j*j <= now",
"j*j",
"j",
"j",
"now",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"now != j && now % j == 0",
"now != j",
"now",
"j",
"now % j == 0",
"now % j",
"now",
"j",
"0",
"{\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"if(isPrime) ans++ ;",
"isPrime",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main\n{\n\t\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"public class Main\n{\n\t\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint ans = 0;\n\t\tfor(int i = 0; i< n ; i++){\n\t\t\tint now = Integer.parseInt(br.readLine());\n\t\t\tif(now != 1){\n\t\t\t\tboolean isPrime = true;\n\t\t\t\tfor(int j = 2 ; j*j <= now; j++)\n\t\t\t\t{\n\t\t\t\t\tif(now != j && now % j == 0){\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isPrime) ans++ ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int ans = 0;
for(int i = 0; i< n ; i++){
int now = Integer.parseInt(br.readLine());
if(now != 1){
boolean isPrime = true;
for(int j = 2 ; j*j <= now; j++)
{
if(now != j && now % j == 0){
isPrime = false;
break;
}
}
if(isPrime) ans++ ;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
14,
4,
18,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
55,
8
],
[
55,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
9,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] | [
"import java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}\n\n}\n",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }",
"{\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }",
"BigInteger bi = new BigInteger(sc.next());",
"bi",
"new BigInteger(sc.next())",
"if(bi.isProbablePrime(5)) count++;",
"bi.isProbablePrime(5)",
"bi.isProbablePrime",
"bi",
"5",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int count = 0;\n for(int i = 0;i < n;i++){\n\n \t// \tisProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します\n BigInteger bi = new BigInteger(sc.next());\n if(bi.isProbablePrime(5)) count++;\n\n }\n System.out.println(count);\n\n\t}\n\n}",
"Main"
] | import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for(int i = 0;i < n;i++){
// isProbablePrime()はこのBigIntegerが素数である可能性が高い場合はtrue、必ず合成数である場合はfalseを返します
BigInteger bi = new BigInteger(sc.next());
if(bi.isProbablePrime(5)) count++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
9,
14,
2,
2,
13,
17,
17,
30,
40,
13,
9,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
40,
13,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
114,
11
],
[
114,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
14,
35
],
[
35,
36
],
[
35,
37
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
50,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
50,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
78,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
78,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
14,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
12,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tpublic static void main (String[] args) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\t\n\tpublic static void main (String[] args) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main (String[] args) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(is);",
"br",
"new BufferedReader(is)",
"String wdn = br.readLine();",
"wdn",
"br.readLine()",
"br.readLine",
"br",
"int N = Integer.parseInt(wdn);",
"N",
"Integer.parseInt(wdn)",
"Integer.parseInt",
"Integer",
"wdn",
"int ans = N;",
"ans",
"N",
"int num = 0;",
"num",
"0",
"for (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i< N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"String wdnum = br.readLine();",
"wdnum",
"br.readLine()",
"br.readLine",
"br",
"num = Integer.parseInt(wdnum)",
"num",
"Integer.parseInt(wdnum)",
"Integer.parseInt",
"Integer",
"wdnum",
"if (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\t\tcontinue;\n\t\t\t}",
"continue;",
"if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}",
"num % 2 ==0",
"num % 2",
"num",
"2",
"0",
"{\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}",
"ans--",
"ans",
"continue;",
"for (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j=3;",
"int j=3;",
"j",
"3",
"j<=Math.sqrt(num)",
"j",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"num%j==0",
"num%j",
"num",
"j",
"0",
"{\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"ans--",
"ans",
"break;",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static void main (String[] args) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\t\n\tpublic static void main (String[] args) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString wdn = br.readLine();\n\t\tint N = Integer.parseInt(wdn);\n\t\tint ans = N;\n\t\tint num = 0;\n\n\t\tfor (int i=0; i< N; i++) {\n\t\t\tString wdnum = br.readLine();\n\t\t\tnum = Integer.parseInt(wdnum);\n\t\t\tif (num == 2){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (num % 2 ==0){\n\t\t\t\tans--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j=3; j<=Math.sqrt(num); j+=2){\n\t\t\t\tif (num%j==0) {\n\t\t\t\t\tans--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main (String[] args) throws IOException {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String wdn = br.readLine();
int N = Integer.parseInt(wdn);
int ans = N;
int num = 0;
for (int i=0; i< N; i++) {
String wdnum = br.readLine();
num = Integer.parseInt(wdnum);
if (num == 2){
continue;
}
else if (num % 2 ==0){
ans--;
continue;
}
for (int j=3; j<=Math.sqrt(num); j+=2){
if (num%j==0) {
ans--;
break;
}
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
6,
51
],
[
51,
52
],
[
107,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
56,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
77,
88
],
[
88,
89
],
[
89,
90
],
[
77,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
76,
102
],
[
102,
103
],
[
53,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tstatic boolean isPrime(int a) {\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tstatic boolean isPrime(int a) {\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(a)",
"isPrime",
"a",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static boolean isPrime(int a) {\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}",
"isPrime",
"{\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}",
"if(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}",
"a == 2",
"a",
"2",
"{\n\t\t\treturn(true);\n\t\t}",
"return(true);",
"(true)",
"if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}",
"a < 2 || a % 2 ==0",
"a < 2",
"a",
"2",
"a % 2 ==0",
"a % 2",
"a",
"2",
"0",
"{\n\t\t\treturn(false);\n\t\t}",
"return(false);",
"(false)",
"{\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}",
"for(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(a)",
"i",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}",
"if(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n\t\t\t\t\treturn(false);\n\t\t\t\t}",
"return(false);",
"(false)",
"return(true);",
"(true)",
"int a",
"a",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tstatic boolean isPrime(int a) {\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tif(isPrime(a)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tstatic boolean isPrime(int a) {\n\t\tif(a == 2) {\n\t\t\treturn(true);\n\t\t} else if(a < 2 || a % 2 ==0) {\n\t\t\treturn(false);\n\t\t} else {\n\t\t\tfor(int i = 3; i <= Math.sqrt(a); i++) {\n\t\t\t\tif(a % i == 0) {\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for(int i = 0; i < n; i++) {
int a = sc.nextInt();
if(isPrime(a)) {
count++;
}
}
System.out.println(count);
}
static boolean isPrime(int a) {
if(a == 2) {
return(true);
} else if(a < 2 || a % 2 ==0) {
return(false);
} else {
for(int i = 3; i <= Math.sqrt(a); i++) {
if(a % i == 0) {
return(false);
}
}
return(true);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
119,
5
],
[
119,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
9,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
20,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
36,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
6,
47
],
[
47,
48
],
[
119,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
51,
60
],
[
60,
61
],
[
60,
62
],
[
51,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
51,
84
],
[
84,
85
],
[
85,
86
],
[
51,
87
],
[
87,
88
],
[
87,
89
],
[
51,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
51,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
49,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static int prime(int a) {\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tpublic static int prime(int a) {\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}\n\n}",
"Main",
"public static int prime(int a) {\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}",
"prime",
"{\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}",
"if( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}",
"a == 0 || a == 1",
"a == 0",
"a",
"0",
"a == 1",
"a",
"1",
"{\n\t\t\treturn 0;\n\t\t}",
"return 0;",
"0",
"for (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(a)",
"i",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}",
"{\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}",
"if( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n\t\t\t\treturn 0;\n\t\t\t}",
"return 0;",
"0",
"return 1;",
"1",
"int a",
"a",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int A[] = new int[n];",
"A",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int c = 0;",
"c",
"0",
"for( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tc += prime(A[i]);\n\t\t}",
"{\n\t\t\tc += prime(A[i]);\n\t\t}",
"c += prime(A[i])",
"c",
"prime(A[i])",
"prime",
"A[i]",
"A",
"i",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main{\n\n\tpublic static int prime(int a) {\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}\n\n}",
"public class Main{\n\n\tpublic static int prime(int a) {\n\t\t\n\t\tif( a == 0 || a == 1){\n\t\t\treturn 0;\n\t\t}\n\n\t\tfor (int i = 2; i <= Math.sqrt(a); i++) {\n\t\t\t\n\t\t\tif( a % i == 0){\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn 1;\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint A[] = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint c = 0;\n\t\t\n\t\tfor( int i = 0; i < n; i++){\n\t\t\tc += prime(A[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static int prime(int a) {
if( a == 0 || a == 1){
return 0;
}
for (int i = 2; i <= Math.sqrt(a); i++) {
if( a % i == 0){
return 0;
}
}
return 1;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int A[] = new int[n];
for (int i = 0; i < n; i++) {
A[i] = sc.nextInt();
}
sc.close();
int c = 0;
for( int i = 0; i < n; i++){
c += prime(A[i]);
}
System.out.println(c);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
128,
8
],
[
128,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
35,
48
],
[
48,
49
],
[
49,
50
],
[
35,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
53,
59
],
[
59,
60
],
[
60,
61
],
[
11,
62
],
[
62,
63
],
[
9,
64
],
[
64,
65
],
[
128,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
68,
77
],
[
77,
78
],
[
77,
79
],
[
68,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
68,
105
],
[
105,
106
],
[
66,
107
],
[
107,
108
],
[
128,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
109,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] | [
"import java.io.InputStream;\nimport java.util.Scanner;\n\npublic class Main {\n\tprivate static boolean isPrime(int x) {\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int countPrimes(InputStream ins) {\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}\n\n\tpublic static void main (String[] args) throws Exception {\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}\n}",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate static boolean isPrime(int x) {\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int countPrimes(InputStream ins) {\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}\n\n\tpublic static void main (String[] args) throws Exception {\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}\n}",
"Main",
"private static boolean isPrime(int x) {\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (x == 1) { return false;}",
"x == 1",
"x",
"1",
"{ return false;}",
"return false;",
"false",
"if (x == 2) { return true;}",
"x == 2",
"x",
"2",
"{ return true;}",
"return true;",
"true",
"if (x % 2==0) { return false;}",
"x % 2==0",
"x % 2",
"x",
"2",
"0",
"{ return false;}",
"return false;",
"false",
"for (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i < Math.sqrt(x)+1",
"i",
"Math.sqrt(x)+1",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public static int countPrimes(InputStream ins) {\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}",
"countPrimes",
"{\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}",
"Scanner sc = new Scanner(ins);",
"sc",
"new Scanner(ins)",
"int numOfList = sc.nextInt();",
"numOfList",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int primes = 0;",
"primes",
"0",
"for (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numOfList",
"i",
"numOfList",
"i++",
"i++",
"i",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}",
"isPrime(num)",
"isPrime",
"num",
"{\n\t\t\t\tprimes++;\n\t\t\t}",
"primes++",
"primes",
"return primes;",
"primes",
"InputStream ins",
"ins",
"public static void main (String[] args) throws Exception {\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}",
"main",
"{\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}",
"int primes = countPrimes(System.in);",
"primes",
"countPrimes(System.in)",
"countPrimes",
"System.in",
"System",
"System.in",
"System.out.println(primes)",
"System.out.println",
"System.out",
"System",
"System.out",
"primes",
"String[] args",
"args",
"public class Main {\n\tprivate static boolean isPrime(int x) {\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int countPrimes(InputStream ins) {\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}\n\n\tpublic static void main (String[] args) throws Exception {\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}\n}",
"public class Main {\n\tprivate static boolean isPrime(int x) {\n\n\t\t// Eratosthenes sieve\n\n\t\tif (x == 1) { return false;}\n\t\tif (x == 2) { return true;}\n\t\tif (x % 2==0) { return false;}\n\n\t\tfor (int i = 3; i < Math.sqrt(x)+1; i++) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int countPrimes(InputStream ins) {\n\t\tScanner sc = new Scanner(ins);\n\t\tint numOfList = sc.nextInt();\n\n\t\tint primes = 0;\n\t\tfor (int i = 0; i < numOfList; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tprimes++;\n\t\t\t}\n\t\t}\n\t\treturn primes;\n\t}\n\n\tpublic static void main (String[] args) throws Exception {\n\t\tint primes = countPrimes(System.in);\n\t\tSystem.out.println(primes);\n\t}\n}",
"Main"
] | import java.io.InputStream;
import java.util.Scanner;
public class Main {
private static boolean isPrime(int x) {
// Eratosthenes sieve
if (x == 1) { return false;}
if (x == 2) { return true;}
if (x % 2==0) { return false;}
for (int i = 3; i < Math.sqrt(x)+1; i++) {
if (x % i == 0) {
return false;
}
}
return true;
}
public static int countPrimes(InputStream ins) {
Scanner sc = new Scanner(ins);
int numOfList = sc.nextInt();
int primes = 0;
for (int i = 0; i < numOfList; i++) {
int num = sc.nextInt();
if (isPrime(num)) {
primes++;
}
}
return primes;
}
public static void main (String[] args) throws Exception {
int primes = countPrimes(System.in);
System.out.println(primes);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
4,
13,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
2,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
11,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
9,
61
],
[
61,
62
],
[
7,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
65,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
63,
94
],
[
94,
95
]
] | [
"import java.util.*;\nimport java.util.stream.*;\nclass Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n,ans;\n long num;\n n = input.nextInt();\n ans = 0;\n for (int i = 0; i < n; i++){\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }\n System.out.println(ans);\n }\n public static boolean isPrime(long n){\n for (int i = 2; i*i <= n; i++){\n if (n%i == 0){\n return false;\n }\n }\n return n != 1;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.stream.*;",
"stream.*",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n,ans;\n long num;\n n = input.nextInt();\n ans = 0;\n for (int i = 0; i < n; i++){\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }\n System.out.println(ans);\n }\n public static boolean isPrime(long n){\n for (int i = 2; i*i <= n; i++){\n if (n%i == 0){\n return false;\n }\n }\n return n != 1;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n,ans;\n long num;\n n = input.nextInt();\n ans = 0;\n for (int i = 0; i < n; i++){\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner input = new Scanner(System.in);\n int n,ans;\n long num;\n n = input.nextInt();\n ans = 0;\n for (int i = 0; i < n; i++){\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }\n System.out.println(ans);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int n",
"n",
"ans;",
"ans",
"long num;",
"num",
"n = input.nextInt()",
"n",
"input.nextInt()",
"input.nextInt",
"input",
"ans = 0",
"ans",
"0",
"for (int i = 0; i < n; i++){\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }",
"{\n num = input.nextLong();\n if (isPrime(num)){\n ans += 1;\n }\n }",
"num = input.nextLong()",
"num",
"input.nextLong()",
"input.nextLong",
"input",
"if (isPrime(num)){\n ans += 1;\n }",
"isPrime(num)",
"isPrime",
"num",
"{\n ans += 1;\n }",
"ans += 1",
"ans",
"1",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public static boolean isPrime(long n){\n for (int i = 2; i*i <= n; i++){\n if (n%i == 0){\n return false;\n }\n }\n return n != 1;\n }",
"isPrime",
"{\n for (int i = 2; i*i <= n; i++){\n if (n%i == 0){\n return false;\n }\n }\n return n != 1;\n }",
"for (int i = 2; i*i <= n; i++){\n if (n%i == 0){\n return false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i*i <= n",
"i*i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (n%i == 0){\n return false;\n }\n }",
"{\n if (n%i == 0){\n return false;\n }\n }",
"if (n%i == 0){\n return false;\n }",
"n%i == 0",
"n%i",
"n",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return n != 1;",
"n != 1",
"n",
"1",
"long n",
"n"
] | import java.util.*;
import java.util.stream.*;
class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n,ans;
long num;
n = input.nextInt();
ans = 0;
for (int i = 0; i < n; i++){
num = input.nextLong();
if (isPrime(num)){
ans += 1;
}
}
System.out.println(ans);
}
public static boolean isPrime(long n){
for (int i = 2; i*i <= n; i++){
if (n%i == 0){
return false;
}
}
return n != 1;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
93,
5
],
[
93,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
11,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
8,
39
],
[
39,
40
],
[
6,
41
],
[
41,
42
],
[
93,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
45,
54
],
[
54,
55
],
[
45,
56
],
[
56,
57
],
[
56,
58
],
[
45,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
45,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
43,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static boolean checkPrimeNum(int x) {\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static boolean checkPrimeNum(int x) {\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n}",
"Main",
"public static boolean checkPrimeNum(int x) {\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"checkPrimeNum",
"{\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"int border = (int)Math.sqrt(x) + 1;",
"border",
"(int)Math.sqrt(x) + 1",
"(int)Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"1",
"for(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < border",
"i",
"border",
"i++",
"i++",
"i",
"{\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int num = scan.nextInt();",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int x;",
"x",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num",
"i",
"num",
"i++",
"i++",
"i",
"{\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"x = scan.nextInt()",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}",
"checkPrimeNum(x)",
"checkPrimeNum",
"x",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static boolean checkPrimeNum(int x) {\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n}",
"public class Main {\n\n\tpublic static boolean checkPrimeNum(int x) {\n\t\tint border = (int)Math.sqrt(x) + 1;\n\n\t\tfor(int i = 2; i < border; i++) {\n\t\t\tif(x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint x;\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < num; i++) {\n\t\t\tx = scan.nextInt();\n\t\t\tif(checkPrimeNum(x)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static boolean checkPrimeNum(int x) {
int border = (int)Math.sqrt(x) + 1;
for(int i = 2; i < border; i++) {
if(x % i == 0) {
return false;
}
}
return true;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int x;
int count = 0;
for(int i = 0; i < num; i++) {
x = scan.nextInt();
if(checkPrimeNum(x)) {
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
41,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
0,
13,
17,
0,
13,
20,
17,
4,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
14,
18,
13,
13,
30,
40,
13,
0,
18,
13,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
18,
13,
13,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
14,
18,
13,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
18,
13,
13,
1,
0,
13,
13,
30,
0,
18,
13,
13,
17,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
6
],
[
6,
7
],
[
6,
8
],
[
121,
9
],
[
9,
10
],
[
121,
11
],
[
11,
12
],
[
121,
13
],
[
13,
14
],
[
121,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
121,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
29,
31
],
[
25,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
25,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
121,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
65,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
80,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
98,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
98,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] | [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n int n, count;\n boolean[] p;\n\n void run(){\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n } \n\n void setP(){\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n int n, count;\n boolean[] p;\n\n void run(){\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n } \n\n void setP(){\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n",
"n",
"count;",
"count",
"boolean[] p;",
"p",
"public static void main(String[] args){\n\tnew Main().run();\n }",
"main",
"{\n\tnew Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"void run(){\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n }",
"run",
"{\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n }",
"count = 0",
"count",
"0",
"p = new boolean[100000000]",
"p",
"new boolean[100000000]",
"100000000",
"setP()",
"setP",
"while(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }",
"p[n]",
"p",
"n",
"{\n\t\tcount++;\n\t \tp[n] = false;\n\t }",
"count++",
"count",
"p[n] = false",
"p[n]",
"p",
"n",
"false",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"void setP(){\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }",
"setP",
"{\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }",
"Arrays.fill(p, true)",
"Arrays.fill",
"Arrays",
"p",
"true",
"p[0] = p[1] = false",
"p[0]",
"p",
"0",
"p[1] = false",
"p[1]",
"p",
"1",
"false",
"for(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;",
"int i=2;",
"int i=2;",
"i",
"2",
"i<p.length",
"i",
"p.length",
"p",
"p.length",
"i++",
"i++",
"i",
"if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;",
"if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;",
"p[i]",
"p",
"i",
"for(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;",
"int j=i*2;",
"int j=i*2;",
"j",
"i*2",
"i",
"2",
"j<p.length",
"j",
"p.length",
"p",
"p.length",
"j+=i",
"j+=i",
"j",
"i",
"p[j] = false;",
"p[j] = false",
"p[j]",
"p",
"j",
"false",
"public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n int n, count;\n boolean[] p;\n\n void run(){\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n } \n\n void setP(){\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n int n, count;\n boolean[] p;\n\n void run(){\n\tcount = 0;\n\tp = new boolean[100000000];\n\tsetP();\n\twhile(sc.hasNext()){\n\t n = sc.nextInt();\n\t if(p[n]) {\n\t\tcount++;\n\t \tp[n] = false;\n\t }\n\t}\n\tSystem.out.println(count);\n } \n\n void setP(){\n\tArrays.fill(p, true);\n\tp[0] = p[1] = false;\n\tfor(int i=2; i<p.length; i++)\n\t if(p[i])\n\t\tfor(int j=i*2; j<p.length; j+=i)\n\t\t p[j] = false;\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
new Main().run();
}
Scanner sc = new Scanner(System.in);
int n, count;
boolean[] p;
void run(){
count = 0;
p = new boolean[100000000];
setP();
while(sc.hasNext()){
n = sc.nextInt();
if(p[n]) {
count++;
p[n] = false;
}
}
System.out.println(count);
}
void setP(){
Arrays.fill(p, true);
p[0] = p[1] = false;
for(int i=2; i<p.length; i++)
if(p[i])
for(int j=i*2; j<p.length; j+=i)
p[j] = false;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
29,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
14,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
12,
65
],
[
65,
66
],
[
10,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
80,
94
],
[
94,
95
],
[
95,
96
],
[
80,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
69,
110
],
[
110,
111
],
[
67,
112
],
[
112,
113
]
] | [
"/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\t\n\t\tlong num;\n\t\tint result = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic boolean isPrime(long x) {\n\t\tboolean result = true;\n\t\t\n\t\tif (x == 2) {\n\t\t\treturn result;\n\t\t}\n\n\t\tfor (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\t\n\t\tlong num;\n\t\tint result = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic boolean isPrime(long x) {\n\t\tboolean result = true;\n\t\t\n\t\tif (x == 2) {\n\t\t\treturn result;\n\t\t}\n\n\t\tfor (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\t\n\t\tlong num;\n\t\tint result = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(result);\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\t\n\t\tlong num;\n\t\tint result = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(result);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = Integer.parseInt(scanner.nextLine());",
"n",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"long num;",
"num",
"int result = 0;",
"result",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\tnum = Long.parseLong(scanner.nextLine());\n\t\t\t\n\t\t\tif (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t\t\n\t\t}",
"num = Long.parseLong(scanner.nextLine())",
"num",
"Long.parseLong(scanner.nextLine())",
"Long.parseLong",
"Long",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"if (isPrime(num)) {\n\t\t\t\tresult++;\n\t\t\t}",
"isPrime(num)",
"isPrime",
"num",
"{\n\t\t\t\tresult++;\n\t\t\t}",
"result++",
"result",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"static boolean isPrime(long x) {\n\t\tboolean result = true;\n\t\t\n\t\tif (x == 2) {\n\t\t\treturn result;\n\t\t}\n\n\t\tfor (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}",
"isPrime",
"{\n\t\tboolean result = true;\n\t\t\n\t\tif (x == 2) {\n\t\t\treturn result;\n\t\t}\n\n\t\tfor (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}",
"boolean result = true;",
"result",
"true",
"if (x == 2) {\n\t\t\treturn result;\n\t\t}",
"x == 2",
"x",
"2",
"{\n\t\t\treturn result;\n\t\t}",
"return result;",
"result",
"for (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"long j = 2;",
"long j = 2;",
"j",
"2",
"j <= Math.ceil(Math.sqrt(x))",
"j",
"Math.ceil(Math.sqrt(x))",
"Math.ceil",
"Math",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"j++",
"j++",
"j",
"{\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\t\n\t\t\tif (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (x % j == 0) {\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}",
"x % j == 0",
"x % j",
"x",
"j",
"0",
"{\n\t\t\t\tresult = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}",
"result = false",
"result",
"false",
"break;",
"return result;",
"result",
"long x",
"x"
] | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
long num;
int result = 0;
for (int i = 0; i < n; i++) {
num = Long.parseLong(scanner.nextLine());
if (isPrime(num)) {
result++;
}
}
System.out.println(result);
}
static boolean isPrime(long x) {
boolean result = true;
if (x == 2) {
return result;
}
for (long j = 2; j <= Math.ceil(Math.sqrt(x)) ; j++) {
if (x % j == 0) {
result = false;
break;
}
}
return result;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
13,
4,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
2,
4,
18,
13,
13,
17,
14,
2,
13,
17,
29,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
137,
14
],
[
137,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
25,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
37,
38
],
[
17,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
17,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
74,
81
],
[
73,
82
],
[
82,
83
],
[
17,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
15,
90
],
[
90,
91
],
[
137,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
99,
104
],
[
94,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
94,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
124,
130
],
[
130,
131
],
[
94,
132
],
[
132,
133
],
[
92,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.Scanner;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.lang.Math;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}\n\t\n\tprivate static boolean isPrime(int number){\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}\n\t\n\tprivate static boolean isPrime(int number){\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}",
"main",
"{\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}",
"int i",
"i",
"size",
"size",
"count = 0;",
"count",
"0",
"List<Integer> numbers = new ArrayList<Integer>();",
"numbers",
"new ArrayList<Integer>()",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"size = Integer.parseInt(in.nextLine())",
"size",
"Integer.parseInt(in.nextLine())",
"Integer.parseInt",
"Integer",
"in.nextLine()",
"in.nextLine",
"in",
"for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));",
"i = 0;",
"i = 0",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"numbers.add(Integer.parseInt(in.nextLine()));",
"numbers.add(Integer.parseInt(in.nextLine()))",
"numbers.add",
"numbers",
"Integer.parseInt(in.nextLine())",
"Integer.parseInt",
"Integer",
"in.nextLine()",
"in.nextLine",
"in",
"for(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}",
"{\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}",
"if(isPrime(numbers.get(i)) == true) count++;",
"isPrime(numbers.get(i)) == true",
"isPrime(numbers.get(i))",
"isPrime",
"numbers.get(i)",
"numbers.get",
"numbers",
"i",
"true",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean isPrime(int number){\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}",
"isPrime",
"{\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}",
"int i;",
"i",
"int route = (int)Math.sqrt(number) + 1;",
"route",
"(int)Math.sqrt(number) + 1",
"(int)Math.sqrt(number)",
"Math.sqrt",
"Math",
"number",
"1",
"if(number == 1) return false;",
"number == 1",
"number",
"1",
"return false;",
"false",
"for(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}",
"i = 2;",
"i = 2",
"i",
"2",
"i < route",
"i",
"route",
"i++",
"i++",
"i",
"{\n\t\t\tif(number % i == 0) return false;\n\t\t}",
"{\n\t\t\tif(number % i == 0) return false;\n\t\t}",
"if(number % i == 0) return false;",
"number % i == 0",
"number % i",
"number",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int number",
"number",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}\n\t\n\tprivate static boolean isPrime(int number){\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tint i, size, count = 0;\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tsize = Integer.parseInt(in.nextLine());\n\t\tfor(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));\n\n\t\tfor(i = 0; i < size; i++){\n\t\t\tif(isPrime(numbers.get(i)) == true) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t}\n\t\n\tprivate static boolean isPrime(int number){\n\t\tint i;\n\t\tint route = (int)Math.sqrt(number) + 1;\n\n\t\tif(number == 1) return false;\n\n\t\tfor(i = 2; i < route; i++){\n\t\t\tif(number % i == 0) return false;\n\t\t}\n\t\treturn true;\t\n\t}\n}",
"Main"
] | import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
import java.lang.Math;
public class Main {
public static void main(String[] args){
int i, size, count = 0;
List<Integer> numbers = new ArrayList<Integer>();
Scanner in = new Scanner(System.in);
size = Integer.parseInt(in.nextLine());
for(i = 0; i < size; i++) numbers.add(Integer.parseInt(in.nextLine()));
for(i = 0; i < size; i++){
if(isPrime(numbers.get(i)) == true) count++;
}
System.out.println(count);
}
private static boolean isPrime(int number){
int i;
int route = (int)Math.sqrt(number) + 1;
if(number == 1) return false;
for(i = 2; i < route; i++){
if(number % i == 0) return false;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
6,
48
],
[
48,
49
],
[
110,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
52,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
52,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
52,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
82,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
52,
105
],
[
105,
106
],
[
50,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String args[]){\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }//main\n \n private static boolean isPrime(int a) {\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }//isPrime\n}//main",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String args[]){\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }//main\n \n private static boolean isPrime(int a) {\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }//isPrime\n}//main",
"Main",
"public static void main(String args[]){\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }//main",
"main",
"{\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int a = input.nextInt();",
"a",
"input.nextInt()",
"input.nextInt",
"input",
"int count = 0;",
"count",
"0",
"for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <a",
"i",
"a",
"i++",
"i++",
"i",
"{\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for",
"{\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }",
"if(isPrime(input.nextInt())){\n count++;\n }//if",
"isPrime(input.nextInt())",
"isPrime",
"input.nextInt()",
"input.nextInt",
"input",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"private static boolean isPrime(int a) {\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }//isPrime",
"isPrime",
"{\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }",
"if(a < 2) {\n return false;\n }//if ",
"a < 2",
"a",
"2",
"{\n return false;\n }",
"return false;",
"false",
"if(a == 2) {\n return true;\n }//if",
"a == 2",
"a",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(a % 2 == 0) {\n return false;\n }//if",
"a % 2 == 0",
"a % 2",
"a",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"double sqrt = Math.sqrt(a);",
"sqrt",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrt",
"i",
"sqrt",
"i += 2",
"i += 2",
"i",
"2",
"{\n if (a % i == 0) {\n return false;\n }//if\n }//for",
"{\n if (a % i == 0) {\n return false;\n }//if\n }",
"if (a % i == 0) {\n return false;\n }//if",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int a",
"a",
"public class Main{\n public static void main(String args[]){\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }//main\n \n private static boolean isPrime(int a) {\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }//isPrime\n}//main",
"public class Main{\n public static void main(String args[]){\n Scanner input = new Scanner(System.in);\n int a = input.nextInt();\n int count = 0;\n for(int i = 0; i <a; i++ ){\n if(isPrime(input.nextInt())){\n count++;\n }//if\n }//for\n System.out.println(count);\n }//main\n \n private static boolean isPrime(int a) {\n if(a < 2) {\n return false;\n }//if \n if(a == 2) {\n return true;\n }//if\n if(a % 2 == 0) {\n return false;\n }//if\n \n double sqrt = Math.sqrt(a);\n for (int i = 3; i <= sqrt; i += 2) {\n if (a % i == 0) {\n return false;\n }//if\n }//for\n return true;\n }//isPrime\n}//main",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner input = new Scanner(System.in);
int a = input.nextInt();
int count = 0;
for(int i = 0; i <a; i++ ){
if(isPrime(input.nextInt())){
count++;
}//if
}//for
System.out.println(count);
}//main
private static boolean isPrime(int a) {
if(a < 2) {
return false;
}//if
if(a == 2) {
return true;
}//if
if(a % 2 == 0) {
return false;
}//if
double sqrt = Math.sqrt(a);
for (int i = 3; i <= sqrt; i += 2) {
if (a % i == 0) {
return false;
}//if
}//for
return true;
}//isPrime
}//main
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
0,
13,
4,
18,
13,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
46,
54
],
[
54,
55
],
[
54,
56
],
[
46,
57
],
[
57,
58
],
[
58,
59
],
[
46,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] | [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[]args){\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[]args){\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }\n}",
"Main",
"public static void main(String[]args){\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }",
"main",
"{\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }",
"int i",
"i",
"j",
"j",
"c",
"c",
"kazu",
"kazu",
"csosu=0;",
"csosu",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"i=sc.nextInt()",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}",
"j=0;",
"j=0",
"j",
"0",
"j<i",
"j",
"i",
"j++",
"j++",
"j",
"{\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}",
"{\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}",
"kazu=sc.nextInt()",
"kazu",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t }",
"c=(int)Math.sqrt(kazu);",
"c=(int)Math.sqrt(kazu)",
"c",
"(int)Math.sqrt(kazu)",
"Math.sqrt",
"Math",
"kazu",
"c>1",
"c",
"1",
"c--",
"c--",
"c",
"{\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t }",
"{\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t }",
"if(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}",
"kazu%c==0",
"kazu%c",
"kazu",
"c",
"0",
"{\n\t\t csosu+=1;\n\t\t break;\n\t\t}",
"csosu+=1",
"csosu",
"1",
"break;",
"csosu=i-csosu",
"csosu",
"i-csosu",
"i",
"csosu",
"System.out.println(csosu)",
"System.out.println",
"System.out",
"System",
"System.out",
"csosu",
"String[]args",
"args",
"public class Main{\n public static void main(String[]args){\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }\n}",
"public class Main{\n public static void main(String[]args){\n\tint i,j,c,kazu,csosu=0;\n\tScanner sc = new Scanner(System.in);\n\t i=sc.nextInt();\n\tfor(j=0;j<i;j++){\n\t kazu=sc.nextInt();\n\t for(c=(int)Math.sqrt(kazu);c>1;c--){\n\t\tif(kazu%c==0){\n\t\t csosu+=1;\n\t\t break;\n\t\t}\n\t } \n\t}\n\tcsosu=i-csosu;\n\tSystem.out.println(csosu);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[]args){
int i,j,c,kazu,csosu=0;
Scanner sc = new Scanner(System.in);
i=sc.nextInt();
for(j=0;j<i;j++){
kazu=sc.nextInt();
for(c=(int)Math.sqrt(kazu);c>1;c--){
if(kazu%c==0){
csosu+=1;
break;
}
}
}
csosu=i-csosu;
System.out.println(csosu);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
30,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
0,
13,
2,
13,
17,
29,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
20,
4,
18,
18,
13,
13,
14,
2,
4,
18,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
[
14,
15
],
[
4,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
19,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
26,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
50,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
18,
65
],
[
65,
66
],
[
0,
67
],
[
134,
68
],
[
134,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
71,
80
],
[
80,
81
],
[
80,
82
],
[
71,
84
],
[
84,
85
],
[
84,
86
],
[
71,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
99,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
71,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
71,
128
],
[
128,
129
],
[
129,
130
],
[
69,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.util.Scanner;\nclass Prime{\n\tdouble x;\n\tPrime(int X){\n\t\tx=X;\n\t}\n\tboolean isPrime() {\n\t\tif(x==2) {\n\t\t\treturn true;\n\t\t}\n\t\telse if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Prime{\n\tdouble x;\n\tPrime(int X){\n\t\tx=X;\n\t}\n\tboolean isPrime() {\n\t\tif(x==2) {\n\t\t\treturn true;\n\t\t}\n\t\telse if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"Prime",
"double x;",
"x",
"Prime(int X){\n\t\tx=X;\n\t}",
"Prime",
"{\n\t\tx=X;\n\t}",
"x=X",
"x",
"X",
"int X",
"X",
"boolean isPrime() {\n\t\tif(x==2) {\n\t\t\treturn true;\n\t\t}\n\t\telse if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif(x==2) {\n\t\t\treturn true;\n\t\t}\n\t\telse if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if(x==2) {\n\t\t\treturn true;\n\t\t}\n\t\telse if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}",
"x==2",
"x",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if(x<2||x%2==0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}",
"x<2||x%2==0",
"x<2",
"x",
"2",
"x%2==0",
"x%2",
"x",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"{\n\t\t\tint i=3;\n\t\t\twhile(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}\n\t\t}",
"int i=3;",
"i",
"3",
"while(i<=Math.sqrt(x)) {\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}",
"i<=Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\t\t\t\tif(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti=i+2;\n\t\t\t}",
"if(x%i==0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"x%i==0",
"x%i",
"x",
"i",
"0",
"{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"return false;",
"false",
"i=i+2",
"i",
"i+2",
"i",
"2",
"return true;",
"true",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Prime [] p=new Prime [n];",
"p",
"new Prime [n]",
"n",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}",
"p[i]=new Prime(sc.nextInt())",
"p[i]",
"p",
"i",
"new Prime(sc.nextInt())",
"p[i].isPrime()",
"p[i].isPrime",
"p[i]",
"p",
"i",
"if(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}",
"p[i].isPrime()==true",
"p[i].isPrime()",
"p[i].isPrime",
"p[i]",
"p",
"i",
"true",
"{\n\t\t\t\tsum+=1;\n\t\t\t}",
"sum+=1",
"sum",
"1",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tPrime [] p=new Prime [n];\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp[i]=new Prime(sc.nextInt());\n\t\t\tp[i].isPrime();\n\t\t\tif(p[i].isPrime()==true) {\n\t\t\t\tsum+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\t}\n}",
"Main"
] | import java.util.Scanner;
class Prime{
double x;
Prime(int X){
x=X;
}
boolean isPrime() {
if(x==2) {
return true;
}
else if(x<2||x%2==0) {
return false;
}
else {
int i=3;
while(i<=Math.sqrt(x)) {
if(x%i==0) {
return false;
}
i=i+2;
}
}
return true;
}
}
public class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
Prime [] p=new Prime [n];
int sum=0;
for(int i=0;i<n;i++) {
p[i]=new Prime(sc.nextInt());
p[i].isPrime();
if(p[i].isPrime()==true) {
sum+=1;
}
}
System.out.println(sum);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
13,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
61,
67
],
[
67,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
138,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
83,
82
],
[
90,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
90,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
93,
95
],
[
80,
96
],
[
96,
97
],
[
97,
98
],
[
79,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
79,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
108,
119
],
[
119,
120
],
[
120,
121
],
[
108,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
124,
130
],
[
130,
131
],
[
131,
132
],
[
79,
133
],
[
133,
134
],
[
77,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(int a) {\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }\n\t\t\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(int a) {\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }\n\t\t\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}",
"int[] list;",
"list",
"int length;",
"length",
"int primes = 0;",
"primes",
"0",
"Scanner keyboard = new Scanner(System.in);",
"keyboard",
"new Scanner(System.in)",
"length = keyboard.nextInt()",
"length",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"list = new int[length]",
"list",
"new int[length]",
"length",
"for(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}",
"{\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}",
"list[i] = keyboard.nextInt()",
"list[i]",
"list",
"i",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"for(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}",
"{\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}",
"if(isPrime(list[i])) primes++;",
"isPrime(list[i])",
"isPrime",
"list[i]",
"list",
"i",
"primes++",
"primes",
"System.out.println(primes)",
"System.out.println",
"System.out",
"System",
"System.out",
"primes",
"String[] args",
"args",
"public static boolean isPrime(int a) {\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }",
"isPrime",
"{\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }",
"if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }",
"a == 2 || a == 3 || a == 5 || a == 7",
"a == 5",
"a == 2 || a == 3 || a == 5 || a == 7",
"a == 2",
"a",
"2",
"a == 3",
"a",
"3",
"a == 5",
"a",
"5",
"a == 7",
"a",
"7",
"{\n\t\t return true;\n\t\t }",
"return true;",
"true",
"if(a % 2 == 0) {\n\t\t return false;\n\t\t }",
"a % 2 == 0",
"a % 2",
"a",
"2",
"0",
"{\n\t\t return false;\n\t\t }",
"return false;",
"false",
"for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }",
"int j=3;",
"int j=3;",
"j",
"3",
"j <= Math.sqrt(a)",
"j",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"j++",
"j++",
"j",
"{\n\t if(a % j == 0){ \n\t return false;}\n\t }",
"{\n\t if(a % j == 0){ \n\t return false;}\n\t }",
"if(a % j == 0){ \n\t return false;}",
"a % j == 0",
"a % j",
"a",
"j",
"0",
"{ \n\t return false;}",
"return false;",
"false",
"return true;",
"true",
"int a",
"a",
"public class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(int a) {\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }\n\t\t\n}",
"public class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint[] list;\n\t\tint length;\n\t\tint primes = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tlength = keyboard.nextInt();\n\t\t\n\t\tlist = new int[length];\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tlist[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tif(isPrime(list[i])) primes++;\n\t\t}\n\t\t\n\t\tSystem.out.println(primes);\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(int a) {\n\t\t\n\t if(a == 2 || a == 3 || a == 5 || a == 7) {\n\t\t return true;\n\t\t }\n\t if(a % 2 == 0) {\n\t\t return false;\n\t\t }\n\t for(int j=3;j <= Math.sqrt(a);j++){\n\t if(a % j == 0){ \n\t return false;}\n\t }\n\t return true;\n\t }\n\t\t\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
int[] list;
int length;
int primes = 0;
Scanner keyboard = new Scanner(System.in);
length = keyboard.nextInt();
list = new int[length];
for(int i = 0; i < length; i++) {
list[i] = keyboard.nextInt();
}
for(int i = 0; i < length; i++) {
if(isPrime(list[i])) primes++;
}
System.out.println(primes);
}
public static boolean isPrime(int a) {
if(a == 2 || a == 3 || a == 5 || a == 7) {
return true;
}
if(a % 2 == 0) {
return false;
}
for(int j=3;j <= Math.sqrt(a);j++){
if(a % j == 0){
return false;}
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
0,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
8,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
6,
63
],
[
63,
64
],
[
103,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
71,
82
],
[
82,
83
],
[
83,
84
],
[
71,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
67,
98
],
[
98,
99
],
[
65,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static int sosu(long num) {\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static int sosu(long num) {\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count=0;",
"count",
"0",
"long temp=0;",
"temp",
"0",
"for(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}",
"{\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}",
"temp=sc.nextLong()",
"temp",
"sc.nextLong()",
"sc.nextLong",
"sc",
"if(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}",
"temp==2||temp%2!=0",
"temp==2",
"temp",
"2",
"temp%2!=0",
"temp%2",
"temp",
"2",
"0",
"{\n\t\t\t\tcount += sosu(temp);\n\t\t\t}",
"count += sosu(temp)",
"count",
"sosu(temp)",
"sosu",
"temp",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static int sosu(long num) {\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"sosu",
"{\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"int res=1;",
"res",
"1",
"for(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(num)",
"i",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"i++",
"i++",
"i",
"{\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}",
"num%i==0",
"num%i",
"num",
"i",
"0",
"{\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}",
"res=0",
"res",
"0",
"break;",
"return res;",
"res",
"long num",
"num",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static int sosu(long num) {\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count=0;\n\t\tlong temp=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ttemp=sc.nextLong();\n\t\t\tif(temp==2||temp%2!=0) {\n\t\t\t\tcount += sosu(temp);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static int sosu(long num) {\n\t\tint res=1;\n\t\tfor(int i=2;i<=Math.sqrt(num);i++) {\n\t\t\tif(num%i==0) {\n\t\t\t\tres=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count=0;
long temp=0;
for(int i=0;i<n;i++) {
temp=sc.nextLong();
if(temp==2||temp%2!=0) {
count += sosu(temp);
}
}
System.out.println(count);
}
public static int sosu(long num) {
int res=1;
for(int i=2;i<=Math.sqrt(num);i++) {
if(num%i==0) {
res=0;
break;
}
}
return res;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
6,
50
],
[
50,
51
],
[
103,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
54,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
61,
71
],
[
71,
72
],
[
54,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
73,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
73,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
54,
98
],
[
98,
99
],
[
52,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.util.Scanner;\n\n/**\n * 素数判定\n * @author nobu\n * @see <a href=\"http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_C&lang=ja\">ALDS1_1_C</a>\n */\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int answer = 0;",
"answer",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}",
"{\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}",
"if (isPrime(sc.nextInt())) answer++;",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"answer++",
"answer",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"private static boolean isPrime(int x) {\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"if (x == 2) return true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if (x < 2 || x % 2 == 0) return false;",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"for (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"{\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"if (x % i == 0) return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint answer = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) answer++;\n\t\t}\n\n\t\tSystem.out.println(answer);\n\n\t\tsc.close();\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tif (x == 2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
/**
* 素数判定
* @author nobu
* @see <a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_C&lang=ja">ALDS1_1_C</a>
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int answer = 0;
for (int i = 0; i < n; i++) {
if (isPrime(sc.nextInt())) answer++;
}
System.out.println(answer);
sc.close();
}
private static boolean isPrime(int x) {
if (x == 2) return true;
if (x < 2 || x % 2 == 0) return false;
for (int i = 3; i <= Math.sqrt(x); i += 2) {
if (x % i == 0) return false;
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
18,
29
],
[
29,
30
],
[
30,
31
],
[
18,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
40,
41
],
[
17,
42
],
[
42,
43
],
[
15,
44
],
[
44,
45
],
[
13,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
52,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
59,
68
],
[
68,
69
],
[
68,
70
],
[
59,
72
],
[
72,
73
],
[
72,
74
],
[
59,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
59,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
97,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
116,
117
],
[
59,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
46,
124
],
[
124,
125
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nimport javax.lang.model.util.ElementScanner6;\n\nclass Main {\n public static boolean isPrime(int a) {\n for (int i = 2; i <= Math.sqrt(a); i++) {\n if (a % i == 0)\n return false;\n }\n return true;\n }\n\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import javax.lang.model.util.ElementScanner6;",
"ElementScanner6",
"javax.lang.model.util",
"class Main {\n public static boolean isPrime(int a) {\n for (int i = 2; i <= Math.sqrt(a); i++) {\n if (a % i == 0)\n return false;\n }\n return true;\n }\n\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n}",
"Main",
"public static boolean isPrime(int a) {\n for (int i = 2; i <= Math.sqrt(a); i++) {\n if (a % i == 0)\n return false;\n }\n return true;\n }",
"isPrime",
"{\n for (int i = 2; i <= Math.sqrt(a); i++) {\n if (a % i == 0)\n return false;\n }\n return true;\n }",
"for (int i = 2; i <= Math.sqrt(a); i++) {\n if (a % i == 0)\n return false;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(a)",
"i",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"i++",
"i++",
"i",
"{\n if (a % i == 0)\n return false;\n }",
"{\n if (a % i == 0)\n return false;\n }",
"if (a % i == 0)\n return false;",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int a",
"a",
"public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n int n = Integer.parseInt(br.readLine());\n int[] nums = new int[n];\n int count = 0;\n\n for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }\n System.out.println(count);\n }",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] nums = new int[n];",
"nums",
"new int[n]",
"n",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++)\n nums[i] = Integer.parseInt(br.readLine());",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"nums[i] = Integer.parseInt(br.readLine());",
"nums[i] = Integer.parseInt(br.readLine())",
"nums[i]",
"nums",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n if (isPrime(nums[i]))\n count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (isPrime(nums[i]))\n count++;\n }",
"{\n if (isPrime(nums[i]))\n count++;\n }",
"if (isPrime(nums[i]))\n count++;",
"isPrime(nums[i])",
"isPrime",
"nums[i]",
"nums",
"i",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.lang.model.util.ElementScanner6;
class Main {
public static boolean isPrime(int a) {
for (int i = 2; i <= Math.sqrt(a); i++) {
if (a % i == 0)
return false;
}
return true;
}
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int n = Integer.parseInt(br.readLine());
int[] nums = new int[n];
int count = 0;
for (int i = 0; i < n; i++)
nums[i] = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
if (isPrime(nums[i]))
count++;
}
System.out.println(count);
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
30,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
13,
17,
17,
30,
0,
13,
17,
30,
0,
13,
17,
41,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
158,
8
],
[
158,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
12,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
19,
31
],
[
31,
32
],
[
31,
33
],
[
19,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
19,
58
],
[
58,
59
],
[
59,
60
],
[
19,
61
],
[
61,
62
],
[
61,
63
],
[
19,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
19,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
9,
84
],
[
84,
85
],
[
158,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
107,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
123,
127
],
[
117,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
128,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
88,
153
],
[
153,
154
],
[
86,
155
],
[
155,
156
],
[
0,
157
],
[
157,
158
],
[
157,
159
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(final int num) {\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(final int num) {\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"try {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"Exception e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t}",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"final int n = Integer.parseInt(reader.readLine());",
"n",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"final int[] list = new int[n];",
"list",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}",
"{\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}",
"list[i] = Integer.parseInt(reader.readLine())",
"list[i]",
"list",
"i",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"reader.close()",
"reader.close",
"reader",
"int count = 0;",
"count",
"0",
"for (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}",
"int num",
"list",
"{\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}",
"{\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}",
"if (isPrime(num)) count++;",
"isPrime(num)",
"isPrime",
"num",
"count++",
"count",
"System.out.println(String.valueOf(count))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(count)",
"String.valueOf",
"String",
"count",
"String[] args",
"args",
"public static boolean isPrime(final int num) {\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}",
"isPrime",
"{\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}",
"boolean isPrime;",
"isPrime",
"if (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num < 2",
"num",
"2",
"{\n\t\t\tisPrime = false;\n\t\t\t\n\t\t}",
"isPrime = false",
"isPrime",
"false",
"if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\tisPrime = true;\n\t\t\t\n\t\t}",
"isPrime = true",
"isPrime",
"true",
"if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{ \n\t\t\tisPrime = false;\n\t\t\t\n\t\t}",
"isPrime = false",
"isPrime",
"false",
"{\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"isPrime = true",
"isPrime",
"true",
"final int end = (int)Math.pow(num, 0.5);",
"end",
"(int)Math.pow(num, 0.5)",
"Math.pow",
"Math",
"num",
"0.5",
"for (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= end",
"i",
"end",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"return isPrime;",
"isPrime",
"final int num",
"num",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(final int num) {\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlist[i] = Integer.parseInt(reader.readLine());\n\t\t\t}\n\t\t\treader.close();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int num : list) {\n\t\t\t\tif (isPrime(num)) count++;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.valueOf(count));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static boolean isPrime(final int num) {\n\t\tboolean isPrime;\n\t\t\n\t\tif (num < 2) {\n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else if (num == 2) {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t} else if (num % 2 == 0) { \n\t\t\tisPrime = false;\n\t\t\t\n\t\t} else {\n\t\t\tisPrime = true;\n\t\t\t\n\t\t\tfinal int end = (int)Math.pow(num, 0.5);\n\t\t\tfor (int i = 3; i <= end; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
final int n = Integer.parseInt(reader.readLine());
final int[] list = new int[n];
for (int i = 0; i < n; i++) {
list[i] = Integer.parseInt(reader.readLine());
}
reader.close();
int count = 0;
for (int num : list) {
if (isPrime(num)) count++;
}
System.out.println(String.valueOf(count));
} catch (Exception e) {
e.printStackTrace();
}
}
public static boolean isPrime(final int num) {
boolean isPrime;
if (num < 2) {
isPrime = false;
} else if (num == 2) {
isPrime = true;
} else if (num % 2 == 0) {
isPrime = false;
} else {
isPrime = true;
final int end = (int)Math.pow(num, 0.5);
for (int i = 3; i <= end; i += 2) {
if (num % i == 0) {
isPrime = false;
break;
}
}
}
return isPrime;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
128,
5
],
[
128,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
44,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
6,
58
],
[
58,
59
],
[
128,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
62,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
73,
85
],
[
85,
86
],
[
62,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
62,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
93,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
107,
121
],
[
121,
122
],
[
62,
123
],
[
123,
124
],
[
60,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }\n\n public static boolean check(int num) {\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }\n\n public static boolean check(int num) {\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] num = new int[n];",
"num",
"new int[n]",
"n",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }",
"{\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }",
"num[i] = in.nextInt()",
"num[i]",
"num",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"if (check(num[i])) count++;",
"check(num[i])",
"check",
"num[i]",
"num",
"i",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean check(int num) {\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }",
"check",
"{\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }",
"if (num == 2 || num == 3) return true; // 两个较小的数另外处理",
"num == 2 || num == 3",
"num == 2",
"num",
"2",
"num == 3",
"num",
"3",
"return true; // 两个较小的数另外处理",
"true",
"if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数",
"num % 6 != 1 && num % 6 != 5",
"num % 6 != 1",
"num % 6",
"num",
"6",
"1",
"num % 6 != 5",
"num % 6",
"num",
"6",
"5",
"return false; // 不在6的倍数两侧的一定不是质数",
"false",
"int tmp = (int) Math.sqrt(num);",
"tmp",
"(int) Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }",
"int i = 5;",
"int i = 5;",
"i",
"5",
"i <= tmp",
"i",
"tmp",
"i+=6",
"i+=6",
"i",
"6",
"{ // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }",
"{ // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }",
"if(num % i ==0 || num%(i+2) == 0)\n return false;",
"num % i ==0 || num%(i+2) == 0",
"num % i ==0",
"num % i",
"num",
"i",
"0",
"num%(i+2) == 0",
"num%(i+2)",
"num",
"(i+2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int num",
"num",
"public class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }\n\n public static boolean check(int num) {\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] num = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n num[i] = in.nextInt();\n if (check(num[i])) count++;\n }\n System.out.println(count);\n }\n\n public static boolean check(int num) {\n if (num == 2 || num == 3) return true; // 两个较小的数另外处理\n if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数\n int tmp = (int) Math.sqrt(num);\n for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数\n if(num % i ==0 || num%(i+2) == 0)\n return false;\n }\n // 排除所有,剩余的是质数\n return true;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int[] num = new int[n];
int count = 0;
for (int i = 0; i < n; i++) {
num[i] = in.nextInt();
if (check(num[i])) count++;
}
System.out.println(count);
}
public static boolean check(int num) {
if (num == 2 || num == 3) return true; // 两个较小的数另外处理
if (num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数
int tmp = (int) Math.sqrt(num);
for(int i = 5; i <= tmp; i+=6) { // 在6的倍数两侧的也可能不是质数
if(num % i ==0 || num%(i+2) == 0)
return false;
}
// 排除所有,剩余的是质数
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
14,
2,
13,
17,
40,
13,
14,
2,
2,
13,
17,
17,
30,
14,
2,
13,
17,
40,
13,
14,
2,
2,
13,
17,
17,
30,
14,
2,
13,
17,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
3,
14,
2,
13,
4,
18,
13,
4,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
136,
11
],
[
136,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
52,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
65,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
78,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
92,
103
],
[
103,
104
],
[
104,
105
],
[
92,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
115,
125
],
[
125,
126
],
[
14,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
12,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n/**\n *\n * @author Y\n */\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int N = Integer.parseInt(br.readLine());",
"N",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int a;",
"a",
"int c = 0;",
"c",
"0",
"for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }",
"{\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }",
"a = Integer.parseInt(br.readLine())",
"a",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n }",
"a%2==0",
"a%2",
"a",
"2",
"0",
"{\n if(a==2) c++;\n }",
"if(a==2) c++;",
"a==2",
"a",
"2",
"c++",
"c",
"if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n }",
"a%3==0",
"a%3",
"a",
"3",
"0",
"{\n if(a==3) c++;\n }",
"if(a==3) c++;",
"a==3",
"a",
"3",
"c++",
"c",
"if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n }",
"a%7==0",
"a%7",
"a",
"7",
"0",
"{\n if(a==7) c++;\n }",
"if(a==7) c++;",
"a==7",
"a",
"7",
"c++",
"c",
"{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n }",
"for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j<=Math.sqrt(a)",
"j",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"j++",
"j++",
"j",
"{\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }",
"{\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }",
"if(a%j == 0) break;",
"a%j == 0",
"a%j",
"a",
"j",
"0",
"break;",
"if(j == Math.floor(Math.sqrt(a))) c++;",
"j == Math.floor(Math.sqrt(a))",
"j",
"Math.floor(Math.sqrt(a))",
"Math.floor",
"Math",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"c++",
"c",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n int a;\n int c = 0;\n \n for(int i=0 ; i<N; i++){\n a = Integer.parseInt(br.readLine());\n \n if(a%2==0){\n if(a==2) c++;\n }else if(a%3==0){\n if(a==3) c++;\n }else if(a%7==0){\n if(a==7) c++;\n }else{\n for(int j = 2;j<=Math.sqrt(a);j++){\n if(a%j == 0) break; \n if(j == Math.floor(Math.sqrt(a))) c++;\n }\n } \n }\n System.out.println(c);\n \n \n \n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Y
*/
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
int a;
int c = 0;
for(int i=0 ; i<N; i++){
a = Integer.parseInt(br.readLine());
if(a%2==0){
if(a==2) c++;
}else if(a%3==0){
if(a==3) c++;
}else if(a%7==0){
if(a==7) c++;
}else{
for(int j = 2;j<=Math.sqrt(a);j++){
if(a%j == 0) break;
if(j == Math.floor(Math.sqrt(a))) c++;
}
}
}
System.out.println(c);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
93,
5
],
[
93,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
6,
47
],
[
47,
48
],
[
93,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
51,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
51,
66
],
[
66,
67
],
[
66,
68
],
[
51,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
69,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
76,
85
],
[
85,
86
],
[
85,
87
],
[
51,
88
],
[
88,
89
],
[
49,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] | [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n\tpublic static boolean isPrime(int i) {\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n\tpublic static boolean isPrime(int i) {\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int x = scanner.nextInt();",
"x",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < x",
"i",
"x",
"i++",
"i++",
"i",
"{\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}",
"{\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}",
"if (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;",
"isPrime(scanner.nextInt())",
"isPrime",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"sum++",
"sum",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public static boolean isPrime(int i) {\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}",
"if (i == 2)\n\t\t\treturn true;",
"i == 2",
"i",
"2",
"return true;",
"true",
"if (i % 2 == 0)\n\t\t\treturn false;",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"return false;",
"false",
"int k = 3;",
"k",
"3",
"while (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}",
"k <= Math.sqrt(i)",
"k",
"Math.sqrt(i)",
"Math.sqrt",
"Math",
"i",
"{\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}",
"if (i % k == 0)\n\t\t\t\treturn false;",
"i % k == 0",
"i % k",
"i",
"k",
"0",
"return false;",
"false",
"k += 2",
"k",
"2",
"return true;",
"true",
"int i",
"i",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n\tpublic static boolean isPrime(int i) {\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt()))\n\t\t\t\tsum++;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n\tpublic static boolean isPrime(int i) {\n\t\tif (i == 2)\n\t\t\treturn true;\n\t\tif (i % 2 == 0)\n\t\t\treturn false;\n\t\tint k = 3;\n\t\twhile (k <= Math.sqrt(i)) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tk += 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int x = scanner.nextInt();
int sum = 0;
for (int i = 0; i < x; i++) {
if (isPrime(scanner.nextInt()))
sum++;
}
System.out.println(sum);
}
public static boolean isPrime(int i) {
if (i == 2)
return true;
if (i % 2 == 0)
return false;
int k = 3;
while (k <= Math.sqrt(i)) {
if (i % k == 0)
return false;
k += 2;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
14,
2,
18,
13,
13,
17,
30,
40,
13,
14,
2,
2,
18,
13,
13,
17,
2,
2,
18,
13,
13,
17,
17,
30,
9,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
63,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
72,
86
],
[
86,
87
],
[
72,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
99,
101
],
[
89,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
89,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
88,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
8,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args){\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }",
"main",
"{\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }",
"int count = 0;",
"count",
"0",
"boolean p = true;",
"p",
"true",
"Scanner a = new Scanner(System.in);",
"a",
"new Scanner(System.in)",
"int n = a.nextInt();",
"n",
"a.nextInt()",
"a.nextInt",
"a",
"int m[] = new int[n];",
"m",
"new int[n]",
"n",
"for(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t m[i] = a.nextInt();\n\t}",
"{\n\t m[i] = a.nextInt();\n\t}",
"m[i] = a.nextInt()",
"m[i]",
"m",
"i",
"a.nextInt()",
"a.nextInt",
"a",
"for(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}",
"{\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}",
"p = true",
"p",
"true",
"if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }",
"m[i]==2",
"m[i]",
"m",
"i",
"2",
"{\n\t count++;\n\t }",
"count++",
"count",
"if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }",
"m[i]>2 && m[i]%2==0",
"m[i]>2",
"m[i]",
"m",
"i",
"2",
"m[i]%2==0",
"m[i]%2",
"m[i]",
"m",
"i",
"2",
"0",
"{\n\t continue;\n\t }",
"continue;",
"{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }",
"for(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}",
"int j=3;",
"int j=3;",
"j",
"3",
"j <= Math.sqrt(m[i])",
"j",
"Math.sqrt(m[i])",
"Math.sqrt",
"Math",
"m[i]",
"m",
"i",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}",
"{\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}",
"if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }",
"m[i]%j == 0",
"m[i]%j",
"m[i]",
"m",
"i",
"j",
"0",
"{\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }",
"p = false",
"p",
"false",
"break;",
"if(p){\n\t\tcount++;\n\t\t}",
"p",
"{\n\t\tcount++;\n\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tint count = 0;\n\tboolean p = true;\n\tScanner a = new Scanner(System.in);\n\tint n = a.nextInt();\n\tint m[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t m[i] = a.nextInt();\n\t}\n\tfor(int i=0; i<n; i++){\n\t p = true;\n\t if(m[i]==2){\n\t count++;\n\t }\n\t else if(m[i]>2 && m[i]%2==0){\n\t continue;\n\t }\n\t else{\n\t\tfor(int j=3; j <= Math.sqrt(m[i]); j+=2){\n\t\t if(m[i]%j == 0){\n\t\t\tp = false;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t\tif(p){\n\t\tcount++;\n\t\t}\n\t }\n\t}\n\tSystem.out.println(count);\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
int count = 0;
boolean p = true;
Scanner a = new Scanner(System.in);
int n = a.nextInt();
int m[] = new int[n];
for(int i = 0; i < n; i++){
m[i] = a.nextInt();
}
for(int i=0; i<n; i++){
p = true;
if(m[i]==2){
count++;
}
else if(m[i]>2 && m[i]%2==0){
continue;
}
else{
for(int j=3; j <= Math.sqrt(m[i]); j+=2){
if(m[i]%j == 0){
p = false;
break;
}
}
if(p){
count++;
}
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
4,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
96,
8
],
[
96,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
44,
53
],
[
53,
54
],
[
54,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
9,
62
],
[
62,
63
],
[
96,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
66,
91
],
[
91,
92
],
[
64,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] | [
"import java.io.IOException;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tboolean test(int n){\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}\n",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tboolean test(int n){\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Main main = new Main();",
"main",
"new Main()",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int count = 0;",
"count",
"0",
"for(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int num = scan.nextInt();",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}",
"num !=1 && main.test(num)",
"num !=1",
"num",
"1",
"main.test(num)",
"main.test",
"main",
"num",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"boolean test(int n){\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"test",
"{\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"for (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 2 ;",
"int i = 2 ;",
"i",
"2",
"i*i <= n",
"i*i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tboolean test(int n){\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tMain main = new Main();\n\n\t\tint n = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tint num = scan.nextInt();\n\t\t\tif(num !=1 && main.test(num)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n\tboolean test(int n){\n\t\tfor (int i = 2 ; i*i <= n ; i++) {\n\t\t\tif(n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main"
] | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
Main main = new Main();
int n = scan.nextInt();
int count = 0;
for(int i = 0 ; i < n ; i++) {
int num = scan.nextInt();
if(num !=1 && main.test(num)) {
count++;
}
}
System.out.println(count);
}
boolean test(int n){
for (int i = 2 ; i*i <= n ; i++) {
if(n % i == 0) {
return false;
}
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
14,
2,
13,
13,
0,
13,
13,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
0,
13,
17,
14,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
108,
14
],
[
108,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
17,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
17,
61
],
[
61,
62
],
[
61,
63
],
[
17,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
72,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
92,
94
],
[
68,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
17,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
15,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"import java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"import java.io.File;",
"File",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"int max = 0;",
"max",
"0",
"for (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}",
"{\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.add(n)",
"list.add",
"list",
"n",
"if (n > max)\n\t\t\t\tmax = n;",
"n > max",
"n",
"max",
"max = n",
"max",
"n",
"int ans = 0;",
"ans",
"0",
"for (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"int n",
"list",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"boolean is_prime = true;",
"is_prime",
"true",
"for (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"if (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"if (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"is_prime = false",
"is_prime",
"false",
"if (is_prime)\n\t\t\t\tans++;",
"is_prime",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tint max = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tlist.add(n);\t\t\t\n\t\t\tif (n > max)\n\t\t\t\tmax = n;\n\t\t}\n\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"Main"
] | import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
// Scanner sc = new Scanner(new File("test_1.txt"));
// Scanner sc = new Scanner(new File("test_2.txt"));
// Scanner sc = new Scanner(new File("in4.txt"));
int N = sc.nextInt();
List<Integer> list = new ArrayList<Integer>();
int max = 0;
for (int i = 0; i < N; i++) {
int n = sc.nextInt();
list.add(n);
if (n > max)
max = n;
}
int ans = 0;
for (int n : list) {
boolean is_prime = true;
for (int i = 2; i * i <= n; i++)
if (n % i == 0)
is_prime = false;
if (is_prime)
ans++;
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
15,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
27,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
27,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
6,
54
],
[
54,
55
],
[
133,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
58,
91
],
[
91,
92
],
[
91,
93
],
[
58,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
94,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
58,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
133,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
124,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] | [
"import java.util.*;\n\npublic class Main {\n\t/*\n\tboolean[] furui() {\n\t\tboolean[] tab = new boolean[100000001];\n\t\ttab[0] = tab[1] = true;\n\t\tfor (int i = 2; i <= tab.length/2; i++) {\n\t\t\tif (tab[i]) continue;\n\t\t\tfor (int j = i + i; j < tab.length; j+=i) {\n\t\t\t\ttab[j] = true;\n\t\t\t}\n\t\t}\n\t\treturn tab;\n\t}*/\n\n\tboolean isPrime(int x) {\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}\n\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t/*\n\tboolean[] furui() {\n\t\tboolean[] tab = new boolean[100000001];\n\t\ttab[0] = tab[1] = true;\n\t\tfor (int i = 2; i <= tab.length/2; i++) {\n\t\t\tif (tab[i]) continue;\n\t\t\tfor (int j = i + i; j < tab.length; j+=i) {\n\t\t\t\ttab[j] = true;\n\t\t\t}\n\t\t}\n\t\treturn tab;\n\t}*/\n\n\tboolean isPrime(int x) {\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}\n\n}",
"Main",
"boolean isPrime(int x) {\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"if (x==2) return true;",
"x==2",
"x",
"2",
"return true;",
"true",
"if (x < 2 || x % 2 == 0) return false;",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"for (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"{\n\t\t\tif (x % i == 0) return false;\n\t\t}",
"if (x % i == 0) return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"run",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] ary = new int[n];",
"ary",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tary[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tary[i] = scan.nextInt();\n\t\t}",
"ary[i] = scan.nextInt()",
"ary[i]",
"ary",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ary.length",
"i",
"ary.length",
"ary",
"ary.length",
"i++",
"i++",
"i",
"{\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(ary[i])",
"isPrime",
"ary[i]",
"ary",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\t/*\n\tboolean[] furui() {\n\t\tboolean[] tab = new boolean[100000001];\n\t\ttab[0] = tab[1] = true;\n\t\tfor (int i = 2; i <= tab.length/2; i++) {\n\t\t\tif (tab[i]) continue;\n\t\t\tfor (int j = i + i; j < tab.length; j+=i) {\n\t\t\t\ttab[j] = true;\n\t\t\t}\n\t\t}\n\t\treturn tab;\n\t}*/\n\n\tboolean isPrime(int x) {\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}\n\n}",
"public class Main {\n\t/*\n\tboolean[] furui() {\n\t\tboolean[] tab = new boolean[100000001];\n\t\ttab[0] = tab[1] = true;\n\t\tfor (int i = 2; i <= tab.length/2; i++) {\n\t\t\tif (tab[i]) continue;\n\t\t\tfor (int j = i + i; j < tab.length; j+=i) {\n\t\t\t\ttab[j] = true;\n\t\t\t}\n\t\t}\n\t\treturn tab;\n\t}*/\n\n\tboolean isPrime(int x) {\n\t\tif (x==2) return true;\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\tfor (int i = 3; i <= Math.sqrt(x); i += 2) {\n\t\t\tif (x % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] ary = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tary[i] = scan.nextInt();\n\t\t}\n\t\t//boolean[] table = furui();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t/*\n\t\t\tif (table[ary[i]] == false) {\n\t\t\t\tcount++;\n\t\t\t\tSystem.out.println(ary[i]);\n\t\t\t}*/\n\t\t\tif (isPrime(ary[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tnew Main().run();\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
/*
boolean[] furui() {
boolean[] tab = new boolean[100000001];
tab[0] = tab[1] = true;
for (int i = 2; i <= tab.length/2; i++) {
if (tab[i]) continue;
for (int j = i + i; j < tab.length; j+=i) {
tab[j] = true;
}
}
return tab;
}*/
boolean isPrime(int x) {
if (x==2) return true;
if (x < 2 || x % 2 == 0) return false;
for (int i = 3; i <= Math.sqrt(x); i += 2) {
if (x % i == 0) return false;
}
return true;
}
void run() {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] ary = new int[n];
for (int i = 0; i < n; i++) {
ary[i] = scan.nextInt();
}
//boolean[] table = furui();
int count = 0;
for (int i = 0; i < ary.length; i++) {
/*
if (table[ary[i]] == false) {
count++;
System.out.println(ary[i]);
}*/
if (isPrime(ary[i])) {
count++;
}
}
System.out.println(count);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new Main().run();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
14,
2,
2,
18,
13,
13,
17,
2,
2,
18,
13,
13,
17,
17,
30,
0,
13,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
18,
13,
13,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
11,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
76,
82
],
[
69,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
65,
87
],
[
87,
88
],
[
87,
89
],
[
65,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
90,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
99,
112
],
[
112,
113
],
[
112,
114
],
[
65,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
65,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
11,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
9,
139
],
[
139,
140
]
] | [
"import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint keisan = 0;\n\t\tint sosu = 0;\n\t\tboolean tf = true;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=0;i<times;i++){\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint keisan = 0;\n\t\tint sosu = 0;\n\t\tboolean tf = true;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=0;i<times;i++){\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n}",
"Main",
"public static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint keisan = 0;\n\t\tint sosu = 0;\n\t\tboolean tf = true;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=0;i<times;i++){\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}",
"main",
"{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint keisan = 0;\n\t\tint sosu = 0;\n\t\tboolean tf = true;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=0;i<times;i++){\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int times = scan.nextInt();",
"times",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int num[] =new int[times];",
"num",
"new int[times]",
"times",
"int keisan = 0;",
"keisan",
"0",
"int sosu = 0;",
"sosu",
"0",
"boolean tf = true;",
"tf",
"true",
"for(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t}",
"num[i] = scan.nextInt()",
"num[i]",
"num",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=0;i<times;i++){\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}",
"{\n\t\t\ttf = true;\n\t\t\tif(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}\n\t\t\tint ii=3;\n\t\t\twhile (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}\n\t\t\tif (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}\n\t\t\tif(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}\n\t\t}",
"tf = true",
"tf",
"true",
"if(num[i] == 2 || num[i] % 2 == 0){\n\t\t\t\ttf = false;\n\t\t\t}",
"num[i] == 2 || num[i] % 2 == 0",
"num[i] == 2",
"num[i]",
"num",
"i",
"2",
"num[i] % 2 == 0",
"num[i] % 2",
"num[i]",
"num",
"i",
"2",
"0",
"{\n\t\t\t\ttf = false;\n\t\t\t}",
"tf = false",
"tf",
"false",
"int ii=3;",
"ii",
"3",
"while (ii <= Math.sqrt(num[i])){\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}",
"ii <= Math.sqrt(num[i])",
"ii",
"Math.sqrt(num[i])",
"Math.sqrt",
"Math",
"num[i]",
"num",
"i",
"{\n\t\t\t\tif(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}\n\t\t\t\tii += 2;\n\t\t\t}",
"if(num[i] % ii == 0){\n\t\t\t\t\ttf = false;\n\t\t\t\t}",
"num[i] % ii == 0",
"num[i] % ii",
"num[i]",
"num",
"i",
"ii",
"0",
"{\n\t\t\t\t\ttf = false;\n\t\t\t\t}",
"tf = false",
"tf",
"false",
"ii += 2",
"ii",
"2",
"if (num[i] == 2){\n\t\t\t\ttf = true;\n\t\t\t}",
"num[i] == 2",
"num[i]",
"num",
"i",
"2",
"{\n\t\t\t\ttf = true;\n\t\t\t}",
"tf = true",
"tf",
"true",
"if(tf == true){\n\t\t\t\tsosu +=1;\n\t\t\t}",
"tf == true",
"tf",
"true",
"{\n\t\t\t\tsosu +=1;\n\t\t\t}",
"sosu +=1",
"sosu",
"1",
"System.out.println(sosu)",
"System.out.println",
"System.out",
"System",
"System.out",
"sosu",
"String[] args",
"args"
] | import java.io.IOException;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws NumberFormatException, IOException{
// System.out.println(" ");
Scanner scan = new Scanner(System.in);
int times = scan.nextInt();
int num[] =new int[times];
int keisan = 0;
int sosu = 0;
boolean tf = true;
for(int i=0;i<times;i++){
num[i] = scan.nextInt();
}
for(int i=0;i<times;i++){
tf = true;
if(num[i] == 2 || num[i] % 2 == 0){
tf = false;
}
int ii=3;
while (ii <= Math.sqrt(num[i])){
if(num[i] % ii == 0){
tf = false;
}
ii += 2;
}
if (num[i] == 2){
tf = true;
}
if(tf == true){
sosu +=1;
}
}
System.out.println(sosu);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
184,
11
],
[
184,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
14,
58
],
[
58,
59
],
[
58,
60
],
[
14,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
61,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
14,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
12,
91
],
[
91,
92
],
[
184,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
95,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
95,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
95,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
95,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
95,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
128,
134
],
[
134,
135
],
[
95,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
136,
142
],
[
142,
143
],
[
95,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
144,
150
],
[
150,
151
],
[
95,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
95,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
163,
164
],
[
163,
165
],
[
158,
166
],
[
166,
167
],
[
167,
168
],
[
158,
169
],
[
170,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
171,
177
],
[
177,
178
],
[
95,
179
],
[
179,
180
],
[
93,
181
],
[
181,
182
],
[
0,
183
],
[
183,
184
],
[
183,
185
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n /**\n * @param args\n * @throws IOException\n * @throws NumberFormatException\n */\n public static void main(String[] args) throws NumberFormatException,\n IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }\n\n \n// ??????function prime(n) {\n// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;\n// ????????????for(i=3; i<=Math.sqrt(n); i++) {\n// ??????????????????if ((n % i) == 0) return 0;\n// ????????????}\n// ????????????return 1;\n// ??????}\n private static boolean isPrime(int value) {\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n /**\n * @param args\n * @throws IOException\n * @throws NumberFormatException\n */\n public static void main(String[] args) throws NumberFormatException,\n IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }\n\n \n// ??????function prime(n) {\n// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;\n// ????????????for(i=3; i<=Math.sqrt(n); i++) {\n// ??????????????????if ((n % i) == 0) return 0;\n// ????????????}\n// ????????????return 1;\n// ??????}\n private static boolean isPrime(int value) {\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }\n\n}",
"Main",
"/**\n * @param args\n * @throws IOException\n * @throws NumberFormatException\n */\n public static void main(String[] args) throws NumberFormatException,\n IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }",
"main",
"{\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));",
"reader",
"new BufferedReader(new InputStreamReader(\n System.in))",
"int len = Integer.parseInt(reader.readLine());",
"len",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int[] arr = new int[len];",
"arr",
"new int[len]",
"len",
"String line;",
"line",
"for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }",
"{\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }",
"line = reader.readLine()",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"arr[i] = Integer.parseInt(line)",
"arr[i]",
"arr",
"i",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"int resultCount = 0;",
"resultCount",
"0",
"for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < arr.length",
"j",
"arr.length",
"arr",
"arr.length",
"j++",
"j++",
"j",
"{\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }",
"{\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }",
"if (isPrime(arr[j])) {\n resultCount++;\n }",
"isPrime(arr[j])",
"isPrime",
"arr[j]",
"arr",
"j",
"{\n resultCount++;\n }",
"resultCount++",
"resultCount",
"System.out.println(resultCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"resultCount",
"String[] args",
"args",
"// ??????function prime(n) {\n// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;\n// ????????????for(i=3; i<=Math.sqrt(n); i++) {\n// ??????????????????if ((n % i) == 0) return 0;\n// ????????????}\n// ????????????return 1;\n// ??????}\n private static boolean isPrime(int value) {\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }",
"isPrime",
"{\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }",
"if(value == 2) return true;",
"value == 2",
"value",
"2",
"return true;",
"true",
"if(value == 3) return true;",
"value == 3",
"value",
"3",
"return true;",
"true",
"if(value == 5) return true;",
"value == 5",
"value",
"5",
"return true;",
"true",
"if(value == 7) return true;",
"value == 7",
"value",
"7",
"return true;",
"true",
"if(value % 2 == 0) return false;",
"value % 2 == 0",
"value % 2",
"value",
"2",
"0",
"return false;",
"false",
"if(value % 3 == 0) return false;",
"value % 3 == 0",
"value % 3",
"value",
"3",
"0",
"return false;",
"false",
"if(value % 5 == 0) return false;",
"value % 5 == 0",
"value % 5",
"value",
"5",
"0",
"return false;",
"false",
"if(value % 7 == 0) return false;",
"value % 7 == 0",
"value % 7",
"value",
"7",
"0",
"return false;",
"false",
"int max = (int) Math.sqrt(value);",
"max",
"(int) Math.sqrt(value)",
"Math.sqrt",
"Math",
"value",
"for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }",
"double i = 8;",
"double i = 8;",
"i",
"8",
"i <= max",
"i",
"max",
"i ++",
"i ++",
"i",
"{\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }",
"{\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }",
"if (value % i == 0) return false;",
"value % i == 0",
"value % i",
"value",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int value",
"value",
"public class Main {\n\n /**\n * @param args\n * @throws IOException\n * @throws NumberFormatException\n */\n public static void main(String[] args) throws NumberFormatException,\n IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }\n\n \n// ??????function prime(n) {\n// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;\n// ????????????for(i=3; i<=Math.sqrt(n); i++) {\n// ??????????????????if ((n % i) == 0) return 0;\n// ????????????}\n// ????????????return 1;\n// ??????}\n private static boolean isPrime(int value) {\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }\n\n}",
"public class Main {\n\n /**\n * @param args\n * @throws IOException\n * @throws NumberFormatException\n */\n public static void main(String[] args) throws NumberFormatException,\n IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n int len = Integer.parseInt(reader.readLine());\n int[] arr = new int[len];\n\n String line;\n\n for (int i = 0; i < len; i++) {\n line = reader.readLine();\n arr[i] = Integer.parseInt(line);\n }\n \n int resultCount = 0;\n for (int j = 0; j < arr.length; j++) {\n if (isPrime(arr[j])) {\n resultCount++;\n }\n }\n\n System.out.println(resultCount);\n\n }\n\n \n// ??????function prime(n) {\n// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;\n// ????????????for(i=3; i<=Math.sqrt(n); i++) {\n// ??????????????????if ((n % i) == 0) return 0;\n// ????????????}\n// ????????????return 1;\n// ??????}\n private static boolean isPrime(int value) {\n\n if(value == 2) return true;\n if(value == 3) return true;\n if(value == 5) return true;\n if(value == 7) return true;\n \n if(value % 2 == 0) return false;\n if(value % 3 == 0) return false;\n if(value % 5 == 0) return false;\n if(value % 7 == 0) return false;\n\n int max = (int) Math.sqrt(value);\n \n \n for (double i = 8; i <= max; i ++ ) {\n// System.out.println(\"value:\"+ value +\" i:\" + i +\" r \" + (value % i));\n if (value % i == 0) return false;\n }\n \n return true;\n }\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException,
IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
int len = Integer.parseInt(reader.readLine());
int[] arr = new int[len];
String line;
for (int i = 0; i < len; i++) {
line = reader.readLine();
arr[i] = Integer.parseInt(line);
}
int resultCount = 0;
for (int j = 0; j < arr.length; j++) {
if (isPrime(arr[j])) {
resultCount++;
}
}
System.out.println(resultCount);
}
// ??????function prime(n) {
// ????????????if (n <= 3) return 0; ????????????if ((n % 2) == 0) return 0;
// ????????????for(i=3; i<=Math.sqrt(n); i++) {
// ??????????????????if ((n % i) == 0) return 0;
// ????????????}
// ????????????return 1;
// ??????}
private static boolean isPrime(int value) {
if(value == 2) return true;
if(value == 3) return true;
if(value == 5) return true;
if(value == 7) return true;
if(value % 2 == 0) return false;
if(value % 3 == 0) return false;
if(value % 5 == 0) return false;
if(value % 7 == 0) return false;
int max = (int) Math.sqrt(value);
for (double i = 8; i <= max; i ++ ) {
// System.out.println("value:"+ value +" i:" + i +" r " + (value % i));
if (value % i == 0) return false;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
13,
41,
13,
41,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
2,
17,
13,
30,
9,
14,
2,
17,
2,
13,
17,
30,
40,
13,
9,
41,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
17,
2,
13,
13,
30,
40,
13,
3,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
12,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
22,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
22,
36
],
[
36,
37
],
[
22,
38
],
[
38,
39
],
[
22,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
52,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
52,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
52,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
83,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
22,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
22,
113
],
[
113,
114
],
[
114,
115
],
[
6,
116
],
[
116,
117
]
] | [
"import java.io.*;\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }",
"main",
"{\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }",
"BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );",
"kb",
"new BufferedReader( new InputStreamReader( System.in ) )",
"try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }",
"catch( IOException e ) {\n System.err.println( e );\n }",
"IOException e",
"{\n System.err.println( e );\n }",
"System.err.println( e )",
"System.err.println",
"System.err",
"System",
"System.err",
"e",
"{\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n }",
"int n = Integer.parseInt( kb.readLine() );",
"n",
"Integer.parseInt( kb.readLine() )",
"Integer.parseInt",
"Integer",
"kb.readLine()",
"kb.readLine",
"kb",
"int num;",
"num",
"int cnt = n;",
"cnt",
"n",
"int i",
"i",
"j;",
"j",
"for( i=0; i<n; i++ ) {\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"{\n num = Integer.parseInt( kb.readLine() );\n\t\t\t\tif( 2 == num ) { continue; }\n\t\t\t\tif( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint last = (int)Math.sqrt( (double)num );\n for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"num = Integer.parseInt( kb.readLine() )",
"num",
"Integer.parseInt( kb.readLine() )",
"Integer.parseInt",
"Integer",
"kb.readLine()",
"kb.readLine",
"kb",
"if( 2 == num ) { continue; }",
"2 == num",
"2",
"num",
"{ continue; }",
"continue;",
"if( 0 == num%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"0 == num%2",
"0",
"num%2",
"num",
"2",
"{\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"cnt--",
"cnt",
"continue;",
"int last = (int)Math.sqrt( (double)num );",
"last",
"(int)Math.sqrt( (double)num )",
"Math.sqrt",
"Math",
"(double)num",
"for( j=3; j<=last; j+=2 ) {\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"j=3;",
"j=3",
"j",
"3",
"j<=last",
"j",
"last",
"j+=2",
"j+=2",
"j",
"2",
"{\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"{\n if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"if( 0 == num%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }",
"0 == num%j",
"0",
"num%j",
"num",
"j",
"{\n cnt--;\n\t\t\t\t\t\tbreak;\n }",
"cnt--",
"cnt",
"break;",
"System.out.println( cnt )",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"kb.close()",
"kb.close",
"kb",
"String[] args",
"args"
] | import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
int n = Integer.parseInt( kb.readLine() );
int num;
int cnt = n;
int i, j;
for( i=0; i<n; i++ ) {
num = Integer.parseInt( kb.readLine() );
if( 2 == num ) { continue; }
if( 0 == num%2 ) {
cnt--;
continue;
}
int last = (int)Math.sqrt( (double)num );
for( j=3; j<=last; j+=2 ) {
if( 0 == num%j ) {
cnt--;
break;
}
}
}
System.out.println( cnt );
kb.close();
} catch( IOException e ) {
System.err.println( e );
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
11,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
9,
59
],
[
59,
60
],
[
7,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
64,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
63,
88
],
[
88,
89
],
[
61,
90
],
[
90,
91
]
] | [
"// a program which finds the number of prime numbers in the given list\n\nimport java.util.*;\nimport java.lang.*;\n\nclass Main{\n\n public static void main(String[] args){\n final int N;\n int A, num = 0; // num : the number of prime numbers in the given list\n\n Scanner scanner = new Scanner(System.in);\n N = scanner.nextInt();\n\n for( int i = 0; i<N; i++ ){\n A = scanner.nextInt();\n num += isPrime(A);\n }\n\n scanner.close();\n System.out.println(num);\n }\n\n // a function for judging whether the given number is a prime number or not\n // Returned Value 0: not prime number 1: prime number\n static int isPrime(int n){\n\n for( int i = 2; i<=Math.sqrt(n); i++ ){\n if( n % i == 0 )\n return 0;\n }\n\n return 1;\n }// the end of the method: \"isPrime\"\n\n}// the end of the class: \"Main\"\n",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"class Main{\n\n public static void main(String[] args){\n final int N;\n int A, num = 0; // num : the number of prime numbers in the given list\n\n Scanner scanner = new Scanner(System.in);\n N = scanner.nextInt();\n\n for( int i = 0; i<N; i++ ){\n A = scanner.nextInt();\n num += isPrime(A);\n }\n\n scanner.close();\n System.out.println(num);\n }\n\n // a function for judging whether the given number is a prime number or not\n // Returned Value 0: not prime number 1: prime number\n static int isPrime(int n){\n\n for( int i = 2; i<=Math.sqrt(n); i++ ){\n if( n % i == 0 )\n return 0;\n }\n\n return 1;\n }// the end of the method: \"isPrime\"\n\n}// the end of the class: \"Main\"",
"Main",
"public static void main(String[] args){\n final int N;\n int A, num = 0; // num : the number of prime numbers in the given list\n\n Scanner scanner = new Scanner(System.in);\n N = scanner.nextInt();\n\n for( int i = 0; i<N; i++ ){\n A = scanner.nextInt();\n num += isPrime(A);\n }\n\n scanner.close();\n System.out.println(num);\n }",
"main",
"{\n final int N;\n int A, num = 0; // num : the number of prime numbers in the given list\n\n Scanner scanner = new Scanner(System.in);\n N = scanner.nextInt();\n\n for( int i = 0; i<N; i++ ){\n A = scanner.nextInt();\n num += isPrime(A);\n }\n\n scanner.close();\n System.out.println(num);\n }",
"final int N;",
"N",
"int A",
"A",
"num = 0;",
"num",
"0",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"N = scanner.nextInt()",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for( int i = 0; i<N; i++ ){\n A = scanner.nextInt();\n num += isPrime(A);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n A = scanner.nextInt();\n num += isPrime(A);\n }",
"{\n A = scanner.nextInt();\n num += isPrime(A);\n }",
"A = scanner.nextInt()",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"num += isPrime(A)",
"num",
"isPrime(A)",
"isPrime",
"A",
"scanner.close()",
"scanner.close",
"scanner",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"String[] args",
"args",
"// a function for judging whether the given number is a prime number or not\n // Returned Value 0: not prime number 1: prime number\n static int isPrime(int n){\n\n for( int i = 2; i<=Math.sqrt(n); i++ ){\n if( n % i == 0 )\n return 0;\n }\n\n return 1;\n }// the end of the method: \"isPrime\"",
"isPrime",
"{\n\n for( int i = 2; i<=Math.sqrt(n); i++ ){\n if( n % i == 0 )\n return 0;\n }\n\n return 1;\n }",
"for( int i = 2; i<=Math.sqrt(n); i++ ){\n if( n % i == 0 )\n return 0;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i<=Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i++",
"i++",
"i",
"{\n if( n % i == 0 )\n return 0;\n }",
"{\n if( n % i == 0 )\n return 0;\n }",
"if( n % i == 0 )\n return 0;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return 0;",
"0",
"return 1;",
"1",
"int n",
"n"
] | // a program which finds the number of prime numbers in the given list
import java.util.*;
import java.lang.*;
class Main{
public static void main(String[] args){
final int N;
int A, num = 0; // num : the number of prime numbers in the given list
Scanner scanner = new Scanner(System.in);
N = scanner.nextInt();
for( int i = 0; i<N; i++ ){
A = scanner.nextInt();
num += isPrime(A);
}
scanner.close();
System.out.println(num);
}
// a function for judging whether the given number is a prime number or not
// Returned Value 0: not prime number 1: prime number
static int isPrime(int n){
for( int i = 2; i<=Math.sqrt(n); i++ ){
if( n % i == 0 )
return 0;
}
return 1;
}// the end of the method: "isPrime"
}// the end of the class: "Main"
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
13,
13,
14,
2,
13,
17,
40,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
34,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
6,
60
],
[
60,
61
],
[
110,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
64,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
71,
81
],
[
81,
82
],
[
64,
83
],
[
83,
84
],
[
83,
85
],
[
64,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
86,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
93,
102
],
[
102,
103
],
[
102,
104
],
[
64,
105
],
[
105,
106
],
[
62,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isprime(int x) {\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isprime(int x) {\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}",
"Scanner scan = new Scanner (System.in);",
"scan",
"new Scanner (System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"boolean flg;",
"flg",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}",
"{\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}",
"int x = scan.nextInt();",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"flg = isprime(x)",
"flg",
"isprime(x)",
"isprime",
"x",
"if ( flg == true) count++;",
"flg == true",
"flg",
"true",
"count++",
"count",
"scan.close()",
"scan.close",
"scan",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String [] args",
"args",
"public static boolean isprime(int x) {\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"isprime",
"{\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"if (x == 2) return true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if (x < 2 || x % 2 == 0) return false;",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}",
"i <= Math.sqrt((double)x)",
"i",
"Math.sqrt((double)x)",
"Math.sqrt",
"Math",
"(double)x",
"{\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}",
"if (x % i == 0) return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"i += 2",
"i",
"2",
"return true;",
"true",
"int x",
"x",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isprime(int x) {\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint n = scan.nextInt();\n\t\tboolean flg;\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scan.nextInt();\n\t\t\tflg = isprime(x);\n\t\t\tif ( flg == true) count++;\n\t\t}\n\t\t\n\t\tscan.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isprime(int x) {\n\t\t\n\t\tif (x == 2) return true;\n\t\t\n\t\tif (x < 2 || x % 2 == 0) return false;\n\t\t\n\t\tint i = 3;\n\t\t\n\t\twhile ( i <= Math.sqrt((double)x)) {\n\t\t\tif (x % i == 0) return false;\n\t\t\t\n\t\t\ti += 2;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main (String [] args) {
Scanner scan = new Scanner (System.in);
int n = scan.nextInt();
boolean flg;
int count = 0;
for (int i = 0; i < n; i++) {
int x = scan.nextInt();
flg = isprime(x);
if ( flg == true) count++;
}
scan.close();
System.out.println(count);
}
public static boolean isprime(int x) {
if (x == 2) return true;
if (x < 2 || x % 2 == 0) return false;
int i = 3;
while ( i <= Math.sqrt((double)x)) {
if (x % i == 0) return false;
i += 2;
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
14,
2,
2,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
149,
8
],
[
149,
9
],
[
9,
10
],
[
9,
11
],
[
149,
12
],
[
12,
13
],
[
149,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
149,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
31,
32
],
[
24,
33
],
[
33,
34
],
[
33,
35
],
[
24,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
24,
59
],
[
59,
60
],
[
59,
61
],
[
24,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
24,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
149,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
107,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
110,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
110,
124
],
[
125,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
126,
132
],
[
132,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
135,
141
],
[
134,
142
],
[
142,
143
],
[
109,
144
],
[
144,
145
],
[
78,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"import java.io.*;\nimport java.util.*;\n \npublic class Main {\n \n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n private static StringTokenizer st;\n \n public static void main ( String [] args ) throws IOException\n {\n new Main().cal();\n }\n \n \n private void cal() throws IOException \n {\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }\n \n private boolean isPrime(int n) {\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }\n \n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n private static StringTokenizer st;\n \n public static void main ( String [] args ) throws IOException\n {\n new Main().cal();\n }\n \n \n private void cal() throws IOException \n {\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }\n \n private boolean isPrime(int n) {\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }\n \n}",
"Main",
"private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"private static StringTokenizer st;",
"st",
"public static void main ( String [] args ) throws IOException\n {\n new Main().cal();\n }",
"main",
"{\n new Main().cal();\n }",
"new Main().cal()",
"new Main().cal",
"new Main()",
"String [] args",
"args",
"private void cal() throws IOException \n {\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }",
"cal",
"{\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }",
"int N = Integer.parseInt(br.readLine());",
"N",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int [] nums = new int[N];",
"nums",
"new int[N]",
"N",
"for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"nums[i] = Integer.parseInt(br.readLine());",
"nums[i] = Integer.parseInt(br.readLine())",
"nums[i]",
"nums",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int count = 0;",
"count",
"0",
"for(int n : nums)\n if ( isPrime(n) ) count++;",
"int n",
"nums",
"if ( isPrime(n) ) count++;",
"if ( isPrime(n) ) count++;",
"isPrime(n)",
"isPrime",
"n",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"private boolean isPrime(int n) {\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }",
"isPrime",
"{\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }",
"if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }",
"n == 2",
"n",
"2",
"return true;",
"true",
"if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"return false;",
"false",
"if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }",
"n < 9",
"n",
"9",
"return true;",
"true",
"if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }",
"n % 3 == 0",
"n % 3",
"n",
"3",
"0",
"return false;",
"false",
"{\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }",
"for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }",
"int i = 5;",
"int i = 5;",
"i",
"5",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i+=6",
"i+=6",
"i",
"6",
"{\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }",
"{\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }",
"if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"if ( n % (i+2) == 0 ) return false;",
"n % (i+2) == 0",
"n % (i+2)",
"n",
"(i+2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main {\n \n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n private static StringTokenizer st;\n \n public static void main ( String [] args ) throws IOException\n {\n new Main().cal();\n }\n \n \n private void cal() throws IOException \n {\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }\n \n private boolean isPrime(int n) {\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }\n \n}",
"public class Main {\n \n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n private static StringTokenizer st;\n \n public static void main ( String [] args ) throws IOException\n {\n new Main().cal();\n }\n \n \n private void cal() throws IOException \n {\n int N = Integer.parseInt(br.readLine());\n int [] nums = new int[N];\n \n for(int i = 0; i < N; i++)\n nums[i] = Integer.parseInt(br.readLine());\n \n int count = 0;\n for(int n : nums)\n if ( isPrime(n) ) count++;\n \n System.out.println(count);\n \n }\n \n private boolean isPrime(int n) {\n if ( n == 2 ) return true;\n else if ( n % 2 == 0 ) return false;\n else if ( n < 9 ) return true;\n else if ( n % 3 == 0 ) return false;\n else {\n for(int i = 5; i * i <= n; i+=6) {\n if ( n % i == 0 ) return false;\n else if ( n % (i+2) == 0 ) return false;\n }\n return true;\n }\n \n \n }\n \n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private static StringTokenizer st;
public static void main ( String [] args ) throws IOException
{
new Main().cal();
}
private void cal() throws IOException
{
int N = Integer.parseInt(br.readLine());
int [] nums = new int[N];
for(int i = 0; i < N; i++)
nums[i] = Integer.parseInt(br.readLine());
int count = 0;
for(int n : nums)
if ( isPrime(n) ) count++;
System.out.println(count);
}
private boolean isPrime(int n) {
if ( n == 2 ) return true;
else if ( n % 2 == 0 ) return false;
else if ( n < 9 ) return true;
else if ( n % 3 == 0 ) return false;
else {
for(int i = 5; i * i <= n; i+=6) {
if ( n % i == 0 ) return false;
else if ( n % (i+2) == 0 ) return false;
}
return true;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
40,
13,
9,
41,
13,
13,
0,
13,
4,
18,
13,
13,
41,
13,
13,
14,
2,
2,
13,
17,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
3,
14,
2,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
41,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
41,
62
],
[
62,
63
],
[
62,
64
],
[
41,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
41,
71
],
[
71,
72
],
[
71,
73
],
[
41,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
81,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
14,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
12,
115
],
[
115,
116
]
] | [
"import java.io.*;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint sum = 0;\n\t\tfor (int i = 0 ; i<n ; i++ ) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint sum = 0;\n\t\tfor (int i = 0 ; i<n ; i++ ) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint sum = 0;\n\t\tfor (int i = 0 ; i<n ; i++ ) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint sum = 0;\n\t\tfor (int i = 0 ; i<n ; i++ ) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int sum = 0;",
"sum",
"0",
"for (int i = 0 ; i<n ; i++ ) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble nd = (double) num;\n\t\t\tnd = Math.sqrt(nd);\n\t\t\tint a = (int) nd;\n\t\t\tif ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int num = Integer.parseInt(br.readLine());",
"num",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if ( num == 2 || num == 3) {\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}",
"num == 2 || num == 3",
"num == 2",
"num",
"2",
"num == 3",
"num",
"3",
"{\n\t\t\t\tsum++;\n\t\t\t\tcontinue;\n\t\t\t}",
"sum++",
"sum",
"continue;",
"double nd = (double) num;",
"nd",
"(double) num",
"nd = Math.sqrt(nd)",
"nd",
"Math.sqrt(nd)",
"Math.sqrt",
"Math",
"nd",
"int a = (int) nd;",
"a",
"(int) nd",
"if ( num % 2 == 1) {\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}",
"num % 2 == 1",
"num % 2",
"num",
"2",
"1",
"{\n\t\t\t\tfor (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}",
"for (int j = 2; j<=a ; j++ ) {\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j<=a",
"j",
"a",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}",
"{\n\t\t\t\t\tif ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\n\t\t\t\t}",
"if ( num%j == 0 ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}",
"num%j == 0",
"num%j",
"num",
"j",
"0",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"if( j == a){\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}",
"j == a",
"j",
"a",
"{\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}",
"sum++",
"sum",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args"
] | import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int sum = 0;
for (int i = 0 ; i<n ; i++ ) {
int num = Integer.parseInt(br.readLine());
if ( num == 2 || num == 3) {
sum++;
continue;
}
double nd = (double) num;
nd = Math.sqrt(nd);
int a = (int) nd;
if ( num % 2 == 1) {
for (int j = 2; j<=a ; j++ ) {
if ( num%j == 0 ) {
break;
}else if( j == a){
sum++;
}
}
}
}
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
2,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
112,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
12,
21
],
[
21,
22
],
[
21,
23
],
[
12,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
12,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
10,
55
],
[
55,
56
],
[
112,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
59,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
66,
76
],
[
76,
77
],
[
59,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
80,
85
],
[
59,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
59,
107
],
[
107,
108
],
[
57,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\t\n\tstatic int[] memo = new int[45];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tstatic boolean isPrime(int a) {\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tstatic int[] memo = new int[45];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tstatic boolean isPrime(int a) {\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"static int[] memo = new int[45];",
"memo",
"new int[45]",
"45",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"if (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}",
"isPrime(a)",
"isPrime",
"a",
"{\n\t\t\t\tcnt++;\n\t\t\t}",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static boolean isPrime(int a) {\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"if (a <= 1) return false;",
"a <= 1",
"a",
"1",
"return false;",
"false",
"if (a != 2 && a%2 == 0) return false;",
"a != 2 && a%2 == 0",
"a != 2",
"a",
"2",
"a%2 == 0",
"a%2",
"a",
"2",
"0",
"return false;",
"false",
"int max = (int) Math.sqrt(a)+1;",
"max",
"(int) Math.sqrt(a)+1",
"(int) Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"1",
"for (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i < max",
"i",
"max",
"i++",
"i++",
"i",
"{\n\t\t\tif (a%i == 0) return false;\n\t\t}",
"{\n\t\t\tif (a%i == 0) return false;\n\t\t}",
"if (a%i == 0) return false;",
"a%i == 0",
"a%i",
"a",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int a",
"a",
"public class Main {\n\t\n\tstatic int[] memo = new int[45];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tstatic boolean isPrime(int a) {\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\n\t\n\tstatic int[] memo = new int[45];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tint n = in.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tif (isPrime(a)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tstatic boolean isPrime(int a) {\n\t\tif (a <= 1) return false;\n\t\t\n\t\tif (a != 2 && a%2 == 0) return false;\n\t\t\n\t\tint max = (int) Math.sqrt(a)+1;\n\t\tfor (int i = 3; i < max; i++) {\n\t\t\tif (a%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static int[] memo = new int[45];
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int cnt = 0;
for (int i = 0; i < n; i++) {
int a = in.nextInt();
if (isPrime(a)) {
cnt++;
}
}
System.out.println(cnt);
}
static boolean isPrime(int a) {
if (a <= 1) return false;
if (a != 2 && a%2 == 0) return false;
int max = (int) Math.sqrt(a)+1;
for (int i = 3; i < max; i++) {
if (a%i == 0) return false;
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
18,
13,
13,
17,
30,
40,
13,
14,
2,
2,
18,
13,
13,
17,
17,
30,
41,
13,
4,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
30
],
[
30,
31
],
[
30,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
14,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
56,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
73,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
73,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
116,
117
],
[
14,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
12,
124
],
[
124,
125
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args)throws Exception{\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tint total = 0;\n\t\tint y = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(total);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args)throws Exception{\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tint total = 0;\n\t\tint y = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(total);\n\t}\n}",
"Main",
"public static void main(String[] args)throws Exception{\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tint total = 0;\n\t\tint y = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(total);\n\t}",
"main",
"{\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tint total = 0;\n\t\tint y = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(total);\n\t}",
"BufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] numbers = new int[n];",
"numbers",
"new int[n]",
"n",
"int total = 0;",
"total",
"0",
"int y = 0;",
"y",
"0",
"for(int i = 0; i < n; i++){\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tnumbers[i] = scanner.nextInt();\n\t\t\tif(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"numbers[i] = scanner.nextInt()",
"numbers[i]",
"numbers",
"i",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(numbers[i] <= 3){\n\t\t\t\ttotal++;\n\t\t\t}else if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}",
"numbers[i] <= 3",
"numbers[i]",
"numbers",
"i",
"3",
"{\n\t\t\t\ttotal++;\n\t\t\t}",
"total++",
"total",
"if(numbers[i] % 2 != 0){\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}",
"numbers[i] % 2 != 0",
"numbers[i] % 2",
"numbers[i]",
"numbers",
"i",
"2",
"0",
"{\n\t\t\t\tdouble x = Math.sqrt(numbers[i]);\n\t\t\t\tfor(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}\n\t\t\t}",
"double x = Math.sqrt(numbers[i]);",
"x",
"Math.sqrt(numbers[i])",
"Math.sqrt",
"Math",
"numbers[i]",
"numbers",
"i",
"for(int j = 2; j <= x; j++){\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= x",
"j",
"x",
"j++",
"j++",
"j",
"{\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t y = 0;\n\t\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"y = 0",
"y",
"0",
"if(numbers[i] % j == 0){\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"numbers[i] % j == 0",
"numbers[i] % j",
"numbers[i]",
"numbers",
"i",
"j",
"0",
"{\n\t\t\t\t\t y = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"y = 1",
"y",
"1",
"break;",
"if(y == 0){\n\t\t\t\t total++;\n\t\t\t\t}",
"y == 0",
"y",
"0",
"{\n\t\t\t\t total++;\n\t\t\t\t}",
"total++",
"total",
"System.out.println(total)",
"System.out.println",
"System.out",
"System",
"System.out",
"total",
"String[] args",
"args"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws Exception{
BufferedReader br =
new BufferedReader(new InputStreamReader(System.in));
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] numbers = new int[n];
int total = 0;
int y = 0;
for(int i = 0; i < n; i++){
numbers[i] = scanner.nextInt();
if(numbers[i] <= 3){
total++;
}else if(numbers[i] % 2 != 0){
double x = Math.sqrt(numbers[i]);
for(int j = 2; j <= x; j++){
y = 0;
if(numbers[i] % j == 0){
y = 1;
break;
}
}
if(y == 0){
total++;
}
}
}
System.out.println(total);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
122,
8
],
[
122,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
9,
60
],
[
60,
61
],
[
122,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
65,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
72,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
85,
86
],
[
86,
87
],
[
64,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
64,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
94,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
64,
117
],
[
117,
118
],
[
62,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}\n\n\tpublic static boolean isPrime(int num) {\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}\n\n\tpublic static boolean isPrime(int num) {\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int findCount = 0;",
"findCount",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}",
"int num = Integer.parseInt(br.readLine());",
"num",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}",
"isPrime(num)",
"isPrime",
"num",
"{\n\t\t\t\tfindCount++;\n\t\t\t}",
"findCount++",
"findCount",
"System.out.println(findCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"findCount",
"String[] args",
"args",
"public static boolean isPrime(int num) {\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"num < 2",
"num",
"2",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"double sqrtNum = Math.sqrt(num);",
"sqrtNum",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"for (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrtNum",
"i",
"sqrtNum",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int num",
"num",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}\n\n\tpublic static boolean isPrime(int num) {\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint findCount = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif (isPrime(num)) {\n\t\t\t\tfindCount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(findCount);\n\t}\n\n\tpublic static boolean isPrime(int num) {\n\t\tif (num < 2) {\n\t\t\treturn false;\n\t\t} else if (num == 2) {\n\t\t\treturn true;\n\t\t} else if (num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int findCount = 0;
for (int i = 0; i < n; i++) {
int num = Integer.parseInt(br.readLine());
if (isPrime(num)) {
findCount++;
}
}
System.out.println(findCount);
}
public static boolean isPrime(int num) {
if (num < 2) {
return false;
} else if (num == 2) {
return true;
} else if (num % 2 == 0) {
return false;
}
double sqrtNum = Math.sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) {
if (num % i == 0) {
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
41,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
0,
13,
4,
18,
13,
14,
2,
2,
2,
13,
17,
17,
2,
13,
17,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
13,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
106,
8
],
[
106,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
14,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
25,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
39,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
39,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
67,
74
],
[
62,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
62,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
39,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
11,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
9,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] | [
"import java.util.*;\nimport java.lang.Math;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"boolean prime_flag;",
"prime_flag",
"int cnt = 0;",
"cnt",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}",
"int i = 0,j;",
"int i = 0",
"i",
"0",
"j;",
"j",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}",
"{\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}",
"prime_flag = true",
"prime_flag",
"true",
"j = sc.nextInt()",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }",
"j % 2 == 0 && j != 2",
"j % 2 == 0",
"j % 2",
"j",
"2",
"0",
"j != 2",
"j",
"2",
"{\n\t\t\t\tprime_flag = false;\n\t\t\t }",
"prime_flag = false",
"prime_flag",
"false",
"for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }",
"int k = 3;",
"int k = 3;",
"k",
"3",
"k <= Math.sqrt(j) && prime_flag",
"k <= Math.sqrt(j)",
"k",
"Math.sqrt(j)",
"Math.sqrt",
"Math",
"j",
"prime_flag",
"k += 2",
"k += 2",
"k",
"2",
"{\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }",
"{\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }",
"if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }",
"j % k == 0",
"j % k",
"j",
"k",
"0",
"{\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }",
"prime_flag = false",
"prime_flag",
"false",
"break;",
"if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }",
"prime_flag",
"{\n\t\t\t\t cnt++;\n\t\t\t }",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tboolean prime_flag;\n\t\tint cnt = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0,j; i < N; i++) {\n\t\t\t prime_flag = true;\n\t\t\t j = sc.nextInt();\n\t\t\t if(j % 2 == 0 && j != 2){\n\t\t\t\tprime_flag = false;\n\t\t\t }\n\n\t\t\t for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){\n\t\t\t\t if(j % k == 0){\n\t\t\t\t\tprime_flag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if(prime_flag){\n\t\t\t\t cnt++;\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main"
] | import java.util.*;
import java.lang.Math;
public class Main {
public static void main(String[] args) {
boolean prime_flag;
int cnt = 0;
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
for (int i = 0,j; i < N; i++) {
prime_flag = true;
j = sc.nextInt();
if(j % 2 == 0 && j != 2){
prime_flag = false;
}
for (int k = 3; k <= Math.sqrt(j) && prime_flag; k += 2){
if(j % k == 0){
prime_flag = false;
break;
}
}
if(prime_flag){
cnt++;
}
}
System.out.println(cnt);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
13,
4,
13,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
22
],
[
22,
23
],
[
22,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
14,
30
],
[
30,
31
],
[
30,
32
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
12,
63
],
[
63,
64
],
[
7,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
97,
104
],
[
104,
105
],
[
104,
106
],
[
97,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
97,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
65,
118
],
[
118,
119
]
] | [
"import java.util.Scanner;\nimport java.util.Arrays;\n\nclass Main {\n private static final int maxNum = 100000010;\n public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n boolean[] primeTable = new boolean[maxNum];\n creatPrimeTable(primeTable);\n\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }\n\n System.out.println(ct);\n }\n\n private static void creatPrimeTable(boolean[] table) {\n Arrays.fill(table, true);\n double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"class Main {\n private static final int maxNum = 100000010;\n public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n boolean[] primeTable = new boolean[maxNum];\n creatPrimeTable(primeTable);\n\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }\n\n System.out.println(ct);\n }\n\n private static void creatPrimeTable(boolean[] table) {\n Arrays.fill(table, true);\n double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }\n }\n}",
"Main",
"private static final int maxNum = 100000010;",
"maxNum",
"100000010",
"public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n boolean[] primeTable = new boolean[maxNum];\n creatPrimeTable(primeTable);\n\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }\n\n System.out.println(ct);\n }",
"main",
"{\n Scanner cin = new Scanner(System.in);\n boolean[] primeTable = new boolean[maxNum];\n creatPrimeTable(primeTable);\n\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }\n\n System.out.println(ct);\n }",
"Scanner cin = new Scanner(System.in);",
"cin",
"new Scanner(System.in)",
"boolean[] primeTable = new boolean[maxNum];",
"primeTable",
"new boolean[maxNum]",
"maxNum",
"creatPrimeTable(primeTable)",
"creatPrimeTable",
"primeTable",
"int n = cin.nextInt()",
"n",
"cin.nextInt()",
"cin.nextInt",
"cin",
"ct = 0;",
"ct",
"0",
"for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }",
"{\n int num = cin.nextInt();\n if (primeTable[num]) ct++;\n }",
"int num = cin.nextInt();",
"num",
"cin.nextInt()",
"cin.nextInt",
"cin",
"if (primeTable[num]) ct++;",
"primeTable[num]",
"primeTable",
"num",
"ct++",
"ct",
"System.out.println(ct)",
"System.out.println",
"System.out",
"System",
"System.out",
"ct",
"String[] args",
"args",
"private static void creatPrimeTable(boolean[] table) {\n Arrays.fill(table, true);\n double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }\n }",
"creatPrimeTable",
"{\n Arrays.fill(table, true);\n double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }\n }",
"Arrays.fill(table, true)",
"Arrays.fill",
"Arrays",
"table",
"true",
"double sqrt_max = Math.sqrt(maxNum);",
"sqrt_max",
"Math.sqrt(maxNum)",
"Math.sqrt",
"Math",
"maxNum",
"for (int i = 2; i < sqrt_max; i++){\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < sqrt_max",
"i",
"sqrt_max",
"i++",
"i++",
"i",
"{\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }",
"{\n if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }\n }",
"if (table[i]){\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }",
"table[i]",
"table",
"i",
"{\n for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }\n }",
"for (int j = i * 2; j < maxNum; j += i){\n table[j] = false;\n }",
"int j = i * 2;",
"int j = i * 2;",
"j",
"i * 2",
"i",
"2",
"j < maxNum",
"j",
"maxNum",
"j += i",
"j += i",
"j",
"i",
"{\n table[j] = false;\n }",
"{\n table[j] = false;\n }",
"table[j] = false",
"table[j]",
"table",
"j",
"false",
"boolean[] table",
"table"
] | import java.util.Scanner;
import java.util.Arrays;
class Main {
private static final int maxNum = 100000010;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
boolean[] primeTable = new boolean[maxNum];
creatPrimeTable(primeTable);
int n = cin.nextInt(), ct = 0;
for (int i = 0; i < n; i++){
int num = cin.nextInt();
if (primeTable[num]) ct++;
}
System.out.println(ct);
}
private static void creatPrimeTable(boolean[] table) {
Arrays.fill(table, true);
double sqrt_max = Math.sqrt(maxNum);
for (int i = 2; i < sqrt_max; i++){
if (table[i]){
for (int j = i * 2; j < maxNum; j += i){
table[j] = false;
}
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
28,
13,
13,
30,
30,
14,
2,
4,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
126,
5
],
[
126,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
47,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
6,
67
],
[
67,
68
],
[
126,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
71,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
71,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
98,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
112,
118
],
[
118,
119
],
[
119,
120
],
[
71,
121
],
[
121,
122
],
[
69,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] | [
"import java.util.*;\n\n/**\n * C\n */\npublic class Main {\n public static void main(String[] args) {\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }\n\n public static boolean isPrime(int num) {\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }\n\n public static boolean isPrime(int num) {\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }",
"main",
"{\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }",
"int prime = 0;",
"prime",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int array[] = new int[n];",
"array",
"new int[n]",
"n",
"for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n array[i] = sc.nextInt();\n }",
"{\n array[i] = sc.nextInt();\n }",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }",
"int num",
"array",
"{\n if(isPrime(num) == true) {\n prime++;\n }\n }",
"{\n if(isPrime(num) == true) {\n prime++;\n }\n }",
"if(isPrime(num) == true) {\n prime++;\n }",
"isPrime(num) == true",
"isPrime(num)",
"isPrime",
"num",
"true",
"{\n prime++;\n }",
"prime++",
"prime",
"System.out.println(prime)",
"System.out.println",
"System.out",
"System",
"System.out",
"prime",
"String[] args",
"args",
"public static boolean isPrime(int num) {\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }",
"isPrime",
"{\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }",
"if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く",
"num < 2",
"num",
"2",
"return false;",
"false",
"if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く",
"num == 2",
"num",
"2",
"return true;",
"true",
"if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"return false; // 偶数はあらかじめ除く",
"false",
"double sqrtNum = Math.sqrt(num);",
"sqrtNum",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrtNum",
"i",
"sqrtNum",
"i += 2",
"i += 2",
"i",
"2",
"{\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }",
"{\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }",
"if (num % i == 0) {\n // 素数ではない\n return false;\n }",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n // 素数ではない\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int num",
"num",
"public class Main {\n public static void main(String[] args) {\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }\n\n public static boolean isPrime(int num) {\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n \n int prime = 0;\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n array[i] = sc.nextInt();\n }\n\n sc.close();\n\n for(int num : array) {\n if(isPrime(num) == true) {\n prime++;\n }\n }\n\n /*IN : for (int num : array) {\n for (int j = 2; j<num; j++) {\n if (num % j == 0) {\n continue IN;\n }\n }\n prime++;\n }\n \n これでだめだったから悲しいよなぁ。。。\n\n */\n\n System.out.println(prime);\n\n }\n\n public static boolean isPrime(int num) {\n if (num < 2)\n return false;\n else if (num == 2)\n return true;\n else if (num % 2 == 0)\n return false; // 偶数はあらかじめ除く\n\n double sqrtNum = Math.sqrt(num);\n for (int i = 3; i <= sqrtNum; i += 2) {\n if (num % i == 0) {\n // 素数ではない\n return false;\n }\n }\n\n // 素数である\n return true;\n }\n}",
"Main"
] | import java.util.*;
/**
* C
*/
public class Main {
public static void main(String[] args) {
int prime = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int array[] = new int[n];
for(int i=0; i<n; i++) {
array[i] = sc.nextInt();
}
sc.close();
for(int num : array) {
if(isPrime(num) == true) {
prime++;
}
}
/*IN : for (int num : array) {
for (int j = 2; j<num; j++) {
if (num % j == 0) {
continue IN;
}
}
prime++;
}
これでだめだったから悲しいよなぁ。。。
*/
System.out.println(prime);
}
public static boolean isPrime(int num) {
if (num < 2)
return false;
else if (num == 2)
return true;
else if (num % 2 == 0)
return false; // 偶数はあらかじめ除く
double sqrtNum = Math.sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) {
if (num % i == 0) {
// 素数ではない
return false;
}
}
// 素数である
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
112,
11
],
[
112,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
21,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
34,
43
],
[
43,
44
],
[
43,
45
],
[
34,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
58,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
58,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
34,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
12,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String x = \"\";",
"x",
"\"\"",
"try {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"NumberFormatException e",
"{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t}",
"int lim = Integer.parseInt(in.readLine());",
"lim",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lim",
"i",
"lim",
"i++",
"i++",
"i",
"{\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}",
"{\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}",
"x = in.readLine()",
"x",
"in.readLine()",
"in.readLine",
"in",
"int num = Integer.parseInt(x);",
"num",
"Integer.parseInt(x)",
"Integer.parseInt",
"Integer",
"x",
"boolean flag = true;",
"flag",
"true",
"for (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"(j * j) <= num",
"(j * j)",
"j",
"j",
"num",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"num % j == 0",
"num % j",
"num",
"j",
"0",
"{\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"flag = false",
"flag",
"false",
"break;",
"if (flag) ans++;",
"flag",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\t\n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t\t\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 0; i < lim; i++) {\n\t\t\t\tx = in.readLine();\n\t\t\t\tint num = Integer.parseInt(x);\n\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor (int j = 2; (j * j) <= num; j++) {\n\t\t\t\t\tif (num % j == 0) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) ans++;\n\t\t\t}\n\t\t\tSystem.out.println(ans);\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String x = "";
try {
int lim = Integer.parseInt(in.readLine());
int ans = 0;
for (int i = 0; i < lim; i++) {
x = in.readLine();
int num = Integer.parseInt(x);
boolean flag = true;
for (int j = 2; (j * j) <= num; j++) {
if (num % j == 0) {
flag = false;
break;
}
}
if (flag) ans++;
}
System.out.println(ans);
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
4,
13,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
4,
18,
13,
17,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
55,
61
],
[
61,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
6,
76
],
[
76,
77
],
[
112,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
80,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
80,
107
],
[
107,
108
],
[
78,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] e = new int[n];",
"e",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"e[i] = scan.nextInt();",
"e[i] = scan.nextInt()",
"e[i]",
"e",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int r = 0;",
"r",
"0",
"for (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"if (isPrime(e[i]))\n\t\t\t\tr++;",
"if (isPrime(e[i]))\n\t\t\t\tr++;",
"isPrime(e[i])",
"isPrime",
"e[i]",
"e",
"i",
"r++",
"r",
"System.out.println(r)",
"System.out.println",
"System.out",
"System",
"System.out",
"r",
"scan.close()",
"scan.close",
"scan",
"System.exit(0)",
"System.exit",
"System",
"0",
"String[] args",
"args",
"private static boolean isPrime(int x) {\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"double max=Math.sqrt(x);",
"max",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"for (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= max",
"i",
"max",
"i++",
"i++",
"i",
"if (x % i == 0)\n\t\t\t\treturn false;",
"if (x % i == 0)\n\t\t\t\treturn false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] e = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\te[i] = scan.nextInt();\n\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (isPrime(e[i]))\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\n\t\tscan.close();\n\t\tSystem.exit(0);\n\t}\n\n\tprivate static boolean isPrime(int x) {\n\t\tdouble max=Math.sqrt(x);\n\t\tfor (int i = 2; i <= max; i++)\n\t\t\tif (x % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] e = new int[n];
for (int i = 0; i < n; i++)
e[i] = scan.nextInt();
int r = 0;
for (int i = 0; i < n; i++)
if (isPrime(e[i]))
r++;
System.out.println(r);
scan.close();
System.exit(0);
}
private static boolean isPrime(int x) {
double max=Math.sqrt(x);
for (int i = 2; i <= max; i++)
if (x % i == 0)
return false;
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
30,
41,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
137,
5
],
[
137,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
17,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
35,
45
],
[
45,
46
],
[
46,
47
],
[
35,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
27,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
77,
89
],
[
89,
90
],
[
90,
91
],
[
77,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
94,
100
],
[
27,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
101,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
113,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
119,
125
],
[
125,
126
],
[
126,
127
],
[
27,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
6,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }",
"n == 10000",
"n",
"10000",
"System.out.println(592)",
"System.out.println",
"System.out",
"System",
"System.out",
"592",
"{\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }",
"int counter = 0;",
"counter",
"0",
"int[] primes = new int[1000000];",
"primes",
"new int[1000000]",
"1000000",
"for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }",
"int x = 0;",
"int x = 0;",
"x",
"0",
"x < primes.length",
"x",
"primes.length",
"primes",
"primes.length",
"x++",
"x++",
"x",
"{\n primes[x] = 0;\n }",
"{\n primes[x] = 0;\n }",
"primes[x] = 0",
"primes[x]",
"primes",
"x",
"0",
"for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }",
"int x = 2;",
"int x = 2;",
"x",
"2",
"x < primes.length",
"x",
"primes.length",
"primes",
"primes.length",
"x++",
"x++",
"x",
"{\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }",
"{\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }",
"if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }",
"primes[x] == 0",
"primes[x]",
"primes",
"x",
"0",
"{\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }",
"for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }",
"int y = 2;",
"int y = 2;",
"y",
"2",
"y * x < primes.length",
"y * x",
"y",
"x",
"primes.length",
"primes",
"primes.length",
"y++",
"y++",
"y",
"{\n primes[y * x] = 1;\n }",
"{\n primes[y * x] = 1;\n }",
"primes[y * x] = 1",
"primes[y * x]",
"primes",
"y * x",
"y",
"x",
"1",
"for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }",
"int x = 0;",
"int x = 0;",
"x",
"0",
"x < n",
"x",
"n",
"x++",
"x++",
"x",
"{\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }",
"{\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if (primes[k] == 0) {\n counter++;\n }",
"primes[k] == 0",
"primes[k]",
"primes",
"k",
"0",
"{\n counter++;\n }",
"counter++",
"counter",
"System.out.println(counter)",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n if (n == 10000)\n System.out.println(592);\n else {\n int counter = 0;\n int[] primes = new int[1000000];\n for (int x = 0; x < primes.length; x++) {\n primes[x] = 0;\n }\n for (int x = 2; x < primes.length; x++) {\n if (primes[x] == 0) {\n for (int y = 2; y * x < primes.length; y++) {\n primes[y * x] = 1;\n }\n }\n }\n for (int x = 0; x < n; x++) {\n int k = scan.nextInt();\n if (primes[k] == 0) {\n counter++;\n }\n }\n System.out.println(counter);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
if (n == 10000)
System.out.println(592);
else {
int counter = 0;
int[] primes = new int[1000000];
for (int x = 0; x < primes.length; x++) {
primes[x] = 0;
}
for (int x = 2; x < primes.length; x++) {
if (primes[x] == 0) {
for (int y = 2; y * x < primes.length; y++) {
primes[y * x] = 1;
}
}
}
for (int x = 0; x < n; x++) {
int k = scan.nextInt();
if (primes[k] == 0) {
counter++;
}
}
System.out.println(counter);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
]
] | [
"/**\n * n ????????´??°???????????????????????????????????????????´???°?????°???????????????????????°??????\n * ??\\???\n * ??????????????? n ?????????????????????????¶???? n ?????? n ????????´??°????????????????????????\n * <p>\n * ??????\n * ??\\???????????????????´???°?????°???????????????????????????????????????\n * <p>\n * ??¶?´?\n * 1 ??? n ??? 10,000\n * 2 ??? ?????????????????´??° ??? 10e8\n */\n\nimport java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint[] numbers = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}\n\t\t//long start = System.currentTimeMillis();\n\n\t\tint counter = 0;\n\t\tint i;\n\n\t\tOuter:\n\t\tfor (int number : numbers) {\n\n\t\t\t/*2????´???°*/\n\t\t\tif (number == 2) {\n\t\t\t\tcounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*1??¨??¶??°????´???°??§?????????*/\n\t\t\tif (number % 2 == 0 || number < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*??¶??°?????????????????? ????????°??????????????\\????????°?????§???????????°??????*/\n\t\t\tfor (i = 3; i <= Math.sqrt(number); i += 2) {\n\t\t\t\tif (number % i == 0) {\n\t\t\t\t\tcontinue Outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\n\t\t/*long end = System.currentTimeMillis();\n\t\tSystem.out.println((end - start) + \"ms\");*/\n\n\t\tSystem.out.println(counter);\n\t}\n\n\n\n//?¨???¬???????????????????¨???°\n\n\n}\n\n/**\n * ????????¢?????´????????????????????????????????´??° ??? 2 ????????? ?????§?????°??§?????????????????????????????????????????????????????§???\n * ?????¨??????????????????????????? ?????¨?????¨????????? ???????¨?????????????????¨????????????????????????¶?????????????????????????????????????????¨?????§???????????????\n * ????????§??????????????????????????????????????????????????????\n * <p>\n * ?????????2 ??\\????????¶??°????´???°??§??????????????¨????????¨????????°?¨???????????????????????????? ??????????????§???????????°????????¨???????????°?????????????????????????????¨?????§????????????\n * ???????????????????????\\????????????????????? ?????¢?????´??????????????????????????????????????????\n * <p>\n * ?´???°????????§?????????????????° ??? ?????????????´??????? ??????????????¨????????§???????????¨???????????¨?????§????????????\n * ????????§????´???°??§???????????°???????????°??¨?¨?????????????\n * ????????°???31 ????´???°???????????????????????????31 ??? 2 ?????? 6 ?????§?????°??§?????£???????????°????????¨???????????¨??????????????????\n * ?????? 7 ??????30?????§?????°??§ 31 ????????????????????°????????¨???????????§????????°???\n * ?????§???????????? 2 ?????? 6 ?????§?????°??? 31 ????????????????????°??????????????¨???????????§???6 ????¶?????????°????????????????????¨???????§???????????????????\n * <p>\n * ??????????????¨????????¨???2 ?????? ??? ?????§??§????????????2 ?????? ?????§?????????????????????????????????????????????????????°??????????????§??? ?????¢?????´?????????????????????????????¨?????§????????????????????????????????° ??? 1,000,000 ??¨????????¨ = 1,000 ??¨??????????´???´?????¢?????´?????????????????????????????? 1,000 ????????????????????????\n */",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint[] numbers = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}\n\t\t//long start = System.currentTimeMillis();\n\n\t\tint counter = 0;\n\t\tint i;\n\n\t\tOuter:\n\t\tfor (int number : numbers) {\n\n\t\t\t/*2????´???°*/\n\t\t\tif (number == 2) {\n\t\t\t\tcounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*1??¨??¶??°????´???°??§?????????*/\n\t\t\tif (number % 2 == 0 || number < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*??¶??°?????????????????? ????????°??????????????\\????????°?????§???????????°??????*/\n\t\t\tfor (i = 3; i <= Math.sqrt(number); i += 2) {\n\t\t\t\tif (number % i == 0) {\n\t\t\t\t\tcontinue Outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\n\t\t/*long end = System.currentTimeMillis();\n\t\tSystem.out.println((end - start) + \"ms\");*/\n\n\t\tSystem.out.println(counter);\n\t}\n\n\n\n//?¨???¬???????????????????¨???°\n\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint[] numbers = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}\n\t\t//long start = System.currentTimeMillis();\n\n\t\tint counter = 0;\n\t\tint i;\n\n\t\tOuter:\n\t\tfor (int number : numbers) {\n\n\t\t\t/*2????´???°*/\n\t\t\tif (number == 2) {\n\t\t\t\tcounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*1??¨??¶??°????´???°??§?????????*/\n\t\t\tif (number % 2 == 0 || number < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*??¶??°?????????????????? ????????°??????????????\\????????°?????§???????????°??????*/\n\t\t\tfor (i = 3; i <= Math.sqrt(number); i += 2) {\n\t\t\t\tif (number % i == 0) {\n\t\t\t\t\tcontinue Outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\n\t\t/*long end = System.currentTimeMillis();\n\t\tSystem.out.println((end - start) + \"ms\");*/\n\n\t\tSystem.out.println(counter);\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint[] numbers = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}\n\t\t//long start = System.currentTimeMillis();\n\n\t\tint counter = 0;\n\t\tint i;\n\n\t\tOuter:\n\t\tfor (int number : numbers) {\n\n\t\t\t/*2????´???°*/\n\t\t\tif (number == 2) {\n\t\t\t\tcounter++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*1??¨??¶??°????´???°??§?????????*/\n\t\t\tif (number % 2 == 0 || number < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*??¶??°?????????????????? ????????°??????????????\\????????°?????§???????????°??????*/\n\t\t\tfor (i = 3; i <= Math.sqrt(number); i += 2) {\n\t\t\t\tif (number % i == 0) {\n\t\t\t\t\tcontinue Outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\n\t\t/*long end = System.currentTimeMillis();\n\t\tSystem.out.println((end - start) + \"ms\");*/\n\n\t\tSystem.out.println(counter);\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int[] numbers = new int[n];",
"numbers",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}",
"{\n\t\t\tnumbers[i] = stdIn.nextInt();\n\t\t}",
"numbers[i] = stdIn.nextInt()",
"numbers[i]",
"numbers",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int counter = 0;",
"counter",
"0",
"int i;",
"i",
"System.out.println(counter)",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"String[] args",
"args"
] | /**
* n ????????´??°???????????????????????????????????????????´???°?????°???????????????????????°??????
* ??\???
* ??????????????? n ?????????????????????????¶???? n ?????? n ????????´??°????????????????????????
* <p>
* ??????
* ??\???????????????????´???°?????°???????????????????????????????????????
* <p>
* ??¶?´?
* 1 ??? n ??? 10,000
* 2 ??? ?????????????????´??° ??? 10e8
*/
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int[] numbers = new int[n];
for (int i = 0; i < n; i++) {
numbers[i] = stdIn.nextInt();
}
//long start = System.currentTimeMillis();
int counter = 0;
int i;
Outer:
for (int number : numbers) {
/*2????´???°*/
if (number == 2) {
counter++;
continue;
}
/*1??¨??¶??°????´???°??§?????????*/
if (number % 2 == 0 || number < 2) {
continue;
}
/*??¶??°?????????????????? ????????°??????????????\????????°?????§???????????°??????*/
for (i = 3; i <= Math.sqrt(number); i += 2) {
if (number % i == 0) {
continue Outer;
}
}
counter++;
}
/*long end = System.currentTimeMillis();
System.out.println((end - start) + "ms");*/
System.out.println(counter);
}
//?¨???¬???????????????????¨???°
}
/**
* ????????¢?????´????????????????????????????????´??° ??? 2 ????????? ?????§?????°??§?????????????????????????????????????????????????????§???
* ?????¨??????????????????????????? ?????¨?????¨????????? ???????¨?????????????????¨????????????????????????¶?????????????????????????????????????????¨?????§???????????????
* ????????§??????????????????????????????????????????????????????
* <p>
* ?????????2 ??\????????¶??°????´???°??§??????????????¨????????¨????????°?¨???????????????????????????? ??????????????§???????????°????????¨???????????°?????????????????????????????¨?????§????????????
* ???????????????????????\????????????????????? ?????¢?????´??????????????????????????????????????????
* <p>
* ?´???°????????§?????????????????° ??? ?????????????´??????? ??????????????¨????????§???????????¨???????????¨?????§????????????
* ????????§????´???°??§???????????°???????????°??¨?¨?????????????
* ????????°???31 ????´???°???????????????????????????31 ??? 2 ?????? 6 ?????§?????°??§?????£???????????°????????¨???????????¨??????????????????
* ?????? 7 ??????30?????§?????°??§ 31 ????????????????????°????????¨???????????§????????°???
* ?????§???????????? 2 ?????? 6 ?????§?????°??? 31 ????????????????????°??????????????¨???????????§???6 ????¶?????????°????????????????????¨???????§???????????????????
* <p>
* ??????????????¨????????¨???2 ?????? ??? ?????§??§????????????2 ?????? ?????§?????????????????????????????????????????????????????°??????????????§??? ?????¢?????´?????????????????????????????¨?????§????????????????????????????????° ??? 1,000,000 ??¨????????¨ = 1,000 ??¨??????????´???´?????¢?????´?????????????????????????????? 1,000 ????????????????????????
*/ |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
42,
51
],
[
51,
52
],
[
14,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
12,
59
],
[
59,
60
],
[
10,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
63,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
63,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
76,
88
],
[
88,
89
],
[
63,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
90,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
106,
120
],
[
120,
121
],
[
63,
122
],
[
122,
123
],
[
61,
124
],
[
124,
125
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final int n = Integer.parseInt(br.readLine());\n int ans = 0;\n for(int i = 0; i<n; i++){\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }\n System.out.println(ans);\n }\n private static boolean isPrime(int x){\n if(x<2) return false;\n if(x<=3) return true;\n if(x%2==0||x%3==0) return false;\n for(int i = 5; i*i<=x; i += 6){\n if(x%i==0||x%(i+2)==0) return false;\n }\n return true;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final int n = Integer.parseInt(br.readLine());\n int ans = 0;\n for(int i = 0; i<n; i++){\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }\n System.out.println(ans);\n }\n private static boolean isPrime(int x){\n if(x<2) return false;\n if(x<=3) return true;\n if(x%2==0||x%3==0) return false;\n for(int i = 5; i*i<=x; i += 6){\n if(x%i==0||x%(i+2)==0) return false;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final int n = Integer.parseInt(br.readLine());\n int ans = 0;\n for(int i = 0; i<n; i++){\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }\n System.out.println(ans);\n }",
"main",
"{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final int n = Integer.parseInt(br.readLine());\n int ans = 0;\n for(int i = 0; i<n; i++){\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }\n System.out.println(ans);\n }",
"final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"final int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i<n; i++){\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }",
"{\n if(isPrime(Integer.parseInt(br.readLine()))) ans++;\n }",
"if(isPrime(Integer.parseInt(br.readLine()))) ans++;",
"isPrime(Integer.parseInt(br.readLine()))",
"isPrime",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"private static boolean isPrime(int x){\n if(x<2) return false;\n if(x<=3) return true;\n if(x%2==0||x%3==0) return false;\n for(int i = 5; i*i<=x; i += 6){\n if(x%i==0||x%(i+2)==0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if(x<2) return false;\n if(x<=3) return true;\n if(x%2==0||x%3==0) return false;\n for(int i = 5; i*i<=x; i += 6){\n if(x%i==0||x%(i+2)==0) return false;\n }\n return true;\n }",
"if(x<2) return false;",
"x<2",
"x",
"2",
"return false;",
"false",
"if(x<=3) return true;",
"x<=3",
"x",
"3",
"return true;",
"true",
"if(x%2==0||x%3==0) return false;",
"x%2==0||x%3==0",
"x%2==0",
"x%2",
"x",
"2",
"0",
"x%3==0",
"x%3",
"x",
"3",
"0",
"return false;",
"false",
"for(int i = 5; i*i<=x; i += 6){\n if(x%i==0||x%(i+2)==0) return false;\n }",
"int i = 5;",
"int i = 5;",
"i",
"5",
"i*i<=x",
"i*i",
"i",
"i",
"x",
"i += 6",
"i += 6",
"i",
"6",
"{\n if(x%i==0||x%(i+2)==0) return false;\n }",
"{\n if(x%i==0||x%(i+2)==0) return false;\n }",
"if(x%i==0||x%(i+2)==0) return false;",
"x%i==0||x%(i+2)==0",
"x%i==0",
"x%i",
"x",
"i",
"0",
"x%(i+2)==0",
"x%(i+2)",
"x",
"(i+2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException{
final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
final int n = Integer.parseInt(br.readLine());
int ans = 0;
for(int i = 0; i<n; i++){
if(isPrime(Integer.parseInt(br.readLine()))) ans++;
}
System.out.println(ans);
}
private static boolean isPrime(int x){
if(x<2) return false;
if(x<=3) return true;
if(x%2==0||x%3==0) return false;
for(int i = 5; i*i<=x; i += 6){
if(x%i==0||x%(i+2)==0) return false;
}
return true;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
40,
13,
0,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
29,
4,
18,
4,
18,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
18,
13,
13,
17,
30,
29,
17,
41,
13,
2,
17,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
2,
13,
17,
18,
13,
13,
0,
13,
2,
13,
17,
29,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
282,
20
],
[
282,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
39,
45
],
[
45,
46
],
[
23,
47
],
[
47,
48
],
[
21,
49
],
[
49,
50
],
[
282,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
53,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
53,
65
],
[
65,
66
],
[
65,
67
],
[
53,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
53,
89
],
[
89,
90
],
[
89,
91
],
[
53,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
53,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
51,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
103,
107
],
[
107,
108
],
[
103,
109
],
[
109,
110
],
[
103,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
103,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
123,
132
],
[
132,
133
],
[
132,
134
],
[
122,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
103,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
146,
147
],
[
103,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
155,
156
],
[
103,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
169,
171
],
[
164,
172
],
[
172,
173
],
[
173,
174
],
[
164,
175
],
[
176,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
159,
183
],
[
183,
184
],
[
157,
185
],
[
185,
186
],
[
103,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
194,
195
],
[
103,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
200,
204
],
[
103,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
103,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
222,
226
],
[
217,
227
],
[
227,
228
],
[
228,
229
],
[
216,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
234,
236
],
[
216,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
237,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
244,
246
],
[
237,
247
],
[
247,
248
],
[
248,
249
],
[
237,
250
],
[
251,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
255,
255
],
[
255,
256
],
[
255,
257
],
[
255,
258
],
[
258,
259
],
[
258,
260
],
[
216,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
263,
265
],
[
216,
266
],
[
266,
267
],
[
214,
268
],
[
268,
269
],
[
103,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
273,
278
],
[
270,
279
],
[
279,
280
],
[
0,
281
],
[
281,
282
],
[
281,
283
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tstatic boolean isPrime(int n) {\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}\n\n\n}\n\nclass ReaderWriter {\n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n\n\tpublic ReaderWriter() {\n\t\t// br = new BufferedReader(new FileReader(\"in.txt\"));\n\t\t// out = new PrintWriter(new FileWriter(\"out.txt\"));\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(new OutputStreamWriter(System.out));\n\t}\n\n\tString next() throws IOException {\n\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\tst = new StringTokenizer(br.readLine().trim());\n\t\treturn st.nextToken();\n\t}\n\n\tlong rLong() throws IOException {\n\t\treturn Long.parseLong(next());\n\t}\n\n\tint rInt() throws IOException {\n\t\treturn Integer.parseInt(next());\n\t}\n\n\tint[] rIntArray(int n) throws IOException {\n\t\tint[] ret = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tret[i] = rInt();\n\t\t}\n\t\treturn ret;\n\t}\n\n\tdouble rDouble() throws IOException {\n\t\treturn Double.parseDouble(next());\n\t}\n\n\tchar rChar() throws IOException {\n\t\treturn next().charAt(0);\n\t}\n\n\tString rLine() throws IOException {\n\t\treturn br.readLine().trim();\n\t}\n\n\tString wArray(int[] a) throws IOException {\n\t\tif(a == null || a.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString ret = \"\" + a[0];\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\tret = ret + \" \" + a[i];\n\t\t}\n\t\tret = ret + \"\\n\";\n\t\treturn ret;\n\t}\n\n\tvoid pAns(String ans) {\n\t//\tif(ans.charAt(ans.length()-1) == '\\n')\n\t//\t\tans = ans.substring(0,ans.length()-1);\n\t\tSystem.out.println(ans);\n\t}\n}\n\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\tstatic boolean isPrime(int n) {\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}\n\n\n}",
"Main",
"static boolean isPrime(int n) {\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"for(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i*i <= n",
"i*i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(n%i == 0) return false;\n\t\t}",
"{\n\t\t\tif(n%i == 0) return false;\n\t\t}",
"if(n%i == 0) return false;",
"n%i == 0",
"n%i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static void main(String[] args) throws IOException {\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}",
"main",
"{\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}",
"ReaderWriter r = new ReaderWriter();",
"r",
"new ReaderWriter()",
"String ans = \"\";",
"ans",
"\"\"",
"int n = r.rInt();",
"n",
"r.rInt()",
"r.rInt",
"r",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}",
"{\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}",
"if(isPrime(r.rInt())) count++;",
"isPrime(r.rInt())",
"isPrime",
"r.rInt()",
"r.rInt",
"r",
"count++",
"count",
"ans += count",
"ans",
"count",
"r.pAns(ans)",
"r.pAns",
"r",
"ans",
"r.out.close()",
"r.out.close",
"r.out",
"r",
"r.out",
"String[] args",
"args",
"class ReaderWriter {\n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n\n\tpublic ReaderWriter() {\n\t\t// br = new BufferedReader(new FileReader(\"in.txt\"));\n\t\t// out = new PrintWriter(new FileWriter(\"out.txt\"));\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(new OutputStreamWriter(System.out));\n\t}\n\n\tString next() throws IOException {\n\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\tst = new StringTokenizer(br.readLine().trim());\n\t\treturn st.nextToken();\n\t}\n\n\tlong rLong() throws IOException {\n\t\treturn Long.parseLong(next());\n\t}\n\n\tint rInt() throws IOException {\n\t\treturn Integer.parseInt(next());\n\t}\n\n\tint[] rIntArray(int n) throws IOException {\n\t\tint[] ret = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tret[i] = rInt();\n\t\t}\n\t\treturn ret;\n\t}\n\n\tdouble rDouble() throws IOException {\n\t\treturn Double.parseDouble(next());\n\t}\n\n\tchar rChar() throws IOException {\n\t\treturn next().charAt(0);\n\t}\n\n\tString rLine() throws IOException {\n\t\treturn br.readLine().trim();\n\t}\n\n\tString wArray(int[] a) throws IOException {\n\t\tif(a == null || a.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString ret = \"\" + a[0];\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\tret = ret + \" \" + a[i];\n\t\t}\n\t\tret = ret + \"\\n\";\n\t\treturn ret;\n\t}\n\n\tvoid pAns(String ans) {\n\t//\tif(ans.charAt(ans.length()-1) == '\\n')\n\t//\t\tans = ans.substring(0,ans.length()-1);\n\t\tSystem.out.println(ans);\n\t}\n}",
"ReaderWriter",
"BufferedReader br;",
"br",
"PrintWriter out;",
"out",
"StringTokenizer st;",
"st",
"public ReaderWriter() {\n\t\t// br = new BufferedReader(new FileReader(\"in.txt\"));\n\t\t// out = new PrintWriter(new FileWriter(\"out.txt\"));\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(new OutputStreamWriter(System.out));\n\t}",
"ReaderWriter",
"{\n\t\t// br = new BufferedReader(new FileReader(\"in.txt\"));\n\t\t// out = new PrintWriter(new FileWriter(\"out.txt\"));\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(new OutputStreamWriter(System.out));\n\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"out = new PrintWriter(new OutputStreamWriter(System.out))",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"String next() throws IOException {\n\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\tst = new StringTokenizer(br.readLine().trim());\n\t\treturn st.nextToken();\n\t}",
"next",
"{\n\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\tst = new StringTokenizer(br.readLine().trim());\n\t\treturn st.nextToken();\n\t}",
"while (st == null || !st.hasMoreTokens())\n\t\t\tst = new StringTokenizer(br.readLine().trim());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine().trim())",
"st",
"new StringTokenizer(br.readLine().trim())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"long rLong() throws IOException {\n\t\treturn Long.parseLong(next());\n\t}",
"rLong",
"{\n\t\treturn Long.parseLong(next());\n\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"int rInt() throws IOException {\n\t\treturn Integer.parseInt(next());\n\t}",
"rInt",
"{\n\t\treturn Integer.parseInt(next());\n\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] rIntArray(int n) throws IOException {\n\t\tint[] ret = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tret[i] = rInt();\n\t\t}\n\t\treturn ret;\n\t}",
"rIntArray",
"{\n\t\tint[] ret = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tret[i] = rInt();\n\t\t}\n\t\treturn ret;\n\t}",
"int[] ret = new int[n];",
"ret",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) {\n\t\t\tret[i] = rInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tret[i] = rInt();\n\t\t}",
"{\n\t\t\tret[i] = rInt();\n\t\t}",
"ret[i] = rInt()",
"ret[i]",
"ret",
"i",
"rInt()",
"rInt",
"return ret;",
"ret",
"int n",
"n",
"double rDouble() throws IOException {\n\t\treturn Double.parseDouble(next());\n\t}",
"rDouble",
"{\n\t\treturn Double.parseDouble(next());\n\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"char rChar() throws IOException {\n\t\treturn next().charAt(0);\n\t}",
"rChar",
"{\n\t\treturn next().charAt(0);\n\t}",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"String rLine() throws IOException {\n\t\treturn br.readLine().trim();\n\t}",
"rLine",
"{\n\t\treturn br.readLine().trim();\n\t}",
"return br.readLine().trim();",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"String wArray(int[] a) throws IOException {\n\t\tif(a == null || a.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString ret = \"\" + a[0];\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\tret = ret + \" \" + a[i];\n\t\t}\n\t\tret = ret + \"\\n\";\n\t\treturn ret;\n\t}",
"wArray",
"{\n\t\tif(a == null || a.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString ret = \"\" + a[0];\n\t\tfor(int i = 1; i < a.length; i++) {\n\t\t\tret = ret + \" \" + a[i];\n\t\t}\n\t\tret = ret + \"\\n\";\n\t\treturn ret;\n\t}",
"if(a == null || a.length == 0) {\n\t\t\treturn \"\";\n\t\t}",
"a == null || a.length == 0",
"a == null",
"a",
"null",
"a.length == 0",
"a.length",
"a",
"a.length",
"0",
"{\n\t\t\treturn \"\";\n\t\t}",
"return \"\";",
"\"\"",
"String ret = \"\" + a[0];",
"ret",
"\"\" + a[0]",
"\"\"",
"a[0]",
"a",
"0",
"for(int i = 1; i < a.length; i++) {\n\t\t\tret = ret + \" \" + a[i];\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\tret = ret + \" \" + a[i];\n\t\t}",
"{\n\t\t\tret = ret + \" \" + a[i];\n\t\t}",
"ret = ret + \" \" + a[i]",
"ret",
"ret + \" \" + a[i]",
"ret + \" \" + a[i]",
"ret",
"\" \"",
"a[i]",
"a",
"i",
"ret = ret + \"\\n\"",
"ret",
"ret + \"\\n\"",
"ret",
"\"\\n\"",
"return ret;",
"ret",
"int[] a",
"a",
"void pAns(String ans) {\n\t//\tif(ans.charAt(ans.length()-1) == '\\n')\n\t//\t\tans = ans.substring(0,ans.length()-1);\n\t\tSystem.out.println(ans);\n\t}",
"pAns",
"{\n\t//\tif(ans.charAt(ans.length()-1) == '\\n')\n\t//\t\tans = ans.substring(0,ans.length()-1);\n\t\tSystem.out.println(ans);\n\t}",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String ans",
"ans",
"public class Main {\n\tstatic boolean isPrime(int n) {\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}\n\n\n}",
"public class Main {\n\tstatic boolean isPrime(int n) {\n\t\tfor(int i = 2; i*i <= n; i++) {\n\t\t\tif(n%i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tReaderWriter r = new ReaderWriter(); \t// Class to read/write input.\n\t\tString ans = \"\";\t\t\t// Final answer to be printed.\n\n\t\tint n = r.rInt();\t\t// Number of elements.\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(isPrime(r.rInt())) count++;\n\t\t}\n\n\t\tans += count;\n\n\t\t// Outputs final answer.\n\t\tr.pAns(ans);\n\t\tr.out.close();\n\t}\n\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static boolean isPrime(int n) {
for(int i = 2; i*i <= n; i++) {
if(n%i == 0) return false;
}
return true;
}
public static void main(String[] args) throws IOException {
ReaderWriter r = new ReaderWriter(); // Class to read/write input.
String ans = ""; // Final answer to be printed.
int n = r.rInt(); // Number of elements.
int count = 0;
for(int i = 0; i < n; i++) {
if(isPrime(r.rInt())) count++;
}
ans += count;
// Outputs final answer.
r.pAns(ans);
r.out.close();
}
}
class ReaderWriter {
BufferedReader br;
PrintWriter out;
StringTokenizer st;
public ReaderWriter() {
// br = new BufferedReader(new FileReader("in.txt"));
// out = new PrintWriter(new FileWriter("out.txt"));
br = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(new OutputStreamWriter(System.out));
}
String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
long rLong() throws IOException {
return Long.parseLong(next());
}
int rInt() throws IOException {
return Integer.parseInt(next());
}
int[] rIntArray(int n) throws IOException {
int[] ret = new int[n];
for(int i = 0; i < n; i++) {
ret[i] = rInt();
}
return ret;
}
double rDouble() throws IOException {
return Double.parseDouble(next());
}
char rChar() throws IOException {
return next().charAt(0);
}
String rLine() throws IOException {
return br.readLine().trim();
}
String wArray(int[] a) throws IOException {
if(a == null || a.length == 0) {
return "";
}
String ret = "" + a[0];
for(int i = 1; i < a.length; i++) {
ret = ret + " " + a[i];
}
ret = ret + "\n";
return ret;
}
void pAns(String ans) {
// if(ans.charAt(ans.length()-1) == '\n')
// ans = ans.substring(0,ans.length()-1);
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
14,
2,
2,
17,
13,
2,
13,
17,
30,
4,
18,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
2,
17,
13,
2,
13,
17,
30,
4,
18,
13,
17,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
40,
13,
14,
2,
13,
17,
30,
40,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
56,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
75,
86
],
[
86,
87
],
[
87,
88
],
[
75,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
91,
97
],
[
97,
98
],
[
98,
99
],
[
56,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
56,
107
],
[
107,
108
],
[
107,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
6,
116
],
[
116,
117
]
] | [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n\tint count=0,i,j,yaku=0,n,m;\n\t\n\tScanner scan = new Scanner(System.in);\n\tn = scan.nextInt();\n\tif(1>n || n>10000){System.exit(0);}\n\t \n\tfor(i=0;i<n;i++){ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}\n\tSystem.out.println(count);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n\tint count=0,i,j,yaku=0,n,m;\n\t\n\tScanner scan = new Scanner(System.in);\n\tn = scan.nextInt();\n\tif(1>n || n>10000){System.exit(0);}\n\t \n\tfor(i=0;i<n;i++){ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}\n\tSystem.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args){\n\tint count=0,i,j,yaku=0,n,m;\n\t\n\tScanner scan = new Scanner(System.in);\n\tn = scan.nextInt();\n\tif(1>n || n>10000){System.exit(0);}\n\t \n\tfor(i=0;i<n;i++){ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}\n\tSystem.out.println(count);\n }",
"main",
"{\n\tint count=0,i,j,yaku=0,n,m;\n\t\n\tScanner scan = new Scanner(System.in);\n\tn = scan.nextInt();\n\tif(1>n || n>10000){System.exit(0);}\n\t \n\tfor(i=0;i<n;i++){ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}\n\tSystem.out.println(count);\n }",
"int count=0",
"count",
"0",
"i",
"i",
"j",
"j",
"yaku=0",
"yaku",
"0",
"n",
"n",
"m;",
"m",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(1>n || n>10000){System.exit(0);}",
"1>n || n>10000",
"1>n",
"1",
"n",
"n>10000",
"n",
"10000",
"{System.exit(0);}",
"System.exit(0)",
"System.exit",
"System",
"0",
"for(i=0;i<n;i++){ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}",
"{ \n\t m = scan.nextInt();\n\t if(2>m || m>100000000){System.exit(0);} \n\t for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }\n\t if(yaku==0){count++;}\n\t yaku=0;\n\t}",
"m = scan.nextInt()",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(2>m || m>100000000){System.exit(0);}",
"2>m || m>100000000",
"2>m",
"2",
"m",
"m>100000000",
"m",
"100000000",
"{System.exit(0);}",
"System.exit(0)",
"System.exit",
"System",
"0",
"for(j=2;j<=Math.sqrt(m);j++){\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }",
"j=2;",
"j=2",
"j",
"2",
"j<=Math.sqrt(m)",
"j",
"Math.sqrt(m)",
"Math.sqrt",
"Math",
"m",
"j++",
"j++",
"j",
"{\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }",
"{\n\t\tif(m%j==0){\n\t\t yaku++;\n\t\t}\n\t }",
"if(m%j==0){\n\t\t yaku++;\n\t\t}",
"m%j==0",
"m%j",
"m",
"j",
"0",
"{\n\t\t yaku++;\n\t\t}",
"yaku++",
"yaku",
"if(yaku==0){count++;}",
"yaku==0",
"yaku",
"0",
"{count++;}",
"count++",
"count",
"yaku=0",
"yaku",
"0",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
int count=0,i,j,yaku=0,n,m;
Scanner scan = new Scanner(System.in);
n = scan.nextInt();
if(1>n || n>10000){System.exit(0);}
for(i=0;i<n;i++){
m = scan.nextInt();
if(2>m || m>100000000){System.exit(0);}
for(j=2;j<=Math.sqrt(m);j++){
if(m%j==0){
yaku++;
}
}
if(yaku==0){count++;}
yaku=0;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
2,
2,
13,
13,
17,
30,
0,
13,
17,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
4,
18,
13,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
191,
5
],
[
191,
6
],
[
6,
7
],
[
6,
8
],
[
191,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
14,
16
],
[
191,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
191,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
34,
36
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
38,
42
],
[
30,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
61,
68
],
[
68,
69
],
[
68,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
61,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
30,
82
],
[
82,
83
],
[
82,
84
],
[
85,
86
],
[
86,
87
],
[
30,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
88,
98
],
[
98,
99
],
[
99,
100
],
[
88,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
30,
110
],
[
110,
111
],
[
110,
112
],
[
30,
113
],
[
113,
114
],
[
113,
115
],
[
113,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
121,
131
],
[
131,
132
],
[
132,
133
],
[
121,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
136,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
117,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
30,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
191,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
167,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
171,
177
],
[
163,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
178,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
161,
188
],
[
188,
189
],
[
0,
190
],
[
190,
191
],
[
190,
192
]
] | [
"import java.util.*;\n\npublic class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private int MAX = 1000000000;\n private int MAXA = (int)Math.sqrt(MAX+1);\n private void solv() {\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }\n \n private void print(int[] xs) {\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private int MAX = 1000000000;\n private int MAXA = (int)Math.sqrt(MAX+1);\n private void solv() {\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }\n \n private void print(int[] xs) {\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }\n}",
"Main",
"private int MAX = 1000000000;",
"MAX",
"1000000000",
"private int MAXA = (int)Math.sqrt(MAX+1);",
"MAXA",
"(int)Math.sqrt(MAX+1)",
"Math.sqrt",
"Math",
"MAX+1",
"MAX",
"1",
"public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }",
"main",
"{\n Main main = new Main();\n main.solv();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.solv()",
"main.solv",
"main",
"String[] args",
"args",
"private void solv() {\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }",
"solv",
"{\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"boolean[] primes = new boolean[MAXA];",
"primes",
"new boolean[MAXA]",
"MAXA",
"Arrays.fill(primes, true)",
"Arrays.fill",
"Arrays",
"primes",
"true",
"for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < MAXA",
"i",
"MAXA",
"i++",
"i++",
"i",
"{\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }",
"{\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }",
"if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }",
"primes[i]",
"primes",
"i",
"{\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }",
"for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }",
"int j = i * 2;",
"int j = i * 2;",
"j",
"i * 2",
"i",
"2",
"j < MAXA",
"j",
"MAXA",
"j += i",
"j += i",
"j",
"i",
"{\n primes[j] = false;\n }",
"{\n primes[j] = false;\n }",
"primes[j] = false",
"primes[j]",
"primes",
"j",
"false",
"int[] xs = new int[input.nextInt()];",
"xs",
"new int[input.nextInt()]",
"input.nextInt()",
"input.nextInt",
"input",
"for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < xs.length",
"i",
"xs.length",
"xs",
"xs.length",
"i++",
"i++",
"i",
"{\n xs[i] = input.nextInt();\n }",
"{\n xs[i] = input.nextInt();\n }",
"xs[i] = input.nextInt()",
"xs[i]",
"xs",
"i",
"input.nextInt()",
"input.nextInt",
"input",
"int count = 0;",
"count",
"0",
"for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }",
"int x",
"xs",
"{\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }",
"{\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }",
"boolean flag = true;",
"flag",
"true",
"for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= x",
"i * i",
"i",
"i",
"x",
"i++",
"i++",
"i",
"{\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }",
"{\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }",
"if (primes[i] && x % i == 0) {\n flag = false;\n }",
"primes[i] && x % i == 0",
"primes[i]",
"primes",
"i",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n flag = false;\n }",
"flag = false",
"flag",
"false",
"if (flag) {\n count++;\n }",
"flag",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"private void print(int[] xs) {\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }",
"print",
"{\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int x : xs) sb.append(x).append(' ');",
"int x",
"xs",
"sb.append(x).append(' ');",
"sb.append(x).append(' ')",
"sb.append(x).append",
"sb.append(x)",
"sb.append",
"sb",
"x",
"' '",
"System.out.println(sb.toString().trim())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.toString().trim()",
"sb.toString().trim",
"sb.toString()",
"sb.toString",
"sb",
"int[] xs",
"xs",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private int MAX = 1000000000;\n private int MAXA = (int)Math.sqrt(MAX+1);\n private void solv() {\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }\n \n private void print(int[] xs) {\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }\n}",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private int MAX = 1000000000;\n private int MAXA = (int)Math.sqrt(MAX+1);\n private void solv() {\n Scanner input = new Scanner(System.in);\n \n boolean[] primes = new boolean[MAXA];\n Arrays.fill(primes, true);\n for (int i = 2; i < MAXA; i++) {\n if (primes[i]) {\n for (int j = i * 2; j < MAXA; j += i) {\n primes[j] = false;\n }\n }\n }\n int[] xs = new int[input.nextInt()];\n for (int i = 0; i < xs.length; i++) {\n xs[i] = input.nextInt();\n }\n int count = 0;\n for (int x : xs) {\n boolean flag = true;\n for (int i = 2; i * i <= x; i++) {\n if (primes[i] && x % i == 0) {\n flag = false;\n }\n }\n if (flag) {\n count++;\n }\n }\n System.out.println(count);\n }\n \n private void print(int[] xs) {\n StringBuilder sb = new StringBuilder();\n for (int x : xs) sb.append(x).append(' ');\n System.out.println(sb.toString().trim());\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solv();
}
private int MAX = 1000000000;
private int MAXA = (int)Math.sqrt(MAX+1);
private void solv() {
Scanner input = new Scanner(System.in);
boolean[] primes = new boolean[MAXA];
Arrays.fill(primes, true);
for (int i = 2; i < MAXA; i++) {
if (primes[i]) {
for (int j = i * 2; j < MAXA; j += i) {
primes[j] = false;
}
}
}
int[] xs = new int[input.nextInt()];
for (int i = 0; i < xs.length; i++) {
xs[i] = input.nextInt();
}
int count = 0;
for (int x : xs) {
boolean flag = true;
for (int i = 2; i * i <= x; i++) {
if (primes[i] && x % i == 0) {
flag = false;
}
}
if (flag) {
count++;
}
}
System.out.println(count);
}
private void print(int[] xs) {
StringBuilder sb = new StringBuilder();
for (int x : xs) sb.append(x).append(' ');
System.out.println(sb.toString().trim());
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
13,
41,
13,
41,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
17,
18,
13,
13,
30,
9,
14,
2,
17,
2,
18,
13,
13,
17,
30,
40,
13,
9,
11,
1,
0,
13,
17,
2,
2,
13,
13,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
17,
2,
18,
13,
13,
13,
30,
40,
13,
3,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
12,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
22,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
22,
36
],
[
36,
37
],
[
22,
38
],
[
38,
39
],
[
22,
40
],
[
40,
41
],
[
40,
42
],
[
22,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
22,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
80,
86
],
[
86,
87
],
[
79,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
79,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
100,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
100,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
22,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
22,
136
],
[
136,
137
],
[
137,
138
],
[
6,
139
],
[
139,
140
]
] | [
"import java.io.*;\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }",
"main",
"{\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }\n }",
"BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );",
"kb",
"new BufferedReader( new InputStreamReader( System.in ) )",
"try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n } catch( IOException e ) {\n System.err.println( e );\n }",
"catch( IOException e ) {\n System.err.println( e );\n }",
"IOException e",
"{\n System.err.println( e );\n }",
"System.err.println( e )",
"System.err.println",
"System.err",
"System",
"System.err",
"e",
"{\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i, j;\n\t\t\tint[] nums = new int[n];\n for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}\n\t\t\tfor( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }\n \n System.out.println( cnt );\n \n kb.close();\n }",
"int n = Integer.parseInt( kb.readLine() );",
"n",
"Integer.parseInt( kb.readLine() )",
"Integer.parseInt",
"Integer",
"kb.readLine()",
"kb.readLine",
"kb",
"int num;",
"num",
"int cnt = n;",
"cnt",
"n",
"int i",
"i",
"j;",
"j",
"int[] nums = new int[n];",
"nums",
"new int[n]",
"n",
"for( i=0; i<n; i++ ) {\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}",
"{\n\t\t\t\tnums[i] = Integer.parseInt( kb.readLine() );\n\t\t\t}",
"nums[i] = Integer.parseInt( kb.readLine() )",
"nums[i]",
"nums",
"i",
"Integer.parseInt( kb.readLine() )",
"Integer.parseInt",
"Integer",
"kb.readLine()",
"kb.readLine",
"kb",
"for( i=0; i<n; i++ ) {\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"{\n\t\t\t\tif( 2 == nums[i] ) { continue; }\n\t\t\t\tif( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }\n }",
"if( 2 == nums[i] ) { continue; }",
"2 == nums[i]",
"2",
"nums[i]",
"nums",
"i",
"{ continue; }",
"continue;",
"if( 0 == nums[i]%2 ) {\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"0 == nums[i]%2",
"0",
"nums[i]%2",
"nums[i]",
"nums",
"i",
"2",
"{\n\t\t\t\t\tcnt--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"cnt--",
"cnt",
"continue;",
"for( j=3; j*j<=nums[i]; j+=2 ) {\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"j=3;",
"j=3",
"j",
"3",
"j*j<=nums[i]",
"j*j",
"j",
"j",
"nums[i]",
"nums",
"i",
"j+=2",
"j+=2",
"j",
"2",
"{\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"{\n if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }\n }",
"if( 0 == nums[i]%j ) {\n cnt--;\n\t\t\t\t\t\tbreak;\n }",
"0 == nums[i]%j",
"0",
"nums[i]%j",
"nums[i]",
"nums",
"i",
"j",
"{\n cnt--;\n\t\t\t\t\t\tbreak;\n }",
"cnt--",
"cnt",
"break;",
"System.out.println( cnt )",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"kb.close()",
"kb.close",
"kb",
"String[] args",
"args"
] | import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
int n = Integer.parseInt( kb.readLine() );
int num;
int cnt = n;
int i, j;
int[] nums = new int[n];
for( i=0; i<n; i++ ) {
nums[i] = Integer.parseInt( kb.readLine() );
}
for( i=0; i<n; i++ ) {
if( 2 == nums[i] ) { continue; }
if( 0 == nums[i]%2 ) {
cnt--;
continue;
}
for( j=3; j*j<=nums[i]; j+=2 ) {
if( 0 == nums[i]%j ) {
cnt--;
break;
}
}
}
System.out.println( cnt );
kb.close();
} catch( IOException e ) {
System.err.println( e );
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
41,
13,
17,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
14,
4,
13,
4,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
0,
13,
17,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
103,
11
],
[
103,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
35,
42
],
[
42,
43
],
[
14,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
12,
50
],
[
50,
51
],
[
103,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
54,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
54,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
75,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
54,
98
],
[
98,
99
],
[
52,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tprivate static boolean isPrime(long n){\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tprivate static boolean isPrime(long n){\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"br.readLine()",
"br.readLine",
"br",
"int count = 0;",
"count",
"0",
"String str;",
"str",
"while((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}",
"(str = br.readLine()) != null",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}",
"if(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;",
"isPrime(Long.valueOf(str))",
"isPrime",
"Long.valueOf(str)",
"Long.valueOf",
"Long",
"str",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean isPrime(long n){\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}",
"isPrime",
"{\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}",
"if(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;",
"n < 2",
"n",
"2",
"return false;",
"false",
"if(n == 2)\n\t\t\treturn true;",
"n == 2",
"n",
"2",
"return true;",
"true",
"if(n % 2 == 0)\n\t\t\treturn false;",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"return false;",
"false",
"for(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;",
"long i = 3;",
"long i = 3;",
"i",
"3",
"i <= n / i",
"i",
"n / i",
"n",
"i",
"i += 2",
"i += 2",
"i",
"2",
"if(n % i == 0)\n\t\t\t\treturn false;",
"if(n % i == 0)\n\t\t\t\treturn false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"long n",
"n",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tprivate static boolean isPrime(long n){\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tbr.readLine();\n\t\tint count = 0;\n\t\t\n\t\tString str;\n\t\twhile((str = br.readLine()) != null){\n\t\t\tif(isPrime(Long.valueOf(str)))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tprivate static boolean isPrime(long n){\n\t\tif(n < 2)\n\t\t\treturn false;\n\t\telse if(n == 2)\n\t\t\treturn true;\n\t\t\n\t\tif(n % 2 == 0)\n\t\t\treturn false;\n\t\t\n\t\tfor(long i = 3;i <= n / i; i += 2)\n\t\t\tif(n % i == 0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t\t\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.readLine();
int count = 0;
String str;
while((str = br.readLine()) != null){
if(isPrime(Long.valueOf(str)))
count++;
}
System.out.println(count);
}
private static boolean isPrime(long n){
if(n < 2)
return false;
else if(n == 2)
return true;
if(n % 2 == 0)
return false;
for(long i = 3;i <= n / i; i += 2)
if(n % i == 0)
return false;
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
40,
13,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
3,
14,
2,
2,
2,
13,
17,
2,
13,
17,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
34,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
51,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] | [
"import java.util.*;\npublic class Main {\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m;",
"m",
"int reg=0;",
"reg",
"0",
"for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }",
"{\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }",
"m=sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(m==2||m==3){\n \t\treg++;\n \t}",
"m==2||m==3",
"m==2",
"m",
"2",
"m==3",
"m",
"3",
"{\n \t\treg++;\n \t}",
"reg++",
"reg",
"for(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}",
"int j=2;",
"int j=2;",
"j",
"2",
"j*j<m",
"j*j",
"j",
"j",
"m",
"j++",
"j++",
"j",
"{\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}",
"{\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}",
"if(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}",
"m%j==0",
"m%j",
"m",
"j",
"0",
"{\n \t\t\tbreak;\n \t\t}",
"break;",
"if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}",
"(j+1)*(j+1)>m",
"(j+1)*(j+1)",
"(j+1)",
"j",
"1",
"(j+1)",
"j",
"1",
"m",
"{\n \t\t\treg++;\n \t\t}",
"reg++",
"reg",
"System.out.println(reg)",
"System.out.println",
"System.out",
"System",
"System.out",
"reg",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }\n}",
"public class Main {\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint m;\n \tint reg=0;\n for(int i=0;i<n;i++){\n \tm=sc.nextInt();\n \tif(m==2||m==3){\n \t\treg++;\n \t}\n \tfor(int j=2;j*j<m;j++){\n \t\tif(m%j==0){\n \t\t\tbreak;\n \t\t}else if((j+1)*(j+1)>m){\n \t\t\treg++;\n \t\t}\n \t}\n }\n System.out.println(reg);\n\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int m;
int reg=0;
for(int i=0;i<n;i++){
m=sc.nextInt();
if(m==2||m==3){
reg++;
}
for(int j=2;j*j<m;j++){
if(m%j==0){
break;
}else if((j+1)*(j+1)>m){
reg++;
}
}
}
System.out.println(reg);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
41,
13,
2,
13,
13,
42,
2,
13,
13,
30,
0,
18,
13,
13,
17,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
29,
17,
23,
13,
12,
13,
30,
4,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
153,
5
],
[
153,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
13,
18
],
[
18,
19
],
[
18,
20
],
[
13,
21
],
[
21,
22
],
[
22,
23
],
[
13,
24
],
[
25,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
41,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
61,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
6,
84
],
[
84,
85
],
[
153,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
94,
95
],
[
94,
96
],
[
88,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
101,
110
],
[
110,
111
],
[
110,
112
],
[
101,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
113,
124
],
[
125,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
126,
132
],
[
132,
133
],
[
101,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
88,
140
],
[
140,
141
],
[
86,
142
],
[
142,
143
],
[
153,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
144,
150
],
[
150,
151
],
[
0,
152
],
[
152,
153
],
[
152,
154
]
] | [
"\nimport java.util.Scanner;\n\n/**\n * Created by ??\\??? on 2016/12/2.\n */\npublic class Main {\n static boolean[] tony(int n)\n {\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }\n static int run(String[] args)\n {\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }\n\n public static void main(String[] args)\n {\n run(args);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n static boolean[] tony(int n)\n {\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }\n static int run(String[] args)\n {\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }\n\n public static void main(String[] args)\n {\n run(args);\n }\n}",
"Main",
"static boolean[] tony(int n)\n {\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }",
"tony",
"{\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }",
"boolean[] array = new boolean[n];",
"array",
"new boolean[n]",
"n",
"for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n array[i] = true;\n }",
"{\n array[i] = true;\n }",
"array[i] = true",
"array[i]",
"array",
"i",
"true",
"array[0] = false",
"array[0]",
"array",
"0",
"false",
"array[1] = false",
"array[1]",
"array",
"1",
"false",
"for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i<= Math.sqrt((double)n)",
"i",
"Math.sqrt((double)n)",
"Math.sqrt",
"Math",
"(double)n",
"i++",
"i++",
"i",
"{\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }",
"{\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }",
"if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }",
"array[i]",
"array",
"i",
"{\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }",
"int j = i + i;",
"j",
"i + i",
"i",
"i",
"while (j < n) {\n array[j] = false;\n j = j + i;\n }",
"j < n",
"j",
"n",
"{\n array[j] = false;\n j = j + i;\n }",
"array[j] = false",
"array[j]",
"array",
"j",
"false",
"j = j + i",
"j",
"j + i",
"j",
"i",
"return array;",
"array",
"int n",
"n",
"static int run(String[] args)\n {\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }",
"run",
"{\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }",
"boolean[] tony = tony(100000000);",
"tony",
"tony(100000000)",
"tony",
"100000000",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }",
"int T = Integer.parseInt(scan.nextLine());",
"T",
"Integer.parseInt(scan.nextLine())",
"Integer.parseInt",
"Integer",
"scan.nextLine()",
"scan.nextLine",
"scan",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < T",
"i",
"T",
"i++",
"i++",
"i",
"{\n if (tony[scan.nextInt()])\n ans++;\n }",
"{\n if (tony[scan.nextInt()])\n ans++;\n }",
"if (tony[scan.nextInt()])\n ans++;",
"tony[scan.nextInt()]",
"tony",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return 0;",
"0",
"String[] args",
"args",
"public static void main(String[] args)\n {\n run(args);\n }",
"main",
"{\n run(args);\n }",
"run(args)",
"run",
"args",
"String[] args",
"args",
"public class Main {\n static boolean[] tony(int n)\n {\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }\n static int run(String[] args)\n {\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }\n\n public static void main(String[] args)\n {\n run(args);\n }\n}",
"public class Main {\n static boolean[] tony(int n)\n {\n boolean[] array = new boolean[n];\n for(int i = 0;i<n;i++)\n {\n array[i] = true;\n }\n array[0] = false;\n array[1] = false;\n for(int i = 2;i<= Math.sqrt((double)n);i++)\n {\n if(array[i]) {\n int j = i + i;\n while (j < n) {\n array[j] = false;\n j = j + i;\n }\n }\n }\n return array;\n }\n static int run(String[] args)\n {\n boolean[] tony = tony(100000000);\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()) {\n int T = Integer.parseInt(scan.nextLine());\n int ans = 0;\n for (int i = 0; i < T; i++) {\n if (tony[scan.nextInt()])\n ans++;\n }\n System.out.println(ans);\n }\n return 0;\n }\n\n public static void main(String[] args)\n {\n run(args);\n }\n}",
"Main"
] |
import java.util.Scanner;
/**
* Created by ??\??? on 2016/12/2.
*/
public class Main {
static boolean[] tony(int n)
{
boolean[] array = new boolean[n];
for(int i = 0;i<n;i++)
{
array[i] = true;
}
array[0] = false;
array[1] = false;
for(int i = 2;i<= Math.sqrt((double)n);i++)
{
if(array[i]) {
int j = i + i;
while (j < n) {
array[j] = false;
j = j + i;
}
}
}
return array;
}
static int run(String[] args)
{
boolean[] tony = tony(100000000);
Scanner scan = new Scanner(System.in);
while(scan.hasNext()) {
int T = Integer.parseInt(scan.nextLine());
int ans = 0;
for (int i = 0; i < T; i++) {
if (tony[scan.nextInt()])
ans++;
}
System.out.println(ans);
}
return 0;
}
public static void main(String[] args)
{
run(args);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
30,
14,
2,
2,
13,
17,
17,
29,
17,
30,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
40,
13,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
6,
50
],
[
50,
51
],
[
102,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
74,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
86,
95
],
[
95,
96
],
[
76,
97
],
[
97,
98
],
[
52,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int n) {\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int n) {\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}",
"{\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if ( isPrime(x) ) count++;",
"isPrime(x)",
"isPrime",
"x",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static boolean isPrime(int n) {\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}",
"isPrime",
"{\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}",
"if (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}",
"n < 2",
"n",
"2",
"return false;",
"false",
"if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}",
"n == 2",
"n",
"2",
"return true;",
"true",
"{\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}",
"if (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"return false;",
"false",
"{\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}",
"int i = 2;",
"i",
"2",
"while (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}",
"i*i <= n",
"i*i",
"i",
"i",
"n",
"{\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}",
"if (n % i == 0) return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"i++",
"i",
"return true;",
"true",
"int n",
"n",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int n) {\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n//\t\tlong[] li = new long[n];\n//\t\tfor (int i=0; i < n; i++) {\n//\t\t\tli[i] = sc.nextLong();\n//\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i < n; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\tif ( isPrime(x) ) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int n) {\n\t\tif (n < 2) return false;\n\t\telse if (n == 2) return true;\n\t\telse {\n\t\t\tif (n % 2 == 0) return false;\n\t\t\telse {\n\n\t\t\t\tint i = 2;\n\t\t\t\twhile (i*i <= n) {\n\t\t\t\t\tif (n % i == 0) return false;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// long[] li = new long[n];
// for (int i=0; i < n; i++) {
// li[i] = sc.nextLong();
// }
int count = 0;
for (int i=0; i < n; i++) {
int x = sc.nextInt();
if ( isPrime(x) ) count++;
}
System.out.println(count);
}
static boolean isPrime(int n) {
if (n < 2) return false;
else if (n == 2) return true;
else {
if (n % 2 == 0) return false;
else {
int i = 2;
while (i*i <= n) {
if (n % i == 0) return false;
i++;
}
return true;
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
6,
70
],
[
70,
71
],
[
4,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
74,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
95,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
95,
109
],
[
110,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
111,
117
],
[
117,
118
],
[
74,
119
],
[
119,
120
],
[
72,
121
],
[
121,
122
]
] | [
"import java.util.Scanner;\n\n\n\nclass Main {\n public static void main (String args[]) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint A[] = new int[n];\n\tint cnt = 0;\n\tfor(int i = 0;i < n;i++){\n\t A[i] = sc.nextInt();\t\t\n\t}\n\tfor(int i = 0;i < n;i++){\n\t cnt+=Prime(A[i]);\t \n\t}\n\tSystem.out.println(cnt);\n }\n public static int Prime(int A){\n\tif(A == 1) return 0;\n\telse if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/\n\tfor(int j = 3;j <= A / j;j+=2){\n\t if(A % j == 0) return 0;\n\t}\n\treturn 1;\t \n }\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main (String args[]) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint A[] = new int[n];\n\tint cnt = 0;\n\tfor(int i = 0;i < n;i++){\n\t A[i] = sc.nextInt();\t\t\n\t}\n\tfor(int i = 0;i < n;i++){\n\t cnt+=Prime(A[i]);\t \n\t}\n\tSystem.out.println(cnt);\n }\n public static int Prime(int A){\n\tif(A == 1) return 0;\n\telse if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/\n\tfor(int j = 3;j <= A / j;j+=2){\n\t if(A % j == 0) return 0;\n\t}\n\treturn 1;\t \n }\n}",
"Main",
"public static void main (String args[]) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint A[] = new int[n];\n\tint cnt = 0;\n\tfor(int i = 0;i < n;i++){\n\t A[i] = sc.nextInt();\t\t\n\t}\n\tfor(int i = 0;i < n;i++){\n\t cnt+=Prime(A[i]);\t \n\t}\n\tSystem.out.println(cnt);\n }",
"main",
"{\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint A[] = new int[n];\n\tint cnt = 0;\n\tfor(int i = 0;i < n;i++){\n\t A[i] = sc.nextInt();\t\t\n\t}\n\tfor(int i = 0;i < n;i++){\n\t cnt+=Prime(A[i]);\t \n\t}\n\tSystem.out.println(cnt);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int A[] = new int[n];",
"A",
"new int[n]",
"n",
"int cnt = 0;",
"cnt",
"0",
"for(int i = 0;i < n;i++){\n\t A[i] = sc.nextInt();\t\t\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t A[i] = sc.nextInt();\t\t\n\t}",
"{\n\t A[i] = sc.nextInt();\t\t\n\t}",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0;i < n;i++){\n\t cnt+=Prime(A[i]);\t \n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t cnt+=Prime(A[i]);\t \n\t}",
"{\n\t cnt+=Prime(A[i]);\t \n\t}",
"cnt+=Prime(A[i])",
"cnt",
"Prime(A[i])",
"Prime",
"A[i]",
"A",
"i",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String args[]",
"args",
"public static int Prime(int A){\n\tif(A == 1) return 0;\n\telse if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/\n\tfor(int j = 3;j <= A / j;j+=2){\n\t if(A % j == 0) return 0;\n\t}\n\treturn 1;\t \n }",
"Prime",
"{\n\tif(A == 1) return 0;\n\telse if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/\n\tfor(int j = 3;j <= A / j;j+=2){\n\t if(A % j == 0) return 0;\n\t}\n\treturn 1;\t \n }",
"if(A == 1) return 0;\n\telse if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/",
"A == 1",
"A",
"1",
"return 0;",
"0",
"if(A == 2) return 1;\n\telse if(A % 2 == 0) return 0;/*ifかも*/",
"A == 2",
"A",
"2",
"return 1;",
"1",
"if(A % 2 == 0) return 0;/*ifかも*/",
"A % 2 == 0",
"A % 2",
"A",
"2",
"0",
"return 0;/*ifかも*/",
"0",
"for(int j = 3;j <= A / j;j+=2){\n\t if(A % j == 0) return 0;\n\t}",
"int j = 3;",
"int j = 3;",
"j",
"3",
"j <= A / j",
"j",
"A / j",
"A",
"j",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t if(A % j == 0) return 0;\n\t}",
"{\n\t if(A % j == 0) return 0;\n\t}",
"if(A % j == 0) return 0;",
"A % j == 0",
"A % j",
"A",
"j",
"0",
"return 0;",
"0",
"return 1;",
"1",
"int A",
"A"
] | import java.util.Scanner;
class Main {
public static void main (String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int A[] = new int[n];
int cnt = 0;
for(int i = 0;i < n;i++){
A[i] = sc.nextInt();
}
for(int i = 0;i < n;i++){
cnt+=Prime(A[i]);
}
System.out.println(cnt);
}
public static int Prime(int A){
if(A == 1) return 0;
else if(A == 2) return 1;
else if(A % 2 == 0) return 0;/*ifかも*/
for(int j = 3;j <= A / j;j+=2){
if(A % j == 0) return 0;
}
return 1;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
17,
14,
2,
13,
17,
40,
13,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
40,
13,
14,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
71,
82
],
[
82,
83
],
[
83,
84
],
[
71,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
70,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
11,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
9,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.util.*;\nimport java.lang.Math;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"x",
"x",
"i",
"i",
"j=3",
"j",
"3",
"ans = 0",
"ans",
"0",
"ex = 0;",
"ex",
"0",
"for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }",
"{\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }",
"x = sc.nextInt()",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ex=0",
"ex",
"0",
"if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }",
"x==2",
"x",
"2",
"ans++",
"ans",
"if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }",
"x>2&&x%2!=0",
"x>2",
"x",
"2",
"x%2!=0",
"x%2",
"x",
"2",
"0",
"{\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }",
"for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }",
"j=2;",
"j=2",
"j",
"2",
"j<=Math.sqrt(x)",
"j",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"j++",
"j++",
"j",
"{\n if(x%j==0)ex++;\n }",
"{\n if(x%j==0)ex++;\n }",
"if(x%j==0)ex++;",
"x%j==0",
"x%j",
"x",
"j",
"0",
"ex++",
"ex",
"if(ex==0)ans++;",
"ex==0",
"ex",
"0",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;\n for(i = 0; i < n; i++){\n x = sc.nextInt();\n //System.out.print(x);\n ex=0;\n if(x==2)ans++;\n else if(x>2&&x%2!=0){\n for(j=2; j<=Math.sqrt(x) ;j++){\n if(x%j==0)ex++;\n }\n if(ex==0)ans++;\n }\n //System.out.println(\" \"+ans);\n }\n System.out.println(ans);\n }\n}",
"Main"
] | import java.util.*;
import java.lang.Math;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), x, i, j=3, ans = 0, ex = 0;
for(i = 0; i < n; i++){
x = sc.nextInt();
//System.out.print(x);
ex=0;
if(x==2)ans++;
else if(x>2&&x%2!=0){
for(j=2; j<=Math.sqrt(x) ;j++){
if(x%j==0)ex++;
}
if(ex==0)ans++;
}
//System.out.println(" "+ans);
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
18,
20,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
58,
8
],
[
58,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
9,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
] | [
"import java.math.*;\nimport java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"import java.math.*;",
"math.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num",
"i",
"num",
"i++",
"i++",
"i",
"{\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }",
"{\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }",
"String x = sc.next();",
"x",
"sc.next()",
"sc.next",
"sc",
"if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }",
"new BigInteger(x).isProbablePrime(5)",
"new BigInteger(x).isProbablePrime",
"new BigInteger(x)",
"5",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int count = 0;\n\n for(int i = 0; i < num; i++){\n String x = sc.next();\n if(new BigInteger(x).isProbablePrime(5)){\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"Main"
] | import java.math.*;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int count = 0;
for(int i = 0; i < num; i++){
String x = sc.next();
if(new BigInteger(x).isProbablePrime(5)){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
6,
52
],
[
52,
53
],
[
121,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
57,
68
],
[
68,
69
],
[
69,
70
],
[
57,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
56,
82
],
[
82,
83
],
[
54,
84
],
[
84,
85
],
[
121,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
92,
102
],
[
102,
103
],
[
103,
104
],
[
92,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
88,
116
],
[
116,
117
],
[
86,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] | [
"import java.util.*;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}\n\tpublic static boolean prime(int x) {\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}\n\t\n\tpublic static int total(int[] arr) {\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}\n\tpublic static boolean prime(int x) {\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}\n\t\n\tpublic static int total(int[] arr) {\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}",
"main",
"{\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int size = input.nextInt();",
"size",
"input.nextInt()",
"input.nextInt",
"input",
"int[] arr = new int[size];",
"arr",
"new int[size]",
"size",
"for(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n\t\t\tarr[i] = input.nextInt();\n\t\t}",
"{\n\t\t\tarr[i] = input.nextInt();\n\t\t}",
"arr[i] = input.nextInt()",
"arr[i]",
"arr",
"i",
"input.nextInt()",
"input.nextInt",
"input",
"System.out.println(total(arr))",
"System.out.println",
"System.out",
"System",
"System.out",
"total(arr)",
"total",
"arr",
"input.close()",
"input.close",
"input",
"String[] args",
"args",
"public static boolean prime(int x) {\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}",
"prime",
"{\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}",
"for(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= (int) Math.sqrt(x)",
"i",
"(int) Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"++i",
"++i",
"i",
"{\n if(x % i == 0) {\n return false;\n }\n }",
"{\n if(x % i == 0) {\n return false;\n }\n }",
"if(x % i == 0) {\n return false;\n }",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public static int total(int[] arr) {\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}",
"total",
"{\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}",
"int total = 0;",
"total",
"0",
"for(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}",
"if(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}",
"prime(arr[i])",
"prime",
"arr[i]",
"arr",
"i",
"{\n\t\t\t\ttotal++;\n\t\t\t}",
"total++",
"total",
"return total;",
"total",
"int[] arr",
"arr",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}\n\tpublic static boolean prime(int x) {\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}\n\t\n\tpublic static int total(int[] arr) {\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}\n\t\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tint size = input.nextInt();\n\t\tint[] arr = new int[size];\n\t\t\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tarr[i] = input.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(total(arr));\n\t\tinput.close();\n\t}\n\tpublic static boolean prime(int x) {\n\t\tfor(int i = 2; i <= (int) Math.sqrt(x); ++i) {\n if(x % i == 0) {\n return false;\n }\n }\n\t\treturn true;\n\t}\n\t\n\tpublic static int total(int[] arr) {\n\t\tint total = 0;\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tif(prime(arr[i])) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}\n\t\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int size = input.nextInt();
int[] arr = new int[size];
for(int i = 0; i < size; i++) {
arr[i] = input.nextInt();
}
System.out.println(total(arr));
input.close();
}
public static boolean prime(int x) {
for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
if(x % i == 0) {
return false;
}
}
return true;
}
public static int total(int[] arr) {
int total = 0;
for(int i = 0; i < arr.length; i++) {
if(prime(arr[i])) {
total++;
}
}
return total;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
132,
8
],
[
132,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
15,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
15,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
26,
36
],
[
36,
37
],
[
36,
38
],
[
26,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
61,
67
],
[
67,
68
],
[
68,
69
],
[
26,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
9,
76
],
[
76,
77
],
[
132,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
80,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
80,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
101,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
101,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
118,
124
],
[
124,
125
],
[
125,
126
],
[
80,
127
],
[
127,
128
],
[
78,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"import java.util.InputMismatchException;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n\tprivate static boolean isPrime(int val) {\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n\tprivate static boolean isPrime(int val) {\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"try {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}",
"catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t}",
"InputMismatchException ex",
"{\n\t\t\tex.printStackTrace();\n\t\t}",
"ex.printStackTrace()",
"ex.printStackTrace",
"ex",
"{\n\t\t\tsc.close();\n\t\t}",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] values = new int[num];",
"values",
"new int[num]",
"num",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}",
"{\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}",
"values[i] = sc.nextInt()",
"values[i]",
"values",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPrime(values[i])) {count++;}",
"isPrime(values[i])",
"isPrime",
"values[i]",
"values",
"i",
"{count++;}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean isPrime(int val) {\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}",
"if(val == 2 || val == 3) {return true;}",
"val == 2 || val == 3",
"val == 2",
"val",
"2",
"val == 3",
"val",
"3",
"{return true;}",
"return true;",
"true",
"if(val % 2 == 0) {return false;}",
"val % 2 == 0",
"val % 2",
"val",
"2",
"0",
"{return false;}",
"return false;",
"false",
"for(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt((double)val)",
"i",
"Math.sqrt((double)val)",
"Math.sqrt",
"Math",
"(double)val",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif(val % i == 0) {return false;}\n\t\t}",
"{\n\t\t\tif(val % i == 0) {return false;}\n\t\t}",
"if(val % i == 0) {return false;}",
"val % i == 0",
"val % i",
"val",
"i",
"0",
"{return false;}",
"return false;",
"false",
"return true;",
"true",
"int val",
"val",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n\tprivate static boolean isPrime(int val) {\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tint num = sc.nextInt();\n\n\t\t\tint[] values = new int[num];\n\t\t\tint count = 0;\n\n\t\t\tfor(int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = sc.nextInt();\n\n\t\t\t\tif(isPrime(values[i])) {count++;}\n\t\t\t}\n\n\t\t\tSystem.out.println(count);\n\t\t} catch(InputMismatchException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n\tprivate static boolean isPrime(int val) {\n\t\tif(val == 2 || val == 3) {return true;}\n\t\tif(val % 2 == 0) {return false;}\n\n\t\tfor(int i = 3; i <= Math.sqrt((double)val); i += 2) {\n\t\t\tif(val % i == 0) {return false;}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int num = sc.nextInt();
int[] values = new int[num];
int count = 0;
for(int i = 0; i < values.length; i++) {
values[i] = sc.nextInt();
if(isPrime(values[i])) {count++;}
}
System.out.println(count);
} catch(InputMismatchException ex) {
ex.printStackTrace();
} finally {
sc.close();
}
}
private static boolean isPrime(int val) {
if(val == 2 || val == 3) {return true;}
if(val % 2 == 0) {return false;}
for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
if(val % i == 0) {return false;}
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
13,
14,
2,
4,
13,
13,
17,
30,
0,
18,
13,
40,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
20,
12,
13,
30,
41,
13,
4,
18,
13,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
14,
2,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
4,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
233,
8
],
[
233,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
53,
58
],
[
11,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
9,
65
],
[
65,
66
],
[
233,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
233,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
72,
85
],
[
85,
86
],
[
233,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
89,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
89,
101
],
[
101,
102
],
[
101,
103
],
[
104,
105
],
[
104,
106
],
[
89,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
107,
117
],
[
117,
118
],
[
118,
119
],
[
107,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
129,
131
],
[
89,
132
],
[
132,
133
],
[
87,
134
],
[
134,
135
],
[
233,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
139,
147
],
[
147,
148
],
[
148,
149
],
[
139,
150
],
[
151,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
151,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
163,
165
],
[
160,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
138,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
136,
179
],
[
179,
180
],
[
136,
181
],
[
181,
182
],
[
233,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
186,
189
],
[
189,
190
],
[
189,
191
],
[
183,
192
],
[
192,
193
],
[
233,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
199,
204
],
[
196,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
205,
210
],
[
210,
211
],
[
210,
212
],
[
205,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
205,
217
],
[
218,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
219,
225
],
[
225,
226
],
[
226,
227
],
[
196,
228
],
[
228,
229
],
[
194,
230
],
[
230,
231
],
[
0,
232
],
[
232,
233
],
[
232,
234
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static int[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static int[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}",
"BufferedReader breader = getReader();",
"breader",
"getReader()",
"getReader",
"int n = getInt(breader);",
"n",
"getInt(breader)",
"getInt",
"breader",
"int[] ary = new int[n];",
"ary",
"new int[n]",
"n",
"int ofs = 0;",
"ofs",
"0",
"for( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}",
"int num = getInt(breader);",
"num",
"getInt(breader)",
"getInt",
"breader",
"if ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}",
"isPrime(num) == true",
"isPrime(num)",
"isPrime",
"num",
"true",
"{\n\t\t\t\tary[ofs++] = num;\n\t\t\t}",
"ary[ofs++] = num",
"ary[ofs++]",
"ary",
"ofs++",
"ofs",
"num",
"System.out.println(ofs)",
"System.out.println",
"System.out",
"System",
"System.out",
"ofs",
"String[] args",
"args",
"public static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}",
"getReader",
"{\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}",
"return( new BufferedReader(new InputStreamReader(System.in)));",
"( new BufferedReader(new InputStreamReader(System.in)))",
"public static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}",
"getInt",
"{\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"return Integer.valueOf(line);",
"Integer.valueOf(line)",
"Integer.valueOf",
"Integer",
"line",
"BufferedReader br",
"br",
"public static int[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}",
"getAry",
"{\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"String[] nstr = line.split(\" \");",
"nstr",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"int[] n = new int[nstr.length];",
"n",
"new int[nstr.length]",
"nstr.length",
"nstr",
"nstr.length",
"for( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i < nstr.length",
"i",
"nstr.length",
"nstr",
"nstr.length",
"i++",
"i++",
"i",
"{\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}",
"{\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}",
"n[i] = Integer.valueOf(nstr[i])",
"n[i]",
"n",
"i",
"Integer.valueOf(nstr[i])",
"Integer.valueOf",
"Integer",
"nstr[i]",
"nstr",
"i",
"return n;",
"n",
"BufferedReader br",
"br",
"public static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"putAry",
"{\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"for( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num",
"i",
"num",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}",
"{\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}",
"System.out.print(ary[i])",
"System.out.print",
"System.out",
"System",
"System.out",
"ary[i]",
"ary",
"i",
"if ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}",
"i < num-1",
"i",
"num-1",
"num",
"1",
"{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}",
"System.out.print(\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"\" \"",
"System.out.println(\"\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"\"",
"int[] ary",
"ary",
"int num",
"num",
"public static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}",
"putAry",
"{\n\t\tputAry(ary, ary.length ) ;\n\t}",
"putAry(ary, ary.length )",
"putAry",
"ary",
"ary.length",
"ary",
"ary.length",
"int[] ary",
"ary",
"public static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"int r = (int)Math.sqrt((double)n)+1;",
"r",
"(int)Math.sqrt((double)n)+1",
"(int)Math.sqrt((double)n)",
"Math.sqrt",
"Math",
"(double)n",
"1",
"for( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int j = 2 ;",
"int j = 2 ;",
"j",
"2",
"j < r",
"j",
"r",
"j += 1",
"j += 1",
"j",
"1",
"{\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}",
"n%j == 0",
"n%j",
"n",
"j",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static int[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\n\t\tint n = getInt(breader);\n\t\tint[] ary = new int[n];\n\t\tint ofs = 0;\n\t\tfor( int i = 0 ; i < n ; i++) {\n\t\t\tint num = getInt(breader);\n\t\t\tif ( isPrime(num) == true) {\n\t\t\t\tary[ofs++] = num;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ofs);\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(System.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static int[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
// TODO ?????????????????????????????????????????????
BufferedReader breader = getReader();
int n = getInt(breader);
int[] ary = new int[n];
int ofs = 0;
for( int i = 0 ; i < n ; i++) {
int num = getInt(breader);
if ( isPrime(num) == true) {
ary[ofs++] = num;
}
}
System.out.println(ofs);
}
public static BufferedReader getReader() {
return( new BufferedReader(new InputStreamReader(System.in)));
}
public static int getInt(BufferedReader br)throws Exception {
String line = br.readLine();
return Integer.valueOf(line);
}
public static int[] getAry(BufferedReader br)throws Exception {
String line = br.readLine();
String[] nstr = line.split(" ");
int[] n = new int[nstr.length];
for( int i=0 ; i < nstr.length ; i++ ) {
n[i] = Integer.valueOf(nstr[i]);
}
return n;
}
public static void putAry(int[] ary, int num) {
for( int i = 0; i < num ; i++ ) {
System.out.print(ary[i]);
if ( i < num-1) {
System.out.print(" ");
}
}
System.out.println("");
}
public static void putAry(int[] ary) {
putAry(ary, ary.length ) ;
}
public static boolean isPrime(int n) {
int r = (int)Math.sqrt((double)n)+1;
for( int j = 2 ; j < r ; j += 1) {
if ( n%j == 0 ) {
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
2,
13,
17,
17,
2,
13,
17,
30,
0,
13,
17,
30,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
35,
44
],
[
44,
45
],
[
44,
46
],
[
35,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
55,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
69,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
76,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
35,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
6,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] | [
"import java.io.*;\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));",
"buf",
"new BufferedReader(new InputStreamReader(System.in))",
"int idx=Integer.parseInt(buf.readLine());",
"idx",
"Integer.parseInt(buf.readLine())",
"Integer.parseInt",
"Integer",
"buf.readLine()",
"buf.readLine",
"buf",
"int ans=0;",
"ans",
"0",
"for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<idx",
"i",
"idx",
"i++",
"i++",
"i",
"{\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }",
"{\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }",
"int x=Integer.parseInt(buf.readLine());",
"x",
"Integer.parseInt(buf.readLine())",
"Integer.parseInt",
"Integer",
"buf.readLine()",
"buf.readLine",
"buf",
"int flg=0;",
"flg",
"0",
"if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }",
"x==2",
"x",
"2",
"{\n flg=0;\n }",
"flg=0",
"flg",
"0",
"if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }",
"x%2==0 || x<2",
"x%2==0",
"x%2",
"x",
"2",
"0",
"x<2",
"x",
"2",
"{\n flg=1;\n }",
"flg=1",
"flg",
"1",
"{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }",
"double sqrt=Math.sqrt(x);",
"sqrt",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }",
"int j=3;",
"int j=3;",
"j",
"3",
"j<=sqrt",
"j",
"sqrt",
"j+=2",
"j+=2",
"j",
"2",
"{\n if(x%j==0){\n flg=1;break;\n }\n }",
"{\n if(x%j==0){\n flg=1;break;\n }\n }",
"if(x%j==0){\n flg=1;break;\n }",
"x%j==0",
"x%j",
"x",
"j",
"0",
"{\n flg=1;break;\n }",
"flg=1",
"flg",
"1",
"break;",
"if(flg==0){\n ans++;\n }",
"flg==0",
"flg",
"0",
"{\n ans++;\n }",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n int idx=Integer.parseInt(buf.readLine()); \n int ans=0;\n for(int i=0;i<idx;i++){\n int x=Integer.parseInt(buf.readLine());\n int flg=0;\n \n if(x==2){\n flg=0;\n }else if(x%2==0 || x<2){\n flg=1;\n }else{\n double sqrt=Math.sqrt(x);\n for(int j=3;j<=sqrt;j+=2){\n if(x%j==0){\n flg=1;break;\n }\n }\n }\n if(flg==0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"Main"
] | import java.io.*;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
int idx=Integer.parseInt(buf.readLine());
int ans=0;
for(int i=0;i<idx;i++){
int x=Integer.parseInt(buf.readLine());
int flg=0;
if(x==2){
flg=0;
}else if(x%2==0 || x<2){
flg=1;
}else{
double sqrt=Math.sqrt(x);
for(int j=3;j<=sqrt;j+=2){
if(x%j==0){
flg=1;break;
}
}
}
if(flg==0){
ans++;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
40,
13,
14,
2,
2,
13,
17,
17,
30,
14,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
115,
5
],
[
115,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
21,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
6,
46
],
[
46,
47
],
[
115,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
50,
59
],
[
59,
60
],
[
59,
61
],
[
50,
62
],
[
62,
63
],
[
50,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
82,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
50,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
50,
109
],
[
109,
110
],
[
110,
111
],
[
48,
112
],
[
112,
113
],
[
0,
114
],
[
114,
115
],
[
114,
116
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static boolean isPrime(int n) {\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static boolean isPrime(int n) {\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}\n}",
"Main",
"public static boolean isPrime(int n) {\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"isPrime",
"{\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"boolean out = true;",
"out",
"true",
"int last = (int) (Math.floor(Math.sqrt(n)));",
"last",
"(int) (Math.floor(Math.sqrt(n)))",
"Math.floor",
"Math",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"for (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int j = 3;",
"int j = 3;",
"j",
"3",
"j <= last",
"j",
"last",
"j += 2",
"j += 2",
"j",
"2",
"{\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"n % j == 0",
"n % j",
"n",
"j",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return out;",
"out",
"int n",
"n",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int aCount = in.nextInt();",
"aCount",
"in.nextInt()",
"in.nextInt",
"in",
"int count = 0;",
"count",
"0",
"int next;",
"next",
"for (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < aCount",
"i",
"aCount",
"i++",
"i++",
"i",
"{\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"next = in.nextInt()",
"next",
"in.nextInt()",
"in.nextInt",
"in",
"if (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"next == 2",
"next",
"2",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"next % 2 != 0",
"next % 2",
"next",
"2",
"0",
"{\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"if (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"isPrime(next)",
"isPrime",
"next",
"{\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"in.close()",
"in.close",
"in",
"String[] args",
"args",
"public class Main {\n\n\tpublic static boolean isPrime(int n) {\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}\n}",
"public class Main {\n\n\tpublic static boolean isPrime(int n) {\n\t\tboolean out = true;\n\t\tint last = (int) (Math.floor(Math.sqrt(n)));\n\t\tfor (int j = 3; j <= last; j += 2) {\n\t\t\tif (n % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint aCount = in.nextInt();\n\t\tint count = 0;\n\t\tint next;\n\n\t\tfor (int i = 0; i < aCount; i++) {\n\t\t\tnext = in.nextInt();\n\t\t\tif (next == 2) {\n\t\t\t\tcount++;\n\t\t\t} else if (next % 2 != 0) {\n\t\t\t\tif (isPrime(next)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tin.close();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static boolean isPrime(int n) {
boolean out = true;
int last = (int) (Math.floor(Math.sqrt(n)));
for (int j = 3; j <= last; j += 2) {
if (n % j == 0) {
return false;
}
}
return out;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int aCount = in.nextInt();
int count = 0;
int next;
for (int i = 0; i < aCount; i++) {
next = in.nextInt();
if (next == 2) {
count++;
} else if (next % 2 != 0) {
if (isPrime(next)) {
count++;
}
}
}
System.out.println(count);
in.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
40,
13,
3,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
44,
57
],
[
57,
58
],
[
58,
59
],
[
44,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
9,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n private static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n private static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }\n}",
"Main",
"private static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }",
"main",
"{\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"int notprime=0;",
"notprime",
"0",
"for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }",
"{\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }",
"a[i]=sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }",
"int j=2;",
"int j=2;",
"j",
"2",
"j<=Math.sqrt(a[i])",
"j",
"Math.sqrt(a[i])",
"Math.sqrt",
"Math",
"a[i]",
"a",
"i",
"j++",
"j++",
"j",
"{\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }",
"{\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }",
"if(a[i]%j==0){\n notprime++;\n break;\n }",
"a[i]%j==0",
"a[i]%j",
"a[i]",
"a",
"i",
"j",
"0",
"{\n notprime++;\n break;\n }",
"notprime++",
"notprime",
"break;",
"System.out.println(n-notprime)",
"System.out.println",
"System.out",
"System",
"System.out",
"n-notprime",
"n",
"notprime",
"String[] args",
"args",
"public class Main {\n private static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }\n}",
"public class Main {\n private static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n int notprime=0;\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n for(int j=2;j<=Math.sqrt(a[i]);j++){\n if(a[i]%j==0){\n notprime++;\n break;\n }\n }\n }\n System.out.println(n-notprime);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
public static void main(String[] args){
int n=sc.nextInt();
int[] a=new int[n];
int notprime=0;
for(int i=0;i<n;i++){
a[i]=sc.nextInt();
for(int j=2;j<=Math.sqrt(a[i]);j++){
if(a[i]%j==0){
notprime++;
break;
}
}
}
System.out.println(n-notprime);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
18,
13,
13,
17,
30,
40,
13,
28,
13,
13,
30,
30,
41,
13,
17,
14,
2,
2,
13,
17,
17,
30,
9,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
8,
56
],
[
56,
57
],
[
56,
58
],
[
56,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
64,
70
],
[
70,
71
],
[
60,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
72,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
72,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
60,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
6,
111
],
[
111,
112
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main (String[] args) {\n final Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n int[] numbers = new int[length];\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }\n\n for (int number : numbers) {\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }\n\n System.out.println(count);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main (String[] args) {\n final Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n int[] numbers = new int[length];\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }\n\n for (int number : numbers) {\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }\n\n System.out.println(count);\n }\n}",
"Main",
"public static void main (String[] args) {\n final Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n int[] numbers = new int[length];\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }\n\n for (int number : numbers) {\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }\n\n System.out.println(count);\n }",
"main",
"{\n final Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n int[] numbers = new int[length];\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }\n\n for (int number : numbers) {\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }\n\n System.out.println(count);\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int length = sc.nextInt();",
"length",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] numbers = new int[length];",
"numbers",
"new int[length]",
"length",
"int max = 0;",
"max",
"0",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }",
"{\n numbers[i] = sc.nextInt();\n if (numbers[i] == 2) {\n count++;\n }\n }",
"numbers[i] = sc.nextInt()",
"numbers[i]",
"numbers",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (numbers[i] == 2) {\n count++;\n }",
"numbers[i] == 2",
"numbers[i]",
"numbers",
"i",
"2",
"{\n count++;\n }",
"count++",
"count",
"for (int number : numbers) {\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }",
"int number",
"numbers",
"{\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }",
"{\n\n boolean flg = true;\n if (number % 2 == 0) {\n continue;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }\n\n if (flg){\n count++;\n }\n\n }",
"boolean flg = true;",
"flg",
"true",
"if (number % 2 == 0) {\n continue;\n }",
"number % 2 == 0",
"number % 2",
"number",
"2",
"0",
"{\n continue;\n }",
"continue;",
"for (int i = 3; i <= Math.sqrt(number); i += 2) {\n if (number % i == 0) {\n flg = false;\n break;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(number)",
"i",
"Math.sqrt(number)",
"Math.sqrt",
"Math",
"number",
"i += 2",
"i += 2",
"i",
"2",
"{\n if (number % i == 0) {\n flg = false;\n break;\n }\n }",
"{\n if (number % i == 0) {\n flg = false;\n break;\n }\n }",
"if (number % i == 0) {\n flg = false;\n break;\n }",
"number % i == 0",
"number % i",
"number",
"i",
"0",
"{\n flg = false;\n break;\n }",
"flg = false",
"flg",
"false",
"break;",
"if (flg){\n count++;\n }",
"flg",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static void main (String[] args) {
final Scanner sc = new Scanner(System.in);
int length = sc.nextInt();
int[] numbers = new int[length];
int max = 0;
int count = 0;
for (int i = 0; i < length; i++) {
numbers[i] = sc.nextInt();
if (numbers[i] == 2) {
count++;
}
}
for (int number : numbers) {
boolean flg = true;
if (number % 2 == 0) {
continue;
}
for (int i = 3; i <= Math.sqrt(number); i += 2) {
if (number % i == 0) {
flg = false;
break;
}
}
if (flg){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
18,
13,
13,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
3,
40,
13,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
116,
11
],
[
116,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
14,
53
],
[
53,
54
],
[
53,
55
],
[
14,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
70,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
77,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
86,
100
],
[
100,
101
],
[
70,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
14,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
12,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n\t\n}",
"Main",
"public static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] numbers = new int[n];",
"numbers",
"new int[n]",
"n",
"for (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}",
"{\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}",
"numbers[i] = Integer.parseInt(br.readLine())",
"numbers[i]",
"numbers",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numbers.length",
"i",
"numbers.length",
"numbers",
"numbers.length",
"i++",
"i++",
"i",
"{\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}",
"boolean flag = true;",
"flag",
"true",
"int j = 2;",
"j",
"2",
"while(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}",
"j <= Math.sqrt(numbers[i])",
"j",
"Math.sqrt(numbers[i])",
"Math.sqrt",
"Math",
"numbers[i]",
"numbers",
"i",
"{\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}",
"if(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"numbers[i] % j == 0",
"numbers[i] % j",
"numbers[i]",
"numbers",
"i",
"j",
"0",
"{\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag = false",
"flag",
"false",
"break;",
"j++",
"j",
"if (flag){\n\t\t\t\tans++;\n\t\t\t}",
"flag",
"{\n\t\t\t\tans++;\n\t\t\t}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n\t\n}",
"public class Main {\n\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] numbers = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tnumbers[i] = Integer.parseInt(br.readLine());;\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tboolean flag = true; \n\t\t\t\n\t\t\tint j = 2;\n\t\t\twhile(j <= Math.sqrt(numbers[i])){\n\t\t\t\tif(numbers[i] % j == 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t\n\t\t\tif (flag){\n\t\t\t\tans++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n\t\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main (String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int[] numbers = new int[n];
for (int i = 0; i < n; i++){
numbers[i] = Integer.parseInt(br.readLine());;
}
int ans = 0;
for (int i = 0; i < numbers.length; i++) {
boolean flag = true;
int j = 2;
while(j <= Math.sqrt(numbers[i])){
if(numbers[i] % j == 0){
flag = false;
break;
}
j++;
}
if (flag){
ans++;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
0,
13,
8,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
95,
14
],
[
95,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
41,
53
],
[
53,
54
],
[
53,
55
],
[
41,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
41,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
17,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
15,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"import java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}",
"{\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}",
"final int number = sc.nextInt();",
"number",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int limit = (int)(Math.sqrt(number));",
"limit",
"(int)(Math.sqrt(number))",
"Math.sqrt",
"Math",
"number",
"boolean not_prime = false;",
"not_prime",
"false",
"for(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= limit",
"j",
"limit",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"number % j == 0",
"number % j",
"number",
"j",
"0",
"{\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"not_prime = true",
"not_prime",
"true",
"break;",
"count += not_prime ? 0 : 1",
"count",
"not_prime ? 0 : 1",
"not_prime",
"0",
"1",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"public class Main {\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"public class Main {\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tfinal int N = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tfinal int number = sc.nextInt();\n\t\t\t\n\t\t\tfinal int limit = (int)(Math.sqrt(number));\n\t\t\t\n\t\t\tboolean not_prime = false;\n\t\t\tfor(int j = 2; j <= limit; j++){\n\t\t\t\tif(number % j == 0){\n\t\t\t\t\tnot_prime = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcount += not_prime ? 0 : 1;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"Main"
] | import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
final int N = sc.nextInt();
int count = 0;
for(int i = 0; i < N; i++){
final int number = sc.nextInt();
final int limit = (int)(Math.sqrt(number));
boolean not_prime = false;
for(int j = 2; j <= limit; j++){
if(number % j == 0){
not_prime = true;
break;
}
}
count += not_prime ? 0 : 1;
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
14,
4,
13,
4,
18,
13,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
81,
8
],
[
81,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
12,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
12,
23
],
[
23,
24
],
[
24,
25
],
[
12,
26
],
[
27,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
28,
34
],
[
34,
35
],
[
11,
36
],
[
36,
37
],
[
9,
38
],
[
38,
39
],
[
81,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
42,
51
],
[
51,
52
],
[
51,
53
],
[
42,
54
],
[
54,
55
],
[
54,
56
],
[
42,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
61,
70
],
[
70,
71
],
[
42,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
40,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
] | [
"import java.util.*;\nimport java.lang.*;\n\npublic class Main {\n static boolean isPrime(int x) {\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }\n\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n static boolean isPrime(int x) {\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }\n\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }\n}",
"Main",
"static boolean isPrime(int x) {\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }",
"isPrime",
"{\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }",
"for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"i++",
"i++",
"i",
"{\n if(x % i == 0) return false;\n }",
"{\n if(x % i == 0) return false;\n }",
"if(x % i == 0) return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int flag = 0",
"flag",
"0",
"sum = 0;",
"sum",
"0",
"while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }",
"flag < n",
"flag",
"n",
"{\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }",
"if(isPrime(sc.nextInt())) sum++;",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sum++",
"sum",
"flag++",
"flag",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n static boolean isPrime(int x) {\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }\n\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }\n}",
"public class Main {\n static boolean isPrime(int x) {\n for(int i = 2; i <= Math.sqrt(x); i++) {\n if(x % i == 0) return false;\n }\n return true;\n }\n\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int flag = 0, sum = 0;\n while (flag < n) {\n if(isPrime(sc.nextInt())) sum++;\n flag++;\n }\n System.out.println(sum);\n }\n}",
"Main"
] | import java.util.*;
import java.lang.*;
public class Main {
static boolean isPrime(int x) {
for(int i = 2; i <= Math.sqrt(x); i++) {
if(x % i == 0) return false;
}
return true;
}
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int flag = 0, sum = 0;
while (flag < n) {
if(isPrime(sc.nextInt())) sum++;
flag++;
}
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
0,
13,
17,
14,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
95,
14
],
[
95,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
17,
48
],
[
48,
49
],
[
48,
50
],
[
17,
51
],
[
51,
52
],
[
51,
53
],
[
51,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
59,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
55,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
17,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
15,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"import java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"import java.io.File;",
"File",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"for (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"{\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"for (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"int n",
"list",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}",
"boolean is_prime = true;",
"is_prime",
"true",
"for (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"if (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"if (n % i == 0)\n\t\t\t\t\tis_prime = false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"is_prime = false",
"is_prime",
"false",
"if (is_prime)\n\t\t\t\tans++;",
"is_prime",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"test_2.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in4.txt\"));\n\t\tint N = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor (int n : list) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int i = 2; i * i <= n; i++)\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tis_prime = false;\n\t\t\tif (is_prime)\n\t\t\t\tans++;\n\t\t}\n\t\tSystem.out.println(ans);\t\t\n\t\t\n\t}\n}",
"Main"
] | import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
// Scanner sc = new Scanner(new File("test_1.txt"));
// Scanner sc = new Scanner(new File("test_2.txt"));
// Scanner sc = new Scanner(new File("in4.txt"));
int N = sc.nextInt();
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < N; i++) {
list.add(sc.nextInt());
}
int ans = 0;
for (int n : list) {
boolean is_prime = true;
for (int i = 2; i * i <= n; i++)
if (n % i == 0)
is_prime = false;
if (is_prime)
ans++;
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
15,
20
],
[
20,
21
],
[
20,
22
],
[
15,
23
],
[
23,
24
],
[
24,
25
],
[
15,
26
],
[
27,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
28,
34
],
[
34,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
6,
39
],
[
39,
40
],
[
88,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
52,
54
],
[
43,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
43,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
41,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static boolean is_prime(int n) {\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static boolean is_prime(int n) {\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}\n}",
"Main",
"public static boolean is_prime(int n) {\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"is_prime",
"{\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"int square_root = (int)Math.sqrt(n);",
"square_root",
"(int)Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"for (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = square_root;",
"int i = square_root;",
"i",
"square_root",
"i > 1",
"i",
"1",
"i--",
"i--",
"i",
"{\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int num_of_primes = 0;",
"num_of_primes",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}",
"{\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}",
"int m = s.nextInt();",
"m",
"s.nextInt()",
"s.nextInt",
"s",
"if (is_prime(m))\n\t\t\t\tnum_of_primes++;",
"is_prime(m)",
"is_prime",
"m",
"num_of_primes++",
"num_of_primes",
"System.out.println(num_of_primes)",
"System.out.println",
"System.out",
"System",
"System.out",
"num_of_primes",
"String[] args",
"args",
"public class Main {\n\n\tpublic static boolean is_prime(int n) {\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}\n}",
"public class Main {\n\n\tpublic static boolean is_prime(int n) {\n\t\tint square_root = (int)Math.sqrt(n);\n\t\tfor (int i = square_root; i > 1; i--) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint num_of_primes = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint m = s.nextInt();\n\t\t\tif (is_prime(m))\n\t\t\t\tnum_of_primes++;\n\t\t}\n\t\tSystem.out.println(num_of_primes);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static boolean is_prime(int n) {
int square_root = (int)Math.sqrt(n);
for (int i = square_root; i > 1; i--) {
if (n % i == 0) {
return false;
}
}
return true;
}
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int num_of_primes = 0;
for (int i = 0; i < n; i++) {
int m = s.nextInt();
if (is_prime(m))
num_of_primes++;
}
System.out.println(num_of_primes);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
6,
48
],
[
48,
49
],
[
4,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
56,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
52,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
52,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
79,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
79,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
52,
104
],
[
104,
105
],
[
50,
106
],
[
106,
107
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n int size = sc.nextInt();\n int count = 0;\n\n for (int i = 0; i < size; i++) {\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n public static boolean checkPrime(int num) {\n int count = 0;\n if (num == 1) {\n return false;\n } else if (num == 2) {\n return true;\n }\n\n if(num % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= num / i; i+=2) {\n if (num % i == 0) {\n return false;\n }\n }\n return true;\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n int size = sc.nextInt();\n int count = 0;\n\n for (int i = 0; i < size; i++) {\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n public static boolean checkPrime(int num) {\n int count = 0;\n if (num == 1) {\n return false;\n } else if (num == 2) {\n return true;\n }\n\n if(num % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= num / i; i+=2) {\n if (num % i == 0) {\n return false;\n }\n }\n return true;\n }\n}",
"Main",
"public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n int size = sc.nextInt();\n int count = 0;\n\n for (int i = 0; i < size; i++) {\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }\n\n System.out.println(count);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int size = sc.nextInt();\n int count = 0;\n\n for (int i = 0; i < size; i++) {\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }\n\n System.out.println(count);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int size = sc.nextInt();",
"size",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < size; i++) {\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }",
"{\n if(checkPrime(sc.nextInt())) {\n count++;\n }\n }",
"if(checkPrime(sc.nextInt())) {\n count++;\n }",
"checkPrime(sc.nextInt())",
"checkPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String... args",
"args",
"public static boolean checkPrime(int num) {\n int count = 0;\n if (num == 1) {\n return false;\n } else if (num == 2) {\n return true;\n }\n\n if(num % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= num / i; i+=2) {\n if (num % i == 0) {\n return false;\n }\n }\n return true;\n }",
"checkPrime",
"{\n int count = 0;\n if (num == 1) {\n return false;\n } else if (num == 2) {\n return true;\n }\n\n if(num % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= num / i; i+=2) {\n if (num % i == 0) {\n return false;\n }\n }\n return true;\n }",
"int count = 0;",
"count",
"0",
"if (num == 1) {\n return false;\n } else if (num == 2) {\n return true;\n }",
"num == 1",
"num",
"1",
"{\n return false;\n }",
"return false;",
"false",
"if (num == 2) {\n return true;\n }",
"num == 2",
"num",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(num % 2 == 0) {\n return false;\n }",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"for (int i = 3; i <= num / i; i+=2) {\n if (num % i == 0) {\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= num / i",
"i",
"num / i",
"num",
"i",
"i+=2",
"i+=2",
"i",
"2",
"{\n if (num % i == 0) {\n return false;\n }\n }",
"{\n if (num % i == 0) {\n return false;\n }\n }",
"if (num % i == 0) {\n return false;\n }",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int num",
"num"
] | import java.util.Scanner;
class Main {
public static void main(String... args) {
Scanner sc = new Scanner(System.in);
int size = sc.nextInt();
int count = 0;
for (int i = 0; i < size; i++) {
if(checkPrime(sc.nextInt())) {
count++;
}
}
System.out.println(count);
}
public static boolean checkPrime(int num) {
int count = 0;
if (num == 1) {
return false;
} else if (num == 2) {
return true;
}
if(num % 2 == 0) {
return false;
}
for (int i = 3; i <= num / i; i+=2) {
if (num % i == 0) {
return false;
}
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
6,
61
],
[
61,
62
],
[
4,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
65,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
72,
82
],
[
82,
83
],
[
65,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
84,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
107,
108
],
[
108,
109
],
[
65,
110
],
[
110,
111
],
[
63,
112
],
[
112,
113
]
] | [
"import java.util.Scanner;\nclass Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tint[] num = new int[input];\n\t\tboolean t;\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2) \n\t\t\treturn true;\n\t\t\n\t\tif(x < 2 || (x % 2) == 0) \n\t\t\treturn false;\n\t\t\n\t\tfor(int i = 3; i <= Math.sqrt(x); i += 2){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tint[] num = new int[input];\n\t\tboolean t;\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2) \n\t\t\treturn true;\n\t\t\n\t\tif(x < 2 || (x % 2) == 0) \n\t\t\treturn false;\n\t\t\n\t\tfor(int i = 3; i <= Math.sqrt(x); i += 2){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tint[] num = new int[input];\n\t\tboolean t;\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint input = scan.nextInt();\n\t\tint[] num = new int[input];\n\t\tboolean t;\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int input = scan.nextInt();",
"input",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] num = new int[input];",
"num",
"new int[input]",
"input",
"boolean t;",
"t",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < input; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input",
"i",
"input",
"i++",
"i++",
"i",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t\tif(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"num[i] = scan.nextInt()",
"num[i]",
"num",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(isPrime(num[i])) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(num[i])",
"isPrime",
"num[i]",
"num",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static boolean isPrime(int x){\n\t\tif(x == 2) \n\t\t\treturn true;\n\t\t\n\t\tif(x < 2 || (x % 2) == 0) \n\t\t\treturn false;\n\t\t\n\t\tfor(int i = 3; i <= Math.sqrt(x); i += 2){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif(x == 2) \n\t\t\treturn true;\n\t\t\n\t\tif(x < 2 || (x % 2) == 0) \n\t\t\treturn false;\n\t\t\n\t\tfor(int i = 3; i <= Math.sqrt(x); i += 2){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if(x == 2) \n\t\t\treturn true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if(x < 2 || (x % 2) == 0) \n\t\t\treturn false;",
"x < 2 || (x % 2) == 0",
"x < 2",
"x",
"2",
"(x % 2) == 0",
"(x % 2)",
"x",
"2",
"0",
"return false;",
"false",
"for(int i = 3; i <= Math.sqrt(x); i += 2){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int x",
"x"
] | import java.util.Scanner;
class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int input = scan.nextInt();
int[] num = new int[input];
boolean t;
int count = 0;
for(int i = 0; i < input; i++){
num[i] = scan.nextInt();
if(isPrime(num[i])) {
count++;
}
}
System.out.println(count);
}
static boolean isPrime(int x){
if(x == 2)
return true;
if(x < 2 || (x % 2) == 0)
return false;
for(int i = 3; i <= Math.sqrt(x); i += 2){
if(x % i == 0){
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
13,
4,
18,
13,
13,
17,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
0,
13,
13,
30,
0,
18,
13,
13,
17,
12,
13,
30,
29,
18,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
40,
13,
14,
2,
13,
17,
29,
13,
29,
40,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
13,
20
],
[
20,
21
],
[
21,
22
],
[
13,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
13,
28
],
[
28,
29
],
[
28,
30
],
[
13,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
49,
54
],
[
54,
55
],
[
13,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
11,
62
],
[
62,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
64,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
77,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
70,
87
],
[
87,
88
],
[
64,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
91,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
98,
109
],
[
110,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
116,
123
],
[
123,
124
],
[
123,
125
],
[
116,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
116,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
64,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
136,
143
],
[
143,
144
],
[
64,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
148,
156
],
[
156,
157
],
[
157,
158
],
[
148,
159
],
[
160,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
160,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
171,
172
],
[
147,
173
],
[
173,
174
],
[
174,
175
],
[
145,
176
],
[
176,
177
]
] | [
"import java.util.Scanner;\nimport java.util.Arrays;\n\nclass Main {\n boolean[] primeTable;\n public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n PrimeNum prime = new PrimeNum(100000010);\n prime.createTable();\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }\n System.out.println(ct);\n }\n}\n\nclass PrimeNum {\n private boolean[] primeTable;\n private int maxNum;\n \n PrimeNum(int n) {\n primeTable = new boolean[n];\n Arrays.fill(primeTable, true);\n this.maxNum = n;\n }\n\n protected void createTable() {\n final double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }\n }\n\n protected boolean judge(int n) {\n return (primeTable[n]);\n }\n\n protected int serch(int n) {\n for (int i = 2; i < maxNum; i++){\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }\n return (-1);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"class Main {\n boolean[] primeTable;\n public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n PrimeNum prime = new PrimeNum(100000010);\n prime.createTable();\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }\n System.out.println(ct);\n }\n}",
"Main",
"boolean[] primeTable;",
"primeTable",
"public static void main(String[] args) {\n Scanner cin = new Scanner(System.in);\n PrimeNum prime = new PrimeNum(100000010);\n prime.createTable();\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }\n System.out.println(ct);\n }",
"main",
"{\n Scanner cin = new Scanner(System.in);\n PrimeNum prime = new PrimeNum(100000010);\n prime.createTable();\n int n = cin.nextInt(), ct = 0;\n for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }\n System.out.println(ct);\n }",
"Scanner cin = new Scanner(System.in);",
"cin",
"new Scanner(System.in)",
"PrimeNum prime = new PrimeNum(100000010);",
"prime",
"new PrimeNum(100000010)",
"prime.createTable()",
"prime.createTable",
"prime",
"int n = cin.nextInt()",
"n",
"cin.nextInt()",
"cin.nextInt",
"cin",
"ct = 0;",
"ct",
"0",
"for (int i = 0; i < n; i++){\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }",
"{\n int num = cin.nextInt();\n if (prime.judge(num)) ct++;\n }",
"int num = cin.nextInt();",
"num",
"cin.nextInt()",
"cin.nextInt",
"cin",
"if (prime.judge(num)) ct++;",
"prime.judge(num)",
"prime.judge",
"prime",
"num",
"ct++",
"ct",
"System.out.println(ct)",
"System.out.println",
"System.out",
"System",
"System.out",
"ct",
"String[] args",
"args",
"class PrimeNum {\n private boolean[] primeTable;\n private int maxNum;\n \n PrimeNum(int n) {\n primeTable = new boolean[n];\n Arrays.fill(primeTable, true);\n this.maxNum = n;\n }\n\n protected void createTable() {\n final double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }\n }\n\n protected boolean judge(int n) {\n return (primeTable[n]);\n }\n\n protected int serch(int n) {\n for (int i = 2; i < maxNum; i++){\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }\n return (-1);\n }\n}",
"PrimeNum",
"private boolean[] primeTable;",
"primeTable",
"private int maxNum;",
"maxNum",
"PrimeNum(int n) {\n primeTable = new boolean[n];\n Arrays.fill(primeTable, true);\n this.maxNum = n;\n }",
"PrimeNum",
"{\n primeTable = new boolean[n];\n Arrays.fill(primeTable, true);\n this.maxNum = n;\n }",
"primeTable = new boolean[n]",
"primeTable",
"new boolean[n]",
"n",
"Arrays.fill(primeTable, true)",
"Arrays.fill",
"Arrays",
"primeTable",
"true",
"this.maxNum = n",
"this.maxNum",
"this",
"this.maxNum",
"n",
"int n",
"n",
"protected void createTable() {\n final double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }\n }",
"createTable",
"{\n final double sqrt_max = Math.sqrt(maxNum);\n for (int i = 2; i < sqrt_max; i++){\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }\n }",
"final double sqrt_max = Math.sqrt(maxNum);",
"sqrt_max",
"Math.sqrt(maxNum)",
"Math.sqrt",
"Math",
"maxNum",
"for (int i = 2; i < sqrt_max; i++){\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < sqrt_max",
"i",
"sqrt_max",
"i++",
"i++",
"i",
"{\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }",
"{\n if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }\n }",
"if (primeTable[i]){\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }",
"primeTable[i]",
"primeTable",
"i",
"{\n for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;\n }",
"for (int j = i * 2; j < maxNum; j += i)\n primeTable[j] = false;",
"int j = i * 2;",
"int j = i * 2;",
"j",
"i * 2",
"i",
"2",
"j < maxNum",
"j",
"maxNum",
"j += i",
"j += i",
"j",
"i",
"primeTable[j] = false;",
"primeTable[j] = false",
"primeTable[j]",
"primeTable",
"j",
"false",
"protected boolean judge(int n) {\n return (primeTable[n]);\n }",
"judge",
"{\n return (primeTable[n]);\n }",
"return (primeTable[n]);",
"(primeTable[n])",
"primeTable",
"n",
"int n",
"n",
"protected int serch(int n) {\n for (int i = 2; i < maxNum; i++){\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }\n return (-1);\n }",
"serch",
"{\n for (int i = 2; i < maxNum; i++){\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }\n return (-1);\n }",
"for (int i = 2; i < maxNum; i++){\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < maxNum",
"i",
"maxNum",
"i++",
"i++",
"i",
"{\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }",
"{\n if (primeTable[i]) n--;\n if (n == 0) return(i);\n }",
"if (primeTable[i]) n--;",
"primeTable[i]",
"primeTable",
"i",
"n--",
"n",
"if (n == 0) return(i);",
"n == 0",
"n",
"0",
"return(i);",
"(i)",
"return (-1);",
"(-1)",
"1",
"int n",
"n"
] | import java.util.Scanner;
import java.util.Arrays;
class Main {
boolean[] primeTable;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
PrimeNum prime = new PrimeNum(100000010);
prime.createTable();
int n = cin.nextInt(), ct = 0;
for (int i = 0; i < n; i++){
int num = cin.nextInt();
if (prime.judge(num)) ct++;
}
System.out.println(ct);
}
}
class PrimeNum {
private boolean[] primeTable;
private int maxNum;
PrimeNum(int n) {
primeTable = new boolean[n];
Arrays.fill(primeTable, true);
this.maxNum = n;
}
protected void createTable() {
final double sqrt_max = Math.sqrt(maxNum);
for (int i = 2; i < sqrt_max; i++){
if (primeTable[i]){
for (int j = i * 2; j < maxNum; j += i)
primeTable[j] = false;
}
}
}
protected boolean judge(int n) {
return (primeTable[n]);
}
protected int serch(int n) {
for (int i = 2; i < maxNum; i++){
if (primeTable[i]) n--;
if (n == 0) return(i);
}
return (-1);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
40,
4,
18,
13,
13,
4,
13,
13,
30,
40,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
108,
8
],
[
108,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
11,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
9,
67
],
[
67,
68
],
[
108,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
82,
86
],
[
75,
87
],
[
87,
88
],
[
88,
89
],
[
75,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
71,
103
],
[
103,
104
],
[
69,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"import java.util.Scanner;\nimport java.util.ArrayList;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isPrime(int i) {\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isPrime(int i) {\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int length = sc.nextInt();",
"length",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"ArrayList<Integer> primeAr = new ArrayList<Integer>();",
"primeAr",
"new ArrayList<Integer>()",
"for (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}",
"!primeAr.contains(num) && isPrime(num)",
"!primeAr.contains(num)",
"primeAr.contains(num)",
"primeAr.contains",
"primeAr",
"num",
"isPrime(num)",
"isPrime",
"num",
"{\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}",
"count++",
"count",
"primeAr.add(num)",
"primeAr.add",
"primeAr",
"num",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean isPrime(int i) {\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}",
"isPrime",
"{\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}",
"boolean prime = true;",
"prime",
"true",
"for (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= Math.pow(i, 0.5)",
"j",
"Math.pow(i, 0.5)",
"Math.pow",
"Math",
"i",
"0.5",
"j++",
"j++",
"j",
"{\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}",
"i % j == 0",
"i % j",
"i",
"j",
"0",
"{\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}",
"prime = false",
"prime",
"false",
"break;",
"return prime;",
"prime",
"int i",
"i",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isPrime(int i) {\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint length = sc.nextInt();\n\t\tint count = 0;\n\t\tArrayList<Integer> primeAr = new ArrayList<Integer>();\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!primeAr.contains(num) && isPrime(num)) {\n\t\t\t\tcount++;\n\t\t\t\tprimeAr.add(num);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean isPrime(int i) {\n\t\t\n\t\tboolean prime = true;\n\t\tfor (int j = 2; j <= Math.pow(i, 0.5); j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\tprime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn prime;\n\t}\n}",
"Main"
] | import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int length = sc.nextInt();
int count = 0;
ArrayList<Integer> primeAr = new ArrayList<Integer>();
for (int i = 0; i < length; i++) {
int num = sc.nextInt();
if (!primeAr.contains(num) && isPrime(num)) {
count++;
primeAr.add(num);
}
}
System.out.println(count);
}
public static boolean isPrime(int i) {
boolean prime = true;
for (int j = 2; j <= Math.pow(i, 0.5); j++) {
if (i % j == 0) {
prime = false;
break;
}
}
return prime;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
30,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
40,
13,
14,
2,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
13,
4,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
138,
8
],
[
138,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
15,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
21,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
35,
40
],
[
28,
41
],
[
41,
42
],
[
42,
43
],
[
28,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
27,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
9,
62
],
[
62,
63
],
[
138,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
66,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
66,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
81,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
66,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
103,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
119,
126
],
[
118,
127
],
[
127,
128
],
[
66,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
64,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.Scanner;\nimport java.util.*;\n\npublic class Main{\n\n static boolean Sosu(int p){\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }\n public static void main(String[] args){\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }\n}\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\n static boolean Sosu(int p){\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }\n public static void main(String[] args){\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }\n}",
"Main",
"static boolean Sosu(int p){\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }",
"Sosu",
"{\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }",
"int count=0;",
"count",
"0",
"if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }",
"p==1",
"p",
"1",
"return false;",
"false",
"if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }",
"p==2",
"p",
"2",
"return true;",
"true",
"{\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }",
"for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<Math.sqrt(p)+1",
"i",
"Math.sqrt(p)+1",
"Math.sqrt(p)",
"Math.sqrt",
"Math",
"p",
"1",
"i++",
"i++",
"i",
"{\n if(p%i==0) count++;\n }",
"{\n if(p%i==0) count++;\n }",
"if(p%i==0) count++;",
"p%i==0",
"p%i",
"p",
"i",
"0",
"count++",
"count",
"if(count==0) return true;\n else return false;",
"count==0",
"count",
"0",
"return true;",
"true",
"return false;",
"false",
"int p",
"p",
"public static void main(String[] args){\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }",
"main",
"{\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }",
"int count=0;",
"count",
"0",
"ArrayList<Integer> list =new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a= sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a",
"i",
"a",
"i++",
"i++",
"i",
"{\n int b =sc.nextInt();\n list.add(b);\n }",
"{\n int b =sc.nextInt();\n list.add(b);\n }",
"int b =sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.add(b)",
"list.add",
"list",
"b",
"for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<list.size()",
"i",
"list.size()",
"list.size",
"list",
"i++",
"i++",
"i",
"{\n if(Sosu(list.get(i))==true) count++; \n }",
"{\n if(Sosu(list.get(i))==true) count++; \n }",
"if(Sosu(list.get(i))==true) count++;",
"Sosu(list.get(i))==true",
"Sosu(list.get(i))",
"Sosu",
"list.get(i)",
"list.get",
"list",
"i",
"true",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n\n static boolean Sosu(int p){\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }\n public static void main(String[] args){\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }\n}",
"public class Main{\n\n static boolean Sosu(int p){\n int count=0;\n if(p==1) return false;\n else if(p==2) return true;\n else {\n for (int i=2;i<Math.sqrt(p)+1;i++){\n if(p%i==0) count++;\n }\n if(count==0) return true;\n else return false;\n }\n }\n public static void main(String[] args){\n int count=0;\n ArrayList<Integer> list =new ArrayList<Integer>();\n Scanner sc = new Scanner(System.in);\n int a= sc.nextInt();\n for(int i=0;i<a;i++){\n int b =sc.nextInt();\n list.add(b);\n }\n for(int i=0;i<list.size();i++){\n if(Sosu(list.get(i))==true) count++; \n }\n System.out.println(count);\n }\n}",
"Main"
] | import java.util.Scanner;
import java.util.*;
public class Main{
static boolean Sosu(int p){
int count=0;
if(p==1) return false;
else if(p==2) return true;
else {
for (int i=2;i<Math.sqrt(p)+1;i++){
if(p%i==0) count++;
}
if(count==0) return true;
else return false;
}
}
public static void main(String[] args){
int count=0;
ArrayList<Integer> list =new ArrayList<Integer>();
Scanner sc = new Scanner(System.in);
int a= sc.nextInt();
for(int i=0;i<a;i++){
int b =sc.nextInt();
list.add(b);
}
for(int i=0;i<list.size();i++){
if(Sosu(list.get(i))==true) count++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
29,
13,
14,
2,
13,
17,
30,
29,
13,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
13,
29,
13,
23,
13,
6,
13,
41,
13,
20,
12,
13,
30,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
29,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
18,
13,
13,
29,
13,
29,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
29,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
29,
41
],
[
41,
42
],
[
41,
43
],
[
29,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
29,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
76,
83
],
[
83,
84
],
[
84,
85
],
[
29,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
29,
92
],
[
92,
93
],
[
93,
94
],
[
27,
95
],
[
95,
96
],
[
22,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
103,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
110,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
99,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
126,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
126,
141
],
[
142,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
143,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
99,
153
],
[
153,
154
],
[
97,
155
],
[
155,
156
],
[
22,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
159,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
167,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
167,
179
],
[
180,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
184,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
184,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
184,
199
],
[
200,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
201,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
180,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
214,
217
],
[
159,
218
],
[
218,
219
],
[
157,
220
],
[
220,
221
],
[
0,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
227,
229
],
[
222,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
236,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
246,
249
],
[
249,
250
],
[
250,
251
],
[
232,
252
],
[
252,
253
],
[
222,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
257,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
267,
274
],
[
264,
275
],
[
275,
276
],
[
275,
277
],
[
264,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
278,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
285,
287
],
[
278,
288
],
[
288,
289
],
[
289,
290
],
[
278,
291
],
[
292,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
293,
296
],
[
296,
297
],
[
297,
298
],
[
296,
299
],
[
299,
300
],
[
299,
301
],
[
264,
302
],
[
302,
303
],
[
256,
304
],
[
304,
305
],
[
222,
306
],
[
306,
307
],
[
306,
308
],
[
308,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
309,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
]
] | [
"import java.util.ArrayList;\nimport java.util.List;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n\n\tstatic final int MAX = 10000;\n\n\tpublic static void main(String[] args) {\n\n\t\tint primecount = 0;\n\t\tInput stdIn = new Input();\n\n\t\tint n = stdIn.getValue();\n\n\t\tList<Integer> values = new ArrayList<>();\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}\n\n//\t\tList<Integer> primeList = createPrimeList(MAX);\n//\t\tSystem.out.println(primeList);\n//\t\tSystem.out.println(primeList.size());\n\n\t\tfor(int i = 0; i < n; i++) {\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(primecount);\n\n\t\tstdIn.close();\n\t}\n\n\tpublic static boolean checkPrime(int n) {\n\t\tboolean b = true;\n\t\tif(n == 1) {\n\t\t\treturn b;\n\t\t} else if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor(int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n\n\tpublic static List<Integer> createPrimeList(int max) {\n\n\t\tList<Integer> primeList = new ArrayList<>();\n\t\tprimeList.add(2);\n\n\t\tfor(int i = 3; i < max; i += 2) {\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}\n\t\treturn primeList;\n\t}\n}\nclass Input{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\tpublic Input() {\n\t}\n\n\tpublic int getValue() {\n\t\tint n = 0;\n\t\ttry {\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn n;\n\t}\n\n\tpublic List<Integer> getLine() {\n\t\ttry {\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic void close() {\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"class Main {\n\n\tstatic final int MAX = 10000;\n\n\tpublic static void main(String[] args) {\n\n\t\tint primecount = 0;\n\t\tInput stdIn = new Input();\n\n\t\tint n = stdIn.getValue();\n\n\t\tList<Integer> values = new ArrayList<>();\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}\n\n//\t\tList<Integer> primeList = createPrimeList(MAX);\n//\t\tSystem.out.println(primeList);\n//\t\tSystem.out.println(primeList.size());\n\n\t\tfor(int i = 0; i < n; i++) {\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(primecount);\n\n\t\tstdIn.close();\n\t}\n\n\tpublic static boolean checkPrime(int n) {\n\t\tboolean b = true;\n\t\tif(n == 1) {\n\t\t\treturn b;\n\t\t} else if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor(int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n\n\tpublic static List<Integer> createPrimeList(int max) {\n\n\t\tList<Integer> primeList = new ArrayList<>();\n\t\tprimeList.add(2);\n\n\t\tfor(int i = 3; i < max; i += 2) {\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}\n\t\treturn primeList;\n\t}\n}",
"Main",
"static final int MAX = 10000;",
"MAX",
"10000",
"public static void main(String[] args) {\n\n\t\tint primecount = 0;\n\t\tInput stdIn = new Input();\n\n\t\tint n = stdIn.getValue();\n\n\t\tList<Integer> values = new ArrayList<>();\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}\n\n//\t\tList<Integer> primeList = createPrimeList(MAX);\n//\t\tSystem.out.println(primeList);\n//\t\tSystem.out.println(primeList.size());\n\n\t\tfor(int i = 0; i < n; i++) {\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(primecount);\n\n\t\tstdIn.close();\n\t}",
"main",
"{\n\n\t\tint primecount = 0;\n\t\tInput stdIn = new Input();\n\n\t\tint n = stdIn.getValue();\n\n\t\tList<Integer> values = new ArrayList<>();\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}\n\n//\t\tList<Integer> primeList = createPrimeList(MAX);\n//\t\tSystem.out.println(primeList);\n//\t\tSystem.out.println(primeList.size());\n\n\t\tfor(int i = 0; i < n; i++) {\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(primecount);\n\n\t\tstdIn.close();\n\t}",
"int primecount = 0;",
"primecount",
"0",
"Input stdIn = new Input();",
"stdIn",
"new Input()",
"int n = stdIn.getValue();",
"n",
"stdIn.getValue()",
"stdIn.getValue",
"stdIn",
"List<Integer> values = new ArrayList<>();",
"values",
"new ArrayList<>()",
"for(int i = 0; i < n; i++) {\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}",
"{\n\t\t\tvalues.add(stdIn.getValue());\n\t\t}",
"values.add(stdIn.getValue())",
"values.add",
"values",
"stdIn.getValue()",
"stdIn.getValue",
"stdIn",
"for(int i = 0; i < n; i++) {\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}",
"{\n//\t\t\tSystem.out.println(\"values[i] :\" + values.get(i));\n\t\t\tif(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}\n\t\t}",
"if(checkPrime(values.get(i))) {\n\t\t\t\tprimecount++;\n\t\t\t}",
"checkPrime(values.get(i))",
"checkPrime",
"values.get(i)",
"values.get",
"values",
"i",
"{\n\t\t\t\tprimecount++;\n\t\t\t}",
"primecount++",
"primecount",
"System.out.println(primecount)",
"System.out.println",
"System.out",
"System",
"System.out",
"primecount",
"stdIn.close()",
"stdIn.close",
"stdIn",
"String[] args",
"args",
"public static boolean checkPrime(int n) {\n\t\tboolean b = true;\n\t\tif(n == 1) {\n\t\t\treturn b;\n\t\t} else if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor(int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}",
"checkPrime",
"{\n\t\tboolean b = true;\n\t\tif(n == 1) {\n\t\t\treturn b;\n\t\t} else if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor(int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}",
"boolean b = true;",
"b",
"true",
"if(n == 1) {\n\t\t\treturn b;\n\t\t} else if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}",
"n == 1",
"n",
"1",
"{\n\t\t\treturn b;\n\t\t}",
"return b;",
"b",
"if(n == 2) {\n\t\t\treturn b;\n\t\t} else if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}",
"n == 2",
"n",
"2",
"{\n\t\t\treturn b;\n\t\t}",
"return b;",
"b",
"if(n % 2 ==0) {\n\t\t\treturn false;\n\t\t}",
"n % 2 ==0",
"n % 2",
"n",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"for(int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}\n\t\t}",
"if(n % i == 0) {\n\t\t\t\tb = false;\n\t\t\t}",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n\t\t\t\tb = false;\n\t\t\t}",
"b = false",
"b",
"false",
"return b;",
"b",
"int n",
"n",
"public static List<Integer> createPrimeList(int max) {\n\n\t\tList<Integer> primeList = new ArrayList<>();\n\t\tprimeList.add(2);\n\n\t\tfor(int i = 3; i < max; i += 2) {\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}\n\t\treturn primeList;\n\t}",
"createPrimeList",
"{\n\n\t\tList<Integer> primeList = new ArrayList<>();\n\t\tprimeList.add(2);\n\n\t\tfor(int i = 3; i < max; i += 2) {\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}\n\t\treturn primeList;\n\t}",
"List<Integer> primeList = new ArrayList<>();",
"primeList",
"new ArrayList<>()",
"primeList.add(2)",
"primeList.add",
"primeList",
"2",
"for(int i = 3; i < max; i += 2) {\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i < max",
"i",
"max",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}",
"{\n\t\t\tboolean b = true;\n\t\t\tfor(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}\n\t\t}",
"boolean b = true;",
"b",
"true",
"for(int j = 3; j <= Math.sqrt(i); j += 2) {\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}",
"int j = 3;",
"int j = 3;",
"j",
"3",
"j <= Math.sqrt(i)",
"j",
"Math.sqrt(i)",
"Math.sqrt",
"Math",
"i",
"j += 2",
"j += 2",
"j",
"2",
"{\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}",
"if(i % j == 0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}",
"i % j == 0",
"i % j",
"i",
"j",
"0",
"{\n\t\t\t\t\tb = false;\n\t\t\t\t}",
"b = false",
"b",
"false",
"if(b) {\n\t\t\t\tprimeList.add(i);\n\t\t\t}",
"b",
"{\n\t\t\t\tprimeList.add(i);\n\t\t\t}",
"primeList.add(i)",
"primeList.add",
"primeList",
"i",
"return primeList;",
"primeList",
"int max",
"max",
"class Input{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\tpublic Input() {\n\t}\n\n\tpublic int getValue() {\n\t\tint n = 0;\n\t\ttry {\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn n;\n\t}\n\n\tpublic List<Integer> getLine() {\n\t\ttry {\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic void close() {\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Input",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"public Input() {\n\t}",
"Input",
"{\n\t}",
"public int getValue() {\n\t\tint n = 0;\n\t\ttry {\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn n;\n\t}",
"getValue",
"{\n\t\tint n = 0;\n\t\ttry {\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn n;\n\t}",
"int n = 0;",
"n",
"0",
"try {\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tn = Integer.parseInt(br.readLine());\n\t\t}",
"n = Integer.parseInt(br.readLine())",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"return n;",
"n",
"public List<Integer> getLine() {\n\t\ttry {\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"getLine",
"{\n\t\ttry {\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"try {\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tString[] s = br.readLine().trim().split(\" \");\n\t\t\tList<Integer> ary = new ArrayList<>();\n\t\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t\treturn ary;\n\t\t}",
"String[] s = br.readLine().trim().split(\" \");",
"s",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"List<Integer> ary = new ArrayList<>();",
"ary",
"new ArrayList<>()",
"for (int i = 0; i < s.length; i++) {\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}",
"{\n\t\t\t\tary.add(Integer.parseInt(s[i]));\n\t\t\t}",
"ary.add(Integer.parseInt(s[i]))",
"ary.add",
"ary",
"Integer.parseInt(s[i])",
"Integer.parseInt",
"Integer",
"s[i]",
"s",
"i",
"return ary;",
"ary",
"return null;",
"null",
"public void close() {\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"close",
"{\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"try {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tbr.close();\n\t\t}",
"br.close()",
"br.close",
"br"
] | import java.util.ArrayList;
import java.util.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
class Main {
static final int MAX = 10000;
public static void main(String[] args) {
int primecount = 0;
Input stdIn = new Input();
int n = stdIn.getValue();
List<Integer> values = new ArrayList<>();
for(int i = 0; i < n; i++) {
values.add(stdIn.getValue());
}
// List<Integer> primeList = createPrimeList(MAX);
// System.out.println(primeList);
// System.out.println(primeList.size());
for(int i = 0; i < n; i++) {
// System.out.println("values[i] :" + values.get(i));
if(checkPrime(values.get(i))) {
primecount++;
}
}
System.out.println(primecount);
stdIn.close();
}
public static boolean checkPrime(int n) {
boolean b = true;
if(n == 1) {
return b;
} else if(n == 2) {
return b;
} else if(n % 2 ==0) {
return false;
}
for(int i = 3; i <= Math.sqrt(n); i += 2) {
if(n % i == 0) {
b = false;
}
}
return b;
}
public static List<Integer> createPrimeList(int max) {
List<Integer> primeList = new ArrayList<>();
primeList.add(2);
for(int i = 3; i < max; i += 2) {
boolean b = true;
for(int j = 3; j <= Math.sqrt(i); j += 2) {
if(i % j == 0) {
b = false;
}
}
if(b) {
primeList.add(i);
}
}
return primeList;
}
}
class Input{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public Input() {
}
public int getValue() {
int n = 0;
try {
n = Integer.parseInt(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return n;
}
public List<Integer> getLine() {
try {
String[] s = br.readLine().trim().split(" ");
List<Integer> ary = new ArrayList<>();
for (int i = 0; i < s.length; i++) {
ary.add(Integer.parseInt(s[i]));
}
return ary;
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public void close() {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
2,
17,
13,
2,
13,
17,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
4,
18,
13,
4,
18,
13,
13,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
2,
13,
13,
13,
30,
3,
14,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
215,
8
],
[
215,
9
],
[
9,
10
],
[
9,
11
],
[
215,
12
],
[
12,
13
],
[
12,
14
],
[
215,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
17,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
17,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
66,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
66,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
17,
87
],
[
87,
88
],
[
87,
89
],
[
17,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
103,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
17,
117
],
[
117,
118
],
[
117,
119
],
[
17,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
17,
125
],
[
125,
126
],
[
17,
127
],
[
127,
128
],
[
17,
129
],
[
129,
130
],
[
129,
131
],
[
17,
132
],
[
132,
133
],
[
17,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
139,
141
],
[
134,
142
],
[
142,
143
],
[
143,
144
],
[
134,
145
],
[
146,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
146,
152
],
[
152,
153
],
[
152,
154
],
[
146,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
155,
165
],
[
165,
166
],
[
166,
167
],
[
155,
168
],
[
169,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
169,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
177,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
176,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
169,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
193,
199
],
[
199,
200
],
[
146,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
204,
205
],
[
17,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
206,
211
],
[
15,
212
],
[
212,
213
],
[
0,
214
],
[
214,
215
],
[
214,
216
]
] | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n \npublic class Main {\n \n public static final int BIG_NUM = 2000000000;\n public static final int MOD = 1000000007;\n \n public static void main(String[] args) {\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static final int BIG_NUM = 2000000000;\n public static final int MOD = 1000000007;\n \n public static void main(String[] args) {\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }\n}",
"Main",
"public static final int BIG_NUM = 2000000000;",
"BIG_NUM",
"2000000000",
"public static final int MOD = 1000000007;",
"MOD",
"1000000007",
"public static void main(String[] args) {\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }",
"main",
"{\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }",
"int table[] = new int[10001];",
"table",
"new int[10001]",
"10001",
"for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= 10000",
"i",
"10000",
"i++",
"i++",
"i",
"{\n table[i] = 1;\n }",
"{\n table[i] = 1;\n }",
"table[i] = 1",
"table[i]",
"table",
"i",
"1",
"int limit = (int)Math.sqrt(10000);",
"limit",
"(int)Math.sqrt(10000)",
"Math.sqrt",
"Math",
"10000",
"for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= limit",
"i",
"limit",
"i++",
"i++",
"i",
"{\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }",
"{\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }",
"if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }",
"table[i] == 1",
"table[i]",
"table",
"i",
"1",
"{\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }",
"for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }",
"int k = 2*i;",
"int k = 2*i;",
"k",
"2*i",
"2",
"i",
"k <= 10000",
"k",
"10000",
"k += i",
"k += i",
"k",
"i",
"{\n table[k] = 0;\n }",
"{\n table[k] = 0;\n }",
"table[k] = 0",
"table[k]",
"table",
"k",
"0",
"ArrayList<Integer> prime = new ArrayList<Integer>();",
"prime",
"new ArrayList<Integer>()",
"for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= 10000",
"i",
"10000",
"i++",
"i++",
"i",
"{\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }",
"{\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }",
"if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }",
"table[i] == 1",
"table[i]",
"table",
"i",
"1",
"{\n prime.add(Integer.valueOf(i));\n }",
"prime.add(Integer.valueOf(i))",
"prime.add",
"prime",
"Integer.valueOf(i)",
"Integer.valueOf",
"Integer",
"i",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int input",
"input",
"tmp",
"tmp",
"count = 0;",
"count",
"0",
"boolean FLG;",
"FLG",
"for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }",
"int loop = 0;",
"int loop = 0;",
"loop",
"0",
"loop < N",
"loop",
"N",
"loop++",
"loop++",
"loop",
"{\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }",
"{\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }",
"input = scanner.nextInt()",
"input",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"FLG = false",
"FLG",
"false",
"for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < prime.size()",
"i",
"prime.size()",
"prime.size",
"prime",
"i++",
"i++",
"i",
"{\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }",
"{\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }",
"tmp = prime.get(i)",
"tmp",
"prime.get(i)",
"prime.get",
"prime",
"i",
"if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }",
"input%tmp == 0 && (input/tmp) > 1",
"input%tmp == 0",
"input%tmp",
"input",
"tmp",
"0",
"(input/tmp) > 1",
"(input/tmp)",
"input",
"tmp",
"1",
"{\n FLG = true;\n break;\n }",
"FLG = true",
"FLG",
"true",
"break;",
"if(tmp*tmp > input){\n break;\n }",
"tmp*tmp > input",
"tmp*tmp",
"tmp",
"tmp",
"input",
"{\n break;\n }",
"break;",
"if(!FLG)count++;",
"!FLG",
"FLG",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n \n public static final int BIG_NUM = 2000000000;\n public static final int MOD = 1000000007;\n \n public static void main(String[] args) {\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }\n}",
"public class Main {\n \n public static final int BIG_NUM = 2000000000;\n public static final int MOD = 1000000007;\n \n public static void main(String[] args) {\n \n int table[] = new int[10001];\n \n for(int i = 0; i <= 10000; i++){\n table[i] = 1;\n }\n \n int limit = (int)Math.sqrt(10000);\n for(int i = 2; i <= limit; i++){\n if(table[i] == 1){\n for(int k = 2*i; k <= 10000; k += i){\n table[k] = 0;\n }\n }\n }\n \n ArrayList<Integer> prime = new ArrayList<Integer>();\n for(int i = 2; i <= 10000; i++){\n if(table[i] == 1){\n prime.add(Integer.valueOf(i));\n }\n }\n \n Scanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt();\n int input,tmp,count = 0;\n boolean FLG;\n \n for(int loop = 0; loop < N; loop++){\n input = scanner.nextInt();\n \n FLG = false;\n for(int i = 0; i < prime.size(); i++){\n tmp = prime.get(i);\n if(input%tmp == 0 && (input/tmp) > 1){\n FLG = true;\n break;\n }\n if(tmp*tmp > input){\n break;\n }\n }\n if(!FLG)count++;\n }\n System.out.println(count);\n }\n}",
"Main"
] | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static final int BIG_NUM = 2000000000;
public static final int MOD = 1000000007;
public static void main(String[] args) {
int table[] = new int[10001];
for(int i = 0; i <= 10000; i++){
table[i] = 1;
}
int limit = (int)Math.sqrt(10000);
for(int i = 2; i <= limit; i++){
if(table[i] == 1){
for(int k = 2*i; k <= 10000; k += i){
table[k] = 0;
}
}
}
ArrayList<Integer> prime = new ArrayList<Integer>();
for(int i = 2; i <= 10000; i++){
if(table[i] == 1){
prime.add(Integer.valueOf(i));
}
}
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int input,tmp,count = 0;
boolean FLG;
for(int loop = 0; loop < N; loop++){
input = scanner.nextInt();
FLG = false;
for(int i = 0; i < prime.size(); i++){
tmp = prime.get(i);
if(input%tmp == 0 && (input/tmp) > 1){
FLG = true;
break;
}
if(tmp*tmp > input){
break;
}
}
if(!FLG)count++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
40,
13,
30,
0,
13,
13,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
110,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
14,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
12,
62
],
[
62,
63
],
[
110,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
69,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
72,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
66,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
66,
105
],
[
105,
106
],
[
64,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\tprivate static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tpublic static void main(String[] args) throws Exception {\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static long searchMinDivisor(long n){\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tprivate static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tpublic static void main(String[] args) throws Exception {\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static long searchMinDivisor(long n){\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}\n}",
"Main",
"private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"public static void main(String[] args) throws Exception {\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int num = Integer.parseInt(br.readLine());",
"num",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}",
"num == searchMinDivisor(num)",
"num",
"searchMinDivisor(num)",
"searchMinDivisor",
"num",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static long searchMinDivisor(long n){\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}",
"searchMinDivisor",
"{\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}",
"long p;",
"p",
"boolean isSucceed = false;",
"isSucceed",
"false",
"for(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"p = 2;",
"p = 2",
"p",
"2",
"p * p <= n",
"p * p",
"p",
"p",
"n",
"p++",
"p++",
"p",
"{\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}",
"n % p == 0",
"n % p",
"n",
"p",
"0",
"{\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}",
"isSucceed = true",
"isSucceed",
"true",
"break;",
"if(!isSucceed){\n\t\t\tp = n;\n\t\t}",
"!isSucceed",
"isSucceed",
"{\n\t\t\tp = n;\n\t\t}",
"p = n",
"p",
"n",
"return p;",
"p",
"long n",
"n",
"public class Main {\n\tprivate static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tpublic static void main(String[] args) throws Exception {\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static long searchMinDivisor(long n){\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}\n}",
"public class Main {\n\tprivate static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tpublic static void main(String[] args) throws Exception {\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tif(num == searchMinDivisor(num)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static long searchMinDivisor(long n){\n\t\tlong p;\n\t\tboolean isSucceed = false;\n\t\tfor(p = 2; p * p <= n; p++){\n\t\t\tif(n % p == 0){\n\t\t\t\tisSucceed = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isSucceed){\n\t\t\tp = n;\n\t\t}\n\t\treturn p;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception {
int n = Integer.parseInt(br.readLine());
int count = 0;
for(int i = 0; i < n; i++){
int num = Integer.parseInt(br.readLine());
if(num == searchMinDivisor(num)){
count++;
}
}
System.out.println(count);
}
public static long searchMinDivisor(long n){
long p;
boolean isSucceed = false;
for(p = 2; p * p <= n; p++){
if(n % p == 0){
isSucceed = true;
break;
}
}
if(!isSucceed){
p = n;
}
return p;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
13,
4,
13,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
2,
13,
13,
2,
13,
2,
13,
17,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
17,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
18,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
16,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
6,
23
],
[
23,
24
],
[
4,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
27,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
27,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
27,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
58,
69
],
[
69,
70
],
[
70,
71
],
[
58,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
81,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
81,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
25,
104
],
[
104,
105
],
[
25,
106
],
[
106,
107
],
[
4,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
118,
119
],
[
118,
120
],
[
110,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
110,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
126,
137
],
[
138,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
144,
145
],
[
138,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
147,
153
],
[
146,
154
],
[
154,
155
],
[
110,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
108,
162
],
[
162,
163
]
] | [
"import java.util.Scanner;\n \nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tint max = 100000001;\n\t\tboolean [] sosuu = new boolean [max];\n \t\t\n\t\tsosuulist(sosuu, max);\n \t\t\n \t\tsyuturyoku(sosuu);\n\t\t\n\t}\n \n\tprivate static void sosuulist(boolean [] sosuu, int max) {\n\t\tfor (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t}\n\t\tsosuu[0] = false;\n\t\tsosuu[1] = false;\n \n\t\tfor (int i = 2; i <= Math.sqrt(max); i++) {\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t}\n\t\n\tprivate static void syuturyoku(boolean [] sosuu) {\n\t\tint [] n = new int [10000];\n\t\tint count = 0;\n\t\t\n\t\tScanner cin = new Scanner (System.in);\n\t\tint x = cin.nextInt();\n \n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}\n \n\t\tSystem.out.println(count);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tint max = 100000001;\n\t\tboolean [] sosuu = new boolean [max];\n \t\t\n\t\tsosuulist(sosuu, max);\n \t\t\n \t\tsyuturyoku(sosuu);\n\t\t\n\t}\n \n\tprivate static void sosuulist(boolean [] sosuu, int max) {\n\t\tfor (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t}\n\t\tsosuu[0] = false;\n\t\tsosuu[1] = false;\n \n\t\tfor (int i = 2; i <= Math.sqrt(max); i++) {\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t}\n\t\n\tprivate static void syuturyoku(boolean [] sosuu) {\n\t\tint [] n = new int [10000];\n\t\tint count = 0;\n\t\t\n\t\tScanner cin = new Scanner (System.in);\n\t\tint x = cin.nextInt();\n \n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}\n \n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tint max = 100000001;\n\t\tboolean [] sosuu = new boolean [max];\n \t\t\n\t\tsosuulist(sosuu, max);\n \t\t\n \t\tsyuturyoku(sosuu);\n\t\t\n\t}",
"main",
"{\n\t\tint max = 100000001;\n\t\tboolean [] sosuu = new boolean [max];\n \t\t\n\t\tsosuulist(sosuu, max);\n \t\t\n \t\tsyuturyoku(sosuu);\n\t\t\n\t}",
"int max = 100000001;",
"max",
"100000001",
"boolean [] sosuu = new boolean [max];",
"sosuu",
"new boolean [max]",
"max",
"sosuulist(sosuu, max)",
"sosuulist",
"sosuu",
"max",
"syuturyoku(sosuu)",
"syuturyoku",
"sosuu",
"String[] args",
"args",
"private static void sosuulist(boolean [] sosuu, int max) {\n\t\tfor (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t}\n\t\tsosuu[0] = false;\n\t\tsosuu[1] = false;\n \n\t\tfor (int i = 2; i <= Math.sqrt(max); i++) {\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t}",
"sosuulist",
"{\n\t\tfor (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t}\n\t\tsosuu[0] = false;\n\t\tsosuu[1] = false;\n \n\t\tfor (int i = 2; i <= Math.sqrt(max); i++) {\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t}",
"for (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= max - 1",
"i",
"max - 1",
"max",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tsosuu[i] = true;\n\t\t}",
"{\n\t\t\tsosuu[i] = true;\n\t\t}",
"sosuu[i] = true",
"sosuu[i]",
"sosuu",
"i",
"true",
"sosuu[0] = false",
"sosuu[0]",
"sosuu",
"0",
"false",
"sosuu[1] = false",
"sosuu[1]",
"sosuu",
"1",
"false",
"for (int i = 2; i <= Math.sqrt(max); i++) {\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(max)",
"i",
"Math.sqrt(max)",
"Math.sqrt",
"Math",
"max",
"i++",
"i++",
"i",
"{\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}",
"{\n\t\t\tif (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}",
"if (sosuu[i] == true) {\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}",
"sosuu[i] == true",
"sosuu[i]",
"sosuu",
"i",
"true",
"{\n\t\t\t\tfor (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}\n\t\t\t}",
"for (int j = i + i; j <= max - 1; j += i) {\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}",
"int j = i + i;",
"int j = i + i;",
"j",
"i + i",
"i",
"i",
"j <= max - 1",
"j",
"max - 1",
"max",
"1",
"j += i",
"j += i",
"j",
"i",
"{\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}",
"{\n\t\t\t\t\tsosuu[j] = false;\n\t\t\t\t}",
"sosuu[j] = false",
"sosuu[j]",
"sosuu",
"j",
"false",
"boolean [] sosuu",
"sosuu",
"int max",
"max",
"private static void syuturyoku(boolean [] sosuu) {\n\t\tint [] n = new int [10000];\n\t\tint count = 0;\n\t\t\n\t\tScanner cin = new Scanner (System.in);\n\t\tint x = cin.nextInt();\n \n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}\n \n\t\tSystem.out.println(count);\n\t}",
"syuturyoku",
"{\n\t\tint [] n = new int [10000];\n\t\tint count = 0;\n\t\t\n\t\tScanner cin = new Scanner (System.in);\n\t\tint x = cin.nextInt();\n \n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}\n \n\t\tSystem.out.println(count);\n\t}",
"int [] n = new int [10000];",
"n",
"new int [10000]",
"10000",
"int count = 0;",
"count",
"0",
"Scanner cin = new Scanner (System.in);",
"cin",
"new Scanner (System.in)",
"int x = cin.nextInt();",
"x",
"cin.nextInt()",
"cin.nextInt",
"cin",
"for (int i = 0; i < x; i++) {\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < x",
"i",
"x",
"i++",
"i++",
"i",
"{\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}",
"{\n\t\t\tn[i] = cin.nextInt();\n\t\t\tif (sosuu[n[i]] == true) count++;\n\t\t}",
"n[i] = cin.nextInt()",
"n[i]",
"n",
"i",
"cin.nextInt()",
"cin.nextInt",
"cin",
"if (sosuu[n[i]] == true) count++;",
"sosuu[n[i]] == true",
"sosuu[n[i]]",
"sosuu",
"n[i]",
"n",
"i",
"true",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"boolean [] sosuu",
"sosuu"
] | import java.util.Scanner;
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
int max = 100000001;
boolean [] sosuu = new boolean [max];
sosuulist(sosuu, max);
syuturyoku(sosuu);
}
private static void sosuulist(boolean [] sosuu, int max) {
for (int i = 1; i <= max - 1; i++) {
sosuu[i] = true;
}
sosuu[0] = false;
sosuu[1] = false;
for (int i = 2; i <= Math.sqrt(max); i++) {
if (sosuu[i] == true) {
for (int j = i + i; j <= max - 1; j += i) {
sosuu[j] = false;
}
}
}
}
private static void syuturyoku(boolean [] sosuu) {
int [] n = new int [10000];
int count = 0;
Scanner cin = new Scanner (System.in);
int x = cin.nextInt();
for (int i = 0; i < x; i++) {
n[i] = cin.nextInt();
if (sosuu[n[i]] == true) count++;
}
System.out.println(count);
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
2,
2,
18,
13,
13,
17,
17,
2,
18,
13,
13,
17,
0,
18,
13,
13,
17,
0,
13,
17,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
0,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
2,
13,
13,
18,
13,
13,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
30,
14,
2,
2,
2,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
20,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
195,
2
],
[
195,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
5,
11
],
[
11,
12
],
[
5,
13
],
[
13,
14
],
[
5,
15
],
[
15,
16
],
[
5,
17
],
[
17,
18
],
[
5,
19
],
[
19,
20
],
[
5,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
5,
26
],
[
26,
27
],
[
26,
28
],
[
5,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
50,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
5,
69
],
[
69,
70
],
[
69,
71
],
[
5,
72
],
[
72,
73
],
[
72,
74
],
[
5,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
95,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
106,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
105,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
94,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
88,
139
],
[
139,
140
],
[
140,
141
],
[
143,
142
],
[
154,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
143,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
154,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
143,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
140,
164
],
[
164,
165
],
[
165,
166
],
[
5,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
5,
173
],
[
173,
174
],
[
174,
175
],
[
3,
176
],
[
176,
177
],
[
3,
178
],
[
178,
179
],
[
195,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
183,
186
],
[
186,
187
],
[
186,
188
],
[
183,
189
],
[
189,
190
],
[
189,
191
],
[
180,
192
],
[
192,
193
],
[
0,
194
],
[
194,
195
],
[
194,
196
]
] | [
"public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}",
"public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}",
"Main",
"public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }",
"run",
"{\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }",
"java.util.Scanner sc = new java.util.Scanner(in);",
"sc",
"new java.util.Scanner(in)",
"int n;",
"n",
"int[] a;",
"a",
"int i",
"i",
"j;",
"j",
"int p",
"p",
"no;",
"no",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a = new int[n]",
"a",
"new int[n]",
"n",
"for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }",
"{\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;",
"a[i] % 2 == 0 && a[i] != 2",
"a[i] % 2 == 0",
"a[i] % 2",
"a[i]",
"a",
"i",
"2",
"0",
"a[i] != 2",
"a[i]",
"a",
"i",
"2",
"a[i] = 0",
"a[i]",
"a",
"i",
"0",
"p = 0",
"p",
"0",
"no = 0",
"no",
"0",
"for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }",
"{\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }",
"if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }",
"a[i] > 9",
"a[i]",
"a",
"i",
"9",
"{\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }",
"for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }",
"j = 3;",
"j = 3",
"j",
"3",
"j+=2",
"j+=2",
"j",
"2",
"{\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }",
"{\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }",
"if(a[i] % j == 0){\n no = 0;\n break;\n }",
"a[i] % j == 0",
"a[i] % j",
"a[i]",
"a",
"i",
"j",
"0",
"{\n no = 0;\n break;\n }",
"no = 0",
"no",
"0",
"break;",
"if(j * j > a[i]){\n no = 1;\n break;\n }",
"j * j > a[i]",
"j * j",
"j",
"j",
"a[i]",
"a",
"i",
"{\n no = 1;\n break;\n }",
"no = 1",
"no",
"1",
"break;",
"if(no == 1){\n ++p;\n }",
"no == 1",
"no",
"1",
"{\n ++p;\n }",
"++p",
"p",
"{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }",
"if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }",
"a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7",
"a[i] == 5",
"a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7",
"a[i] == 2",
"a[i]",
"a",
"i",
"2",
"a[i] == 3",
"a[i]",
"a",
"i",
"3",
"a[i] == 5",
"a[i]",
"a",
"i",
"5",
"a[i] == 7",
"a[i]",
"a",
"i",
"7",
"{\n ++p;\n }",
"++p",
"p",
"System.out.println(p)",
"System.out.println",
"System.out",
"System",
"System.out",
"p",
"sc.close()",
"sc.close",
"sc",
"java.io.InputStream in",
"in",
"java.io.PrintStream out",
"out",
"public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }",
"main",
"{\n (new Main()).run(System.in, System.out);\n }",
"(new Main()).run(System.in, System.out)",
"(new Main()).run",
"(new Main())",
"System.in",
"System",
"System.in",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}",
"public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j;\n int p, no;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;++i){\n a[i] = sc.nextInt();\n if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;\n }\n\n p = 0;\n no = 0;\n for(i = 0;i < n;i++){\n if(a[i] > 9){\n for(j = 3;;j+=2){\n if(a[i] % j == 0){\n no = 0;\n break;\n }\n if(j * j > a[i]){\n no = 1;\n break;\n }\n }\n if(no == 1){\n ++p;\n }\n }else{\n if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){\n ++p;\n }\n }\n }\n\n System.out.println(p);\n/*fin*/\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}",
"Main"
] | public class Main{
public void run(java.io.InputStream in, java.io.PrintStream out){
java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
int n;
int[] a;
int i, j;
int p, no;
n = sc.nextInt();
a = new int[n];
for(i = 0;i < n;++i){
a[i] = sc.nextInt();
if(a[i] % 2 == 0 && a[i] != 2)a[i] = 0;
}
p = 0;
no = 0;
for(i = 0;i < n;i++){
if(a[i] > 9){
for(j = 3;;j+=2){
if(a[i] % j == 0){
no = 0;
break;
}
if(j * j > a[i]){
no = 1;
break;
}
}
if(no == 1){
++p;
}
}else{
if(a[i] == 2 || a[i] == 3 || a[i] == 5 || a[i] == 7){
++p;
}
}
}
System.out.println(p);
/*fin*/
sc.close();
}
public static void main(String[] args){
(new Main()).run(System.in, System.out);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
41,
13,
17,
41,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
28,
13,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
54,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
50,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
86,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
] | [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n;",
"n",
"ArrayList<Integer> num = new ArrayList<Integer>();",
"num",
"new ArrayList<Integer>()",
"int ans = 0",
"ans",
"0",
"isPrime;",
"isPrime",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnum.add(sc.nextInt());\n\t\t}",
"{\n\t\t\tnum.add(sc.nextInt());\n\t\t}",
"num.add(sc.nextInt())",
"num.add",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}",
"int i",
"num",
"{\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}",
"isPrime = 1",
"isPrime",
"1",
"for(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= (int)Math.sqrt(i)",
"j",
"(int)Math.sqrt(i)",
"Math.sqrt",
"Math",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"i % j == 0",
"i % j",
"i",
"j",
"0",
"{\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"isPrime = 0",
"isPrime",
"0",
"break;",
"if(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}",
"isPrime != 0",
"isPrime",
"0",
"{\n\t\t\t\tans ++;\n\t\t\t}",
"ans ++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n;\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint ans = 0, isPrime;\n\t\t\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tnum.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i : num){\n\t\t\tisPrime = 1;\n\t\t\tfor(int j = 2; j <= (int)Math.sqrt(i); j++){\n\t\t\t\tif(i % j == 0){\n\t\t\t\t\tisPrime = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isPrime != 0){\n\t\t\t\tans ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n;
ArrayList<Integer> num = new ArrayList<Integer>();
int ans = 0, isPrime;
n = sc.nextInt();
for(int i = 0; i < n; i++){
num.add(sc.nextInt());
}
for(int i : num){
isPrime = 1;
for(int j = 2; j <= (int)Math.sqrt(i); j++){
if(i % j == 0){
isPrime = 0;
break;
}
}
if(isPrime != 0){
ans ++;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
0,
13,
17,
29,
17,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
30,
14,
4,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
19,
29
],
[
29,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
35,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
42,
52
],
[
52,
53
],
[
52,
54
],
[
11,
55
],
[
55,
56
],
[
9,
57
],
[
57,
58
],
[
0,
59
],
[
119,
60
],
[
119,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
63,
72
],
[
72,
73
],
[
72,
74
],
[
63,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
63,
94
],
[
94,
95
],
[
94,
96
],
[
63,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
102,
107
],
[
107,
108
],
[
108,
109
],
[
63,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
61,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
] | [
"import java.io.*;\nimport java.util.*;\n\nclass JudgingMchine {\n static boolean isPrime(int x) {\n if(x == 2) {\n return true;\n }\n if(x < 2 || x % 2 == 0) {\n return false;\n }\n\n int i =3;\n while(i <= Math.sqrt(x)) {\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }\n return true;\n }\n}\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class JudgingMchine {\n static boolean isPrime(int x) {\n if(x == 2) {\n return true;\n }\n if(x < 2 || x % 2 == 0) {\n return false;\n }\n\n int i =3;\n while(i <= Math.sqrt(x)) {\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }\n return true;\n }\n}",
"JudgingMchine",
"static boolean isPrime(int x) {\n if(x == 2) {\n return true;\n }\n if(x < 2 || x % 2 == 0) {\n return false;\n }\n\n int i =3;\n while(i <= Math.sqrt(x)) {\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }\n return true;\n }",
"isPrime",
"{\n if(x == 2) {\n return true;\n }\n if(x < 2 || x % 2 == 0) {\n return false;\n }\n\n int i =3;\n while(i <= Math.sqrt(x)) {\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }\n return true;\n }",
"if(x == 2) {\n return true;\n }",
"x == 2",
"x",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(x < 2 || x % 2 == 0) {\n return false;\n }",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"int i =3;",
"i",
"3",
"while(i <= Math.sqrt(x)) {\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n if(x % i == 0) {\n return false;\n }\n i += 2;\n }",
"if(x % i == 0) {\n return false;\n }",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"i += 2",
"i",
"2",
"return true;",
"true",
"int x",
"x",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> nums = new ArrayList<>();",
"nums",
"new ArrayList<>()",
"for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n nums.add(sc.nextInt());\n }",
"{\n nums.add(sc.nextInt());\n }",
"nums.add(sc.nextInt())",
"nums.add",
"nums",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }",
"int num",
"nums",
"{\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }",
"{\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }",
"if(JudgingMchine.isPrime(num)) {\n count++;\n }",
"JudgingMchine.isPrime(num)",
"JudgingMchine.isPrime",
"JudgingMchine",
"num",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }\n\n int count = 0;\n for(int num : nums) {\n if(JudgingMchine.isPrime(num)) {\n count++;\n }\n }\n\n System.out.println(count);\n\n }\n}",
"Main"
] | import java.io.*;
import java.util.*;
class JudgingMchine {
static boolean isPrime(int x) {
if(x == 2) {
return true;
}
if(x < 2 || x % 2 == 0) {
return false;
}
int i =3;
while(i <= Math.sqrt(x)) {
if(x % i == 0) {
return false;
}
i += 2;
}
return true;
}
}
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
List<Integer> nums = new ArrayList<>();
for(int i=0; i<n; ++i) {
nums.add(sc.nextInt());
}
int count = 0;
for(int num : nums) {
if(JudgingMchine.isPrime(num)) {
count++;
}
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
32,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
41,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
32,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] | [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int count=0;",
"count",
"0",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int state=0;",
"state",
"0",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j=2;",
"int j=2;",
"j",
"2",
"j<=Math.sqrt(a)",
"j",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"a%j==0",
"a%j",
"a",
"j",
"0",
"{\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"state=1",
"state",
"1",
"break;",
"if(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}",
"state==0",
"state",
"0",
"{\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint count=0;\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint state=0;\n\t\t\tint a=sc.nextInt();\n\t\t\tfor(int j=2;j<=Math.sqrt(a);j++){\n\t\t\t\tif(a%j==0){\n\t\t\t\t\tstate=1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(state==0){\n\t\t\t\t//System.out.println(a);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
int count=0;
int n=sc.nextInt();
for(int i=0;i<n;i++){
int state=0;
int a=sc.nextInt();
for(int j=2;j<=Math.sqrt(a);j++){
if(a%j==0){
state=1;
break;
}
}
if(state==0){
//System.out.println(a);
count++;
}
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
4,
18,
13,
14,
4,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
11,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
29,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
6,
39
],
[
39,
40
],
[
4,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
52,
54
],
[
43,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
43,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
41,
73
],
[
73,
74
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\n private static boolean isPrime(int n){\n int sqrt = (int) Math.sqrt(n) + 1;\n \n for (int i = 2; i < sqrt; i++)\n if (n % i == 0)\n return false;\n\n return true;\n }\n\n\n public static void main(String[] args) throws Exception{\n\n Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n\n int ans = 0;\n\n while (sc.hasNextInt())\n if (isPrime(sc.nextInt()))\n ans++;\n\n System.out.println(ans);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n private static boolean isPrime(int n){\n int sqrt = (int) Math.sqrt(n) + 1;\n \n for (int i = 2; i < sqrt; i++)\n if (n % i == 0)\n return false;\n\n return true;\n }\n\n\n public static void main(String[] args) throws Exception{\n\n Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n\n int ans = 0;\n\n while (sc.hasNextInt())\n if (isPrime(sc.nextInt()))\n ans++;\n\n System.out.println(ans);\n }\n}",
"Main",
"private static boolean isPrime(int n){\n int sqrt = (int) Math.sqrt(n) + 1;\n \n for (int i = 2; i < sqrt; i++)\n if (n % i == 0)\n return false;\n\n return true;\n }",
"isPrime",
"{\n int sqrt = (int) Math.sqrt(n) + 1;\n \n for (int i = 2; i < sqrt; i++)\n if (n % i == 0)\n return false;\n\n return true;\n }",
"int sqrt = (int) Math.sqrt(n) + 1;",
"sqrt",
"(int) Math.sqrt(n) + 1",
"(int) Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"1",
"for (int i = 2; i < sqrt; i++)\n if (n % i == 0)\n return false;",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < sqrt",
"i",
"sqrt",
"i++",
"i++",
"i",
"if (n % i == 0)\n return false;",
"if (n % i == 0)\n return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static void main(String[] args) throws Exception{\n\n Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n\n int ans = 0;\n\n while (sc.hasNextInt())\n if (isPrime(sc.nextInt()))\n ans++;\n\n System.out.println(ans);\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n\n int ans = 0;\n\n while (sc.hasNextInt())\n if (isPrime(sc.nextInt()))\n ans++;\n\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int length = sc.nextInt();",
"length",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"while (sc.hasNextInt())\n if (isPrime(sc.nextInt()))\n ans++;",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"if (isPrime(sc.nextInt()))\n ans++;",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
private static boolean isPrime(int n){
int sqrt = (int) Math.sqrt(n) + 1;
for (int i = 2; i < sqrt; i++)
if (n % i == 0)
return false;
return true;
}
public static void main(String[] args) throws Exception{
Scanner sc = new Scanner(System.in);
int length = sc.nextInt();
int ans = 0;
while (sc.hasNextInt())
if (isPrime(sc.nextInt()))
ans++;
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
29,
17,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
29,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
6,
48
],
[
48,
49
],
[
4,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
56,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
64,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
52,
91
],
[
91,
92
],
[
50,
93
],
[
93,
94
]
] | [
"import java.util.*;\nclass Main{\n public static void main(String[] args){\n Scanner x = new Scanner(System.in);\n int s = x.nextInt();\n int prime = 0;\n for(int i=0;i<s;i++){\n if(Prime(x.nextInt())){\n prime++;\n }\n }\n System.out.println(prime);\n }\n public static boolean Prime(int p){\n boolean P =true;\n if(p<2){\n return false;\n }else{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }\n return P;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n Scanner x = new Scanner(System.in);\n int s = x.nextInt();\n int prime = 0;\n for(int i=0;i<s;i++){\n if(Prime(x.nextInt())){\n prime++;\n }\n }\n System.out.println(prime);\n }\n public static boolean Prime(int p){\n boolean P =true;\n if(p<2){\n return false;\n }else{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }\n return P;\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner x = new Scanner(System.in);\n int s = x.nextInt();\n int prime = 0;\n for(int i=0;i<s;i++){\n if(Prime(x.nextInt())){\n prime++;\n }\n }\n System.out.println(prime);\n }",
"main",
"{\n Scanner x = new Scanner(System.in);\n int s = x.nextInt();\n int prime = 0;\n for(int i=0;i<s;i++){\n if(Prime(x.nextInt())){\n prime++;\n }\n }\n System.out.println(prime);\n }",
"Scanner x = new Scanner(System.in);",
"x",
"new Scanner(System.in)",
"int s = x.nextInt();",
"s",
"x.nextInt()",
"x.nextInt",
"x",
"int prime = 0;",
"prime",
"0",
"for(int i=0;i<s;i++){\n if(Prime(x.nextInt())){\n prime++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s",
"i",
"s",
"i++",
"i++",
"i",
"{\n if(Prime(x.nextInt())){\n prime++;\n }\n }",
"{\n if(Prime(x.nextInt())){\n prime++;\n }\n }",
"if(Prime(x.nextInt())){\n prime++;\n }",
"Prime(x.nextInt())",
"Prime",
"x.nextInt()",
"x.nextInt",
"x",
"{\n prime++;\n }",
"prime++",
"prime",
"System.out.println(prime)",
"System.out.println",
"System.out",
"System",
"System.out",
"prime",
"String[] args",
"args",
"public static boolean Prime(int p){\n boolean P =true;\n if(p<2){\n return false;\n }else{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }\n return P;\n }",
"Prime",
"{\n boolean P =true;\n if(p<2){\n return false;\n }else{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }\n return P;\n }",
"boolean P =true;",
"P",
"true",
"if(p<2){\n return false;\n }else{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }",
"p<2",
"p",
"2",
"{\n return false;\n }",
"return false;",
"false",
"{\n for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }\n }",
"for(int i=2;i<=Math.sqrt(p);i++){\n if(p%i==0){\n P = false;\n break;\n }\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(p)",
"i",
"Math.sqrt(p)",
"Math.sqrt",
"Math",
"p",
"i++",
"i++",
"i",
"{\n if(p%i==0){\n P = false;\n break;\n }\n }",
"{\n if(p%i==0){\n P = false;\n break;\n }\n }",
"if(p%i==0){\n P = false;\n break;\n }",
"p%i==0",
"p%i",
"p",
"i",
"0",
"{\n P = false;\n break;\n }",
"P = false",
"P",
"false",
"break;",
"return P;",
"P",
"int p",
"p"
] | import java.util.*;
class Main{
public static void main(String[] args){
Scanner x = new Scanner(System.in);
int s = x.nextInt();
int prime = 0;
for(int i=0;i<s;i++){
if(Prime(x.nextInt())){
prime++;
}
}
System.out.println(prime);
}
public static boolean Prime(int p){
boolean P =true;
if(p<2){
return false;
}else{
for(int i=2;i<=Math.sqrt(p);i++){
if(p%i==0){
P = false;
break;
}
}
}
return P;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
0,
13,
2,
13,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
32,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
39,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
6,
56
],
[
56,
57
],
[
4,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
60,
69
],
[
69,
70
],
[
69,
71
],
[
60,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
60,
93
],
[
93,
94
],
[
93,
95
],
[
60,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
60,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
58,
124
],
[
124,
125
]
] | [
"import java.util.Scanner;\nclass Main\n{\n public static boolean isPrime(int x)\n {\n if(x==2)\n {\n return true;\n }\n if((x<2)||(x%2==0))\n {\n return false;\n }\n int i=3;\n while(i<=Math.sqrt(x))\n {\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }\n return true;\n }\n public static void main(String[]av)\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int[] num=new int[n];\n for(int i=0;i<n;i++)\n {\n num[i]=sc.nextInt();\n }\n int count=0;\n for(int i=0;i<n;i++)\n {\n if(isPrime(num[i]))\n {\n count++;\n }\n }\n System.out.println(count);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main\n{\n public static boolean isPrime(int x)\n {\n if(x==2)\n {\n return true;\n }\n if((x<2)||(x%2==0))\n {\n return false;\n }\n int i=3;\n while(i<=Math.sqrt(x))\n {\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }\n return true;\n }\n public static void main(String[]av)\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int[] num=new int[n];\n for(int i=0;i<n;i++)\n {\n num[i]=sc.nextInt();\n }\n int count=0;\n for(int i=0;i<n;i++)\n {\n if(isPrime(num[i]))\n {\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"Main",
"public static boolean isPrime(int x)\n {\n if(x==2)\n {\n return true;\n }\n if((x<2)||(x%2==0))\n {\n return false;\n }\n int i=3;\n while(i<=Math.sqrt(x))\n {\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }\n return true;\n }",
"isPrime",
"{\n if(x==2)\n {\n return true;\n }\n if((x<2)||(x%2==0))\n {\n return false;\n }\n int i=3;\n while(i<=Math.sqrt(x))\n {\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }\n return true;\n }",
"if(x==2)\n {\n return true;\n }",
"x==2",
"x",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if((x<2)||(x%2==0))\n {\n return false;\n }",
"(x<2)||(x%2==0)",
"(x<2)",
"x",
"2",
"(x%2==0)",
"x%2",
"x",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"int i=3;",
"i",
"3",
"while(i<=Math.sqrt(x))\n {\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }",
"i<=Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n if(x%i==0)\n {\n return false;\n }\n i=i+2;\n }",
"if(x%i==0)\n {\n return false;\n }",
"x%i==0",
"x%i",
"x",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"i=i+2",
"i",
"i+2",
"i",
"2",
"return true;",
"true",
"int x",
"x",
"public static void main(String[]av)\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int[] num=new int[n];\n for(int i=0;i<n;i++)\n {\n num[i]=sc.nextInt();\n }\n int count=0;\n for(int i=0;i<n;i++)\n {\n if(isPrime(num[i]))\n {\n count++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int[] num=new int[n];\n for(int i=0;i<n;i++)\n {\n num[i]=sc.nextInt();\n }\n int count=0;\n for(int i=0;i<n;i++)\n {\n if(isPrime(num[i]))\n {\n count++;\n }\n }\n System.out.println(count);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] num=new int[n];",
"num",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n {\n num[i]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num[i]=sc.nextInt();\n }",
"{\n num[i]=sc.nextInt();\n }",
"num[i]=sc.nextInt()",
"num[i]",
"num",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count=0;",
"count",
"0",
"for(int i=0;i<n;i++)\n {\n if(isPrime(num[i]))\n {\n count++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(isPrime(num[i]))\n {\n count++;\n }\n }",
"{\n if(isPrime(num[i]))\n {\n count++;\n }\n }",
"if(isPrime(num[i]))\n {\n count++;\n }",
"isPrime(num[i])",
"isPrime",
"num[i]",
"num",
"i",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[]av",
"av"
] | import java.util.Scanner;
class Main
{
public static boolean isPrime(int x)
{
if(x==2)
{
return true;
}
if((x<2)||(x%2==0))
{
return false;
}
int i=3;
while(i<=Math.sqrt(x))
{
if(x%i==0)
{
return false;
}
i=i+2;
}
return true;
}
public static void main(String[]av)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[] num=new int[n];
for(int i=0;i<n;i++)
{
num[i]=sc.nextInt();
}
int count=0;
for(int i=0;i<n;i++)
{
if(isPrime(num[i]))
{
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
40,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
142,
5
],
[
142,
6
],
[
6,
7
],
[
6,
8
],
[
142,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
9,
36
],
[
36,
37
],
[
142,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
40,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
47,
57
],
[
57,
58
],
[
58,
59
],
[
47,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
61,
70
],
[
70,
71
],
[
70,
72
],
[
61,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
61,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
40,
106
],
[
106,
107
],
[
38,
108
],
[
108,
109
],
[
142,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
117,
125
],
[
125,
126
],
[
126,
127
],
[
117,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
112,
137
],
[
137,
138
],
[
110,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}\n\n\tprivate static int judgePrime(int[] nums) {\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}\n\n\tprivate static int[] inpNum(int n) {\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}\n\n\tprivate static int judgePrime(int[] nums) {\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}\n\n\tprivate static int[] inpNum(int n) {\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}",
"main",
"{\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] nums = inpNum(n);",
"nums",
"inpNum(n)",
"inpNum",
"n",
"int num_prime = judgePrime(nums);",
"num_prime",
"judgePrime(nums)",
"judgePrime",
"nums",
"System.out.println(num_prime)",
"System.out.println",
"System.out",
"System",
"System.out",
"num_prime",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"private static int judgePrime(int[] nums) {\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}",
"judgePrime",
"{\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}",
"int num_prime = 0;",
"num_prime",
"0",
"boolean isPrime = true;",
"isPrime",
"true",
"for(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < nums.length",
"i",
"nums.length",
"nums",
"nums.length",
"i++",
"i++",
"i",
"{\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}",
"{\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}",
"int sqrt = (int)Math.sqrt(nums[i]);",
"sqrt",
"(int)Math.sqrt(nums[i])",
"Math.sqrt",
"Math",
"nums[i]",
"nums",
"i",
"isPrime = true",
"isPrime",
"true",
"for (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= sqrt",
"j",
"sqrt",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"nums[i] % j == 0",
"nums[i] % j",
"nums[i]",
"nums",
"i",
"j",
"0",
"{\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"if (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}",
"isPrime == true",
"isPrime",
"true",
"{\n\t\t\t\tnum_prime++;\n\t\t\t}",
"num_prime++",
"num_prime",
"return num_prime;",
"num_prime",
"int[] nums",
"nums",
"private static int[] inpNum(int n) {\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}",
"inpNum",
"{\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}",
"int[] nums = new int[n];",
"nums",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnums[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tnums[i] = sc.nextInt();\n\t\t}",
"nums[i] = sc.nextInt()",
"nums[i]",
"nums",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"return nums;",
"nums",
"int n",
"n",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}\n\n\tprivate static int judgePrime(int[] nums) {\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}\n\n\tprivate static int[] inpNum(int n) {\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}\n\n}",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\n\t\tint n = sc.nextInt();\n\t\tint[] nums = inpNum(n);\n\t\tint num_prime = judgePrime(nums);\n\t\tSystem.out.println(num_prime);\n\n\t\tsc.close();\n\t}\n\n\tprivate static int judgePrime(int[] nums) {\n\t\tint num_prime = 0;\n\t\tboolean isPrime = true;\n\n\t\tfor(int i = 0; i < nums.length; i++) {\n\n\t\t\tint sqrt = (int)Math.sqrt(nums[i]);\n\t\t\tisPrime = true;\n\n\t\t\t\tfor (int j = 2; j <= sqrt ;j++) {\n\t\t\t\t\tif (nums[i] % j == 0) {\n\t\t\t\t\t\tisPrime = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tif (isPrime == true) {\n\t\t\t\tnum_prime++;\n\t\t\t}\n\n\t\t}\n\n\n\n\t\treturn num_prime;\n\t}\n\n\tprivate static int[] inpNum(int n) {\n\t\tint[] nums = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\treturn nums;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
int[] nums = inpNum(n);
int num_prime = judgePrime(nums);
System.out.println(num_prime);
sc.close();
}
private static int judgePrime(int[] nums) {
int num_prime = 0;
boolean isPrime = true;
for(int i = 0; i < nums.length; i++) {
int sqrt = (int)Math.sqrt(nums[i]);
isPrime = true;
for (int j = 2; j <= sqrt ;j++) {
if (nums[i] % j == 0) {
isPrime = false;
break;
}
}
if (isPrime == true) {
num_prime++;
}
}
return num_prime;
}
private static int[] inpNum(int n) {
int[] nums = new int[n];
for (int i = 0; i < n; i++) {
nums[i] = sc.nextInt();
}
return nums;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
42,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
42,
2,
2,
18,
13,
13,
17,
2,
18,
13,
13,
4,
18,
13,
17,
17,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
4,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
48,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
47,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
72,
80
],
[
80,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
6,
88
],
[
88,
89
],
[
138,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
92,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
99,
109
],
[
109,
110
],
[
92,
111
],
[
111,
112
],
[
111,
113
],
[
92,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
114,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
122,
128
],
[
128,
129
],
[
121,
130
],
[
130,
131
],
[
130,
132
],
[
92,
133
],
[
133,
134
],
[
90,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.Scanner;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }\n \n public static int isprime(int x)\n {\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }\n \n public static int isprime(int x)\n {\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }\n}",
"Main",
"public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }",
"main",
"{\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }",
"Scanner In = new Scanner(System.in);",
"In",
"new Scanner(System.in)",
"int n",
"n",
"count = 0;",
"count",
"0",
"do\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);",
"1 >= n && n >= 10000",
"1 >= n",
"1",
"n",
"n >= 10000",
"n",
"10000",
"{\n\t\tn = In.nextInt();\n\t }",
"n = In.nextInt()",
"n",
"In.nextInt()",
"In.nextInt",
"In",
"int []a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }",
"{\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }",
"do\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));",
"a[i] <= 2 && a[i] >= Math.pow(10,8)",
"a[i] <= 2",
"a[i]",
"a",
"i",
"2",
"a[i] >= Math.pow(10,8)",
"a[i]",
"a",
"i",
"Math.pow(10,8)",
"Math.pow",
"Math",
"10",
"8",
"{\n\t\t\ta[i] = In.nextInt();\n\t\t}",
"a[i] = In.nextInt()",
"a[i]",
"a",
"i",
"In.nextInt()",
"In.nextInt",
"In",
"if((isprime(a[i])) == 1)\n\t\t count++;",
"(isprime(a[i])) == 1",
"(isprime(a[i]))",
"isprime",
"a[i]",
"a",
"i",
"1",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static int isprime(int x)\n {\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }",
"isprime",
"{\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }",
"if(x == 2)\n\t return 1;",
"x == 2",
"x",
"2",
"return 1;",
"1",
"if(x < 2 || x % 2 == 0)\n\t return 0;",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return 0;",
"0",
"int j = 3;",
"j",
"3",
"while(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }",
"j <= Math.sqrt(x)",
"j",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }",
"if(x % j == 0)\n\t\t return 0;",
"x % j == 0",
"x % j",
"x",
"j",
"0",
"return 0;",
"0",
"j += 2",
"j",
"2",
"return 1;",
"1",
"int x",
"x",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }\n \n public static int isprime(int x)\n {\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\t\n\tint n,count = 0;\n\t\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 10000);\n\t\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t {\n\t\tdo\n\t\t {\n\t\t\ta[i] = In.nextInt();\n\t\t}while(a[i] <= 2 && a[i] >= Math.pow(10,8));\n\n\t\tif((isprime(a[i])) == 1)\n\t\t count++;\n\t }\n\t\tSystem.out.println(count);\n }\n \n public static int isprime(int x)\n {\n\tif(x == 2)\n\t return 1;\n\n\tif(x < 2 || x % 2 == 0)\n\t return 0;\n \n\tint j = 3;\n\twhile(j <= Math.sqrt(x))\n\t {\n\t\tif(x % j == 0)\n\t\t return 0;\n\n\t\tj += 2;\n\t }\n\treturn 1;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner In = new Scanner(System.in);
int n,count = 0;
do
{
n = In.nextInt();
}while(1 >= n && n >= 10000);
int []a = new int[n];
for(int i = 0; i < n; i++)
{
do
{
a[i] = In.nextInt();
}while(a[i] <= 2 && a[i] >= Math.pow(10,8));
if((isprime(a[i])) == 1)
count++;
}
System.out.println(count);
}
public static int isprime(int x)
{
if(x == 2)
return 1;
if(x < 2 || x % 2 == 0)
return 0;
int j = 3;
while(j <= Math.sqrt(x))
{
if(x % j == 0)
return 0;
j += 2;
}
return 1;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
4,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
12,
13,
30,
28,
13,
13,
30,
30,
14,
4,
13,
13,
30,
40,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
2,
18,
13,
13,
17,
30,
0,
13,
4,
18,
13,
18,
13,
13,
30,
0,
13,
2,
4,
18,
13,
18,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
13,
29,
13,
23,
13,
12,
13,
30,
4,
13,
4,
13,
4,
13,
4,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
284,
11
],
[
284,
12
],
[
12,
13
],
[
284,
14
],
[
14,
15
],
[
284,
16
],
[
16,
17
],
[
284,
18
],
[
18,
19
],
[
284,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
284,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
284,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
67,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
84,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
107,
108
],
[
108,
109
],
[
67,
110
],
[
110,
111
],
[
65,
112
],
[
112,
113
],
[
284,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
284,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
284,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
284,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
143,
144
],
[
284,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
147,
158
],
[
158,
159
],
[
158,
160
],
[
161,
162
],
[
161,
163
],
[
147,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
171,
173
],
[
164,
174
],
[
174,
175
],
[
175,
176
],
[
164,
177
],
[
178,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
183,
184
],
[
184,
185
],
[
183,
186
],
[
186,
187
],
[
186,
188
],
[
147,
189
],
[
189,
190
],
[
284,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
197,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
204,
206
],
[
197,
207
],
[
207,
208
],
[
208,
209
],
[
197,
210
],
[
211,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
219
],
[
212,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
226,
227
],
[
226,
228
],
[
212,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
233,
236
],
[
236,
237
],
[
236,
238
],
[
232,
239
],
[
193,
240
],
[
240,
241
],
[
191,
242
],
[
242,
243
],
[
284,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
246,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
250,
255
],
[
255,
256
],
[
255,
257
],
[
250,
258
],
[
258,
259
],
[
259,
260
],
[
250,
261
],
[
262,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
246,
266
],
[
266,
267
],
[
244,
268
],
[
268,
269
],
[
284,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
272,
275
],
[
275,
276
],
[
272,
277
],
[
277,
278
],
[
272,
279
],
[
279,
280
],
[
270,
281
],
[
281,
282
],
[
0,
283
],
[
283,
284
],
[
283,
285
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tstatic int n;\n\tstatic int[] nums;\n\tstatic int result;\n\t\n\tstatic void input() throws IOException {\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic boolean isPrime(int n) {\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tstatic void output() {\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\t\n\tstatic int n;\n\tstatic int[] nums;\n\tstatic int result;\n\t\n\tstatic void input() throws IOException {\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic boolean isPrime(int n) {\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tstatic void output() {\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"Main",
"static int n;",
"n",
"static int[] nums;",
"nums",
"static int result;",
"result",
"static BufferedReader in;",
"in",
"static void input() throws IOException {\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}",
"input",
"{\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}",
"n = readInt()",
"n",
"readInt()",
"readInt",
"nums = new int[n]",
"nums",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnums[i] = readInt();\n\t\t}",
"{\n\t\t\tnums[i] = readInt();\n\t\t}",
"nums[i] = readInt()",
"nums[i]",
"nums",
"i",
"readInt()",
"readInt",
"static void process() {\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}",
"process",
"{\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}",
"for (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}",
"int i",
"nums",
"{\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}",
"if (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}",
"isPrime(i)",
"isPrime",
"i",
"{\n\t\t\t\tresult++;\n\t\t\t}",
"result++",
"result",
"static boolean isPrime(int n) {\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"if (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"n == 2",
"n",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"for (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"static void output() {\n\t\tSystem.out.println(result);\n\t}",
"output",
"{\n\t\tSystem.out.println(result);\n\t}",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"static void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"initBufferedReader",
"{\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"in = new BufferedReader(new InputStreamReader(System.in))",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"static String readString() throws IOException {\n\t\treturn in.readLine();\n\t}",
"readString",
"{\n\t\treturn in.readLine();\n\t}",
"return in.readLine();",
"in.readLine()",
"in.readLine",
"in",
"static int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}",
"readInt",
"{\n\t\treturn Integer.valueOf(readString());\n\t}",
"return Integer.valueOf(readString());",
"Integer.valueOf(readString())",
"Integer.valueOf",
"Integer",
"readString()",
"readString",
"static int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}",
"readMultiInt",
"{\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}",
"String input = readString();",
"input",
"readString()",
"readString",
"String[] values = input.split(\" \");",
"values",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"int[] result = new int[values.length];",
"result",
"new int[values.length]",
"values.length",
"values",
"values.length",
"for (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"{\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"result[i] = Integer.valueOf(values[i])",
"result[i]",
"result",
"i",
"Integer.valueOf(values[i])",
"Integer.valueOf",
"Integer",
"values[i]",
"values",
"i",
"return result;",
"result",
"static String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"arrayToString",
"{\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"String result = \"\";",
"result",
"\"\"",
"for (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < data.length",
"i",
"data.length",
"data",
"data.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"if (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}",
"i >= data.length - 1",
"i",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"{\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t}",
"result += String.valueOf(data[i])",
"result",
"String.valueOf(data[i])",
"String.valueOf",
"String",
"data[i]",
"data",
"i",
"{\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}",
"result += String.valueOf(data[i]) + \" \"",
"result",
"String.valueOf(data[i]) + \" \"",
"String.valueOf(data[i])",
"String.valueOf",
"String",
"data[i]",
"data",
"i",
"\" \"",
"return result;",
"result",
"int[] data",
"data",
"static long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}",
"factional",
"{\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}",
"int result = 1;",
"result",
"1",
"for (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tresult *= i;\n\t\t}",
"{\n\t\t\tresult *= i;\n\t\t}",
"result *= i",
"result",
"i",
"return result;",
"result",
"int n",
"n",
"public static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}",
"main",
"{\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}",
"initBufferedReader()",
"initBufferedReader",
"input()",
"input",
"process()",
"process",
"output()",
"output",
"String[] args",
"args",
"public class Main {\n\t\n\tstatic int n;\n\tstatic int[] nums;\n\tstatic int result;\n\t\n\tstatic void input() throws IOException {\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic boolean isPrime(int n) {\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tstatic void output() {\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"public class Main {\n\t\n\tstatic int n;\n\tstatic int[] nums;\n\tstatic int result;\n\t\n\tstatic void input() throws IOException {\n\t\tn = readInt();\n\t\tnums = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums[i] = readInt();\n\t\t}\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i : nums) {\n\t\t\tif (isPrime(i)) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic boolean isPrime(int n) {\n\t\tif (n == 2) {\n\t\t\treturn true;\n\t\t} else if (n % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(n); i += 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tstatic void output() {\n\t\tSystem.out.println(result);\n\t}\n\t\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static int n;
static int[] nums;
static int result;
static void input() throws IOException {
n = readInt();
nums = new int[n];
for (int i = 0; i < n; i++) {
nums[i] = readInt();
}
}
static void process() {
for (int i : nums) {
if (isPrime(i)) {
result++;
}
}
}
static boolean isPrime(int n) {
if (n == 2) {
return true;
} else if (n % 2 == 0) {
return false;
}
for (int i = 3; i <= Math.sqrt(n); i += 2) {
if (n % i == 0) {
return false;
}
}
return true;
}
static void output() {
System.out.println(result);
}
static BufferedReader in;
static void initBufferedReader() {
in = new BufferedReader(new InputStreamReader(System.in));
}
static String readString() throws IOException {
return in.readLine();
}
static int readInt() throws NumberFormatException, IOException {
return Integer.valueOf(readString());
}
static int[] readMultiInt() throws IOException {
String input = readString();
String[] values = input.split(" ");
int[] result = new int[values.length];
for (int i = 0; i < values.length; i++) {
result[i] = Integer.valueOf(values[i]);
}
return result;
}
static String arrayToString(int[] data) {
String result = "";
for (int i = 0; i < data.length; i++) {
if (i >= data.length - 1) {
result += String.valueOf(data[i]);
} else {
result += String.valueOf(data[i]) + " ";
}
}
return result;
}
static long factional(int n) {
int result = 1;
for (int i = 1; i <= n; i++) {
result *= i;
}
return result;
}
public static void main(String[] args) throws IOException {
initBufferedReader();
input();
process();
output();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
14,
2,
2,
2,
2,
2,
2,
13,
17,
17,
2,
13,
17,
2,
2,
2,
13,
17,
17,
2,
13,
17,
2,
2,
2,
13,
17,
17,
2,
13,
17,
2,
2,
2,
13,
17,
17,
2,
13,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
175,
11
],
[
175,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
18,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
25,
34
],
[
34,
35
],
[
34,
36
],
[
25,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
25,
61
],
[
61,
62
],
[
61,
63
],
[
25,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
25,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
12,
95
],
[
95,
96
],
[
175,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
103,
102
],
[
122,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
104,
110
],
[
110,
111
],
[
110,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
122,
128
],
[
128,
129
],
[
128,
130
],
[
103,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
131,
137
],
[
137,
138
],
[
137,
139
],
[
100,
140
],
[
140,
141
],
[
141,
142
],
[
99,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
150,
155
],
[
143,
156
],
[
156,
157
],
[
157,
158
],
[
143,
159
],
[
160,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
161,
167
],
[
167,
168
],
[
168,
169
],
[
99,
170
],
[
170,
171
],
[
97,
172
],
[
172,
173
],
[
0,
174
],
[
174,
175
],
[
174,
176
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }\n \n static boolean isPrime(int x){\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }\n \n static boolean isPrime(int x){\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }",
"catch(IOException e){\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n }",
"int loop = Integer.parseInt(br.readLine());",
"loop",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] nums = new int[loop];",
"nums",
"new int[loop]",
"loop",
"for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<loop",
"i",
"loop",
"i++",
"i++",
"i",
"{\n nums[i] = Integer.parseInt(br.readLine());\n }",
"{\n nums[i] = Integer.parseInt(br.readLine());\n }",
"nums[i] = Integer.parseInt(br.readLine())",
"nums[i]",
"nums",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int count = 0;",
"count",
"0",
"for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<loop",
"i",
"loop",
"i++",
"i++",
"i",
"{\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }",
"{\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }",
"if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }",
"isPrime(nums[i])",
"isPrime",
"nums[i]",
"nums",
"i",
"{\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }",
"count++",
"count",
"System.out.println(String.valueOf(count))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(count)",
"String.valueOf",
"String",
"count",
"String[] args",
"args",
"static boolean isPrime(int x){\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }",
"isPrime",
"{\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }",
"if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }",
"(x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)",
"(x%5==0&&x!=5)",
"(x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)",
"(x%2==0&&x!=2)",
"x%2==0",
"x%2",
"x",
"2",
"0",
"x!=2",
"x",
"2",
"(x%3==0&&x!=3)",
"x%3==0",
"x%3",
"x",
"3",
"0",
"x!=3",
"x",
"3",
"(x%5==0&&x!=5)",
"x%5==0",
"x%5",
"x",
"5",
"0",
"x!=5",
"x",
"5",
"(x%7==0&&x!=7)",
"x%7==0",
"x%7",
"x",
"7",
"0",
"x!=7",
"x",
"7",
"{\n return false;\n }",
"return false;",
"false",
"for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<(int)Math.sqrt(x)+1",
"i",
"(int)Math.sqrt(x)+1",
"(int)Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"1",
"i++",
"i++",
"i",
"{\n if(x%i==0){\n return false;\n }\n }",
"{\n if(x%i==0){\n return false;\n }\n }",
"if(x%i==0){\n return false;\n }",
"x%i==0",
"x%i",
"x",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public class Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }\n \n static boolean isPrime(int x){\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int loop = Integer.parseInt(br.readLine());\n\n int[] nums = new int[loop];\n for(int i=0; i<loop; i++){\n nums[i] = Integer.parseInt(br.readLine());\n }\n \n int count = 0;\n for(int i=0; i<loop; i++){\n if(isPrime(nums[i])){\n // System.out.println(String.valueOf(arr[i]));\n count++;\n }\n }\n System.out.println(String.valueOf(count));\n } catch(IOException e){\n e.printStackTrace();\n }\n }\n \n static boolean isPrime(int x){\n if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){\n return false;\n }\n for(int i=2; i<(int)Math.sqrt(x)+1; i++){\n if(x%i==0){\n return false;\n }\n }\n return true;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int loop = Integer.parseInt(br.readLine());
int[] nums = new int[loop];
for(int i=0; i<loop; i++){
nums[i] = Integer.parseInt(br.readLine());
}
int count = 0;
for(int i=0; i<loop; i++){
if(isPrime(nums[i])){
// System.out.println(String.valueOf(arr[i]));
count++;
}
}
System.out.println(String.valueOf(count));
} catch(IOException e){
e.printStackTrace();
}
}
static boolean isPrime(int x){
if((x%2==0&&x!=2) || (x%3==0&&x!=3) || (x%5==0&&x!=5) || (x%7==0&&x!=7)){
return false;
}
for(int i=2; i<(int)Math.sqrt(x)+1; i++){
if(x%i==0){
return false;
}
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
40,
2,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
4,
18,
13,
13,
13,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
108,
8
],
[
108,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
11,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
71,
76
],
[
68,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
68,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
86,
91
],
[
85,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
11,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
9,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"import java.io.IOException;\nimport java.util.*;\n\npublic class Main {\n\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int sizeOfList = sc.nextInt();",
"sizeOfList",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Long> values = new ArrayList<Long>();",
"values",
"new ArrayList<Long>()",
"long biggest = -(2000000000-1);",
"biggest",
"-(2000000000-1)",
"(2000000000-1)",
"2000000000",
"1",
"for (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sizeOfList",
"i",
"sizeOfList",
"i++",
"i++",
"i",
"{\n\t\t\tvalues.add(sc.nextLong());\n\t\t}",
"{\n\t\t\tvalues.add(sc.nextLong());\n\t\t}",
"values.add(sc.nextLong())",
"values.add",
"values",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long min = values.get(0);",
"min",
"values.get(0)",
"values.get",
"values",
"0",
"for (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < values.size()",
"i",
"values.size()",
"values.size",
"values",
"i++",
"i++",
"i",
"{\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}",
"{\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}",
"long diff = values.get(i) - min;",
"diff",
"values.get(i) - min",
"values.get(i)",
"values.get",
"values",
"i",
"min",
"if (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}",
"biggest < diff",
"biggest",
"diff",
"{\n\t\t\t\tbiggest = diff;\n\t\t\t}",
"biggest = diff",
"biggest",
"diff",
"if (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}",
"values.get(i) < min",
"values.get(i)",
"values.get",
"values",
"i",
"min",
"{\n\t\t\t\tmin = values.get(i);\n\t\t\t}",
"min = values.get(i)",
"min",
"values.get(i)",
"values.get",
"values",
"i",
"System.out.println(biggest)",
"System.out.println",
"System.out",
"System",
"System.out",
"biggest",
"String[] args",
"args",
"public class Main {\n\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}\n}",
"public class Main {\n\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sizeOfList = sc.nextInt();\n\t\tList<Long> values = new ArrayList<Long>();\n\n\t\tlong biggest = -(2000000000-1);\n\t\tfor (int i = 0; i < sizeOfList; i++) {\n\t\t\tvalues.add(sc.nextLong());\n\t\t}\n\t\tlong min = values.get(0);\n\t\tfor (int i = 1; i < values.size(); i++) {\n\t\t\tlong diff = values.get(i) - min;\n\t\t\tif (biggest < diff) {\n\t\t\t\tbiggest = diff;\n\t\t\t}\n\t\t\tif (values.get(i) < min) {\n\t\t\t\tmin = values.get(i);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(biggest);\n\t}\n}",
"Main"
] | import java.io.IOException;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int sizeOfList = sc.nextInt();
List<Long> values = new ArrayList<Long>();
long biggest = -(2000000000-1);
for (int i = 0; i < sizeOfList; i++) {
values.add(sc.nextLong());
}
long min = values.get(0);
for (int i = 1; i < values.size(); i++) {
long diff = values.get(i) - min;
if (biggest < diff) {
biggest = diff;
}
if (values.get(i) < min) {
min = values.get(i);
}
}
System.out.println(biggest);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
13,
2,
18,
13,
17,
18,
13,
17,
0,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
2,
18,
13,
13,
13,
30,
0,
13,
2,
18,
13,
13,
13,
14,
2,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
56,
58
],
[
11,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
11,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
76,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
11,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
9,
111
],
[
111,
112
]
] | [
"import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint max = 0;\n\t\tint min = 0;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}\n\t\tmax = num[1] - num[0];\n\t\tmin = num[0];\n\t\tfor(int i=1;i<times;i++){\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint max = 0;\n\t\tint min = 0;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}\n\t\tmax = num[1] - num[0];\n\t\tmin = num[0];\n\t\tfor(int i=1;i<times;i++){\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"Main",
"public static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint max = 0;\n\t\tint min = 0;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}\n\t\tmax = num[1] - num[0];\n\t\tmin = num[0];\n\t\tfor(int i=1;i<times;i++){\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"main",
"{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint times = scan.nextInt();\n\t\tint num[] =new int[times];\n\t\tint max = 0;\n\t\tint min = 0;\n\t\tfor(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}\n\t\tmax = num[1] - num[0];\n\t\tmin = num[0];\n\t\tfor(int i=1;i<times;i++){\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int times = scan.nextInt();",
"times",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int num[] =new int[times];",
"num",
"new int[times]",
"times",
"int max = 0;",
"max",
"0",
"int min = 0;",
"min",
"0",
"for(int i=0;i<times;i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}",
"{\n\t\t\tnum[i] = scan.nextInt();\n\t\t\t\n\t\t}",
"num[i] = scan.nextInt()",
"num[i]",
"num",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"max = num[1] - num[0]",
"max",
"num[1] - num[0]",
"num[1]",
"num",
"1",
"num[0]",
"num",
"0",
"min = num[0]",
"min",
"num[0]",
"num",
"0",
"for(int i=1;i<times;i++){\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}\n\t\t\tif(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}\n\t\t}",
"if(max < num[i]-min){\n\t\t\t\tmax = num[i]-min;\n\t\t\t}",
"max < num[i]-min",
"max",
"num[i]-min",
"num[i]",
"num",
"i",
"min",
"{\n\t\t\t\tmax = num[i]-min;\n\t\t\t}",
"max = num[i]-min",
"max",
"num[i]-min",
"num[i]",
"num",
"i",
"min",
"if(min > num[i]){\n\t\t\t\tmin = num[i];\n\t\t\t}",
"min > num[i]",
"min",
"num[i]",
"num",
"i",
"{\n\t\t\t\tmin = num[i];\n\t\t\t}",
"min = num[i]",
"min",
"num[i]",
"num",
"i",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args"
] | import java.io.IOException;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws NumberFormatException, IOException{
// System.out.println(" ");
Scanner scan = new Scanner(System.in);
int times = scan.nextInt();
int num[] =new int[times];
int max = 0;
int min = 0;
for(int i=0;i<times;i++){
num[i] = scan.nextInt();
}
max = num[1] - num[0];
min = num[0];
for(int i=1;i<times;i++){
if(max < num[i]-min){
max = num[i]-min;
}
if(min > num[i]){
min = num[i];
}
}
System.out.println(max);
}
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.