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,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
12,
13,
30,
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,
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,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
6,
8
],
[
149,
9
],
[
9,
10
],
[
149,
11
],
[
11,
12
],
[
11,
13
],
[
149,
14
],
[
14,
15
],
[
149,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
24,
26
],
[
18,
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
],
[
149,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
50,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
50,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
50,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
50,
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
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
50,
98
],
[
98,
99
],
[
48,
100
],
[
100,
101
],
[
149,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
119,
125
],
[
118,
126
],
[
126,
127
],
[
104,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
149,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
136,
143
],
[
143,
144
],
[
144,
145
],
[
134,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tint n;\n\tint count=0;\t//素数カウント変数\n\tint[] A;\n\t\n\tpublic void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}\n\t\n\t//0で素数を返す\n\tpublic int conpute(int number) {\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}\n\t\n\tpublic void output() {\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tint n;\n\tint count=0;\t//素数カウント変数\n\tint[] A;\n\t\n\tpublic void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}\n\t\n\t//0で素数を返す\n\tpublic int conpute(int number) {\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}\n\t\n\tpublic void output() {\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n;",
"n",
"int count=0;\t//素数カウント変数",
"count",
"0",
"int[] A;",
"A",
"public void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}",
"input",
"{\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"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",
"//0で素数を返す\n\tpublic int conpute(int number) {\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}",
"conpute",
"{\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}",
"if(number<2) return 0;",
"number<2",
"number",
"2",
"return 0;",
"0",
"if(number==2) return 0;",
"number==2",
"number",
"2",
"return 0;",
"0",
"if(number%2==0) return 1;",
"number%2==0",
"number%2",
"number",
"2",
"0",
"return 1;",
"1",
"double a = Math.sqrt(number);",
"a",
"Math.sqrt(number)",
"Math.sqrt",
"Math",
"number",
"for(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}",
"int i=3;",
"int i=3;",
"i",
"3",
"i<=a",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tif(number%i == 0) return 1;\n\t\t}",
"{\n\t\t\tif(number%i == 0) return 1;\n\t\t}",
"if(number%i == 0) return 1;",
"number%i == 0",
"number%i",
"number",
"i",
"0",
"return 1;",
"1",
"return 0;",
"0",
"int number",
"number",
"public void output() {\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"output",
"{\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"for(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}",
"{\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}",
"if( conpute(A[i]) == 0 ) count++;",
"conpute(A[i]) == 0",
"conpute(A[i])",
"conpute",
"A[i]",
"A",
"i",
"0",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}",
"main",
"{\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}",
"Main obj = new Main();",
"obj",
"new Main()",
"obj.input()",
"obj.input",
"obj",
"obj.output()",
"obj.output",
"obj",
"String[] args",
"args",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tint n;\n\tint count=0;\t//素数カウント変数\n\tint[] A;\n\t\n\tpublic void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}\n\t\n\t//0で素数を返す\n\tpublic int conpute(int number) {\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}\n\t\n\tpublic void output() {\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}\n}",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tint n;\n\tint count=0;\t//素数カウント変数\n\tint[] A;\n\t\n\tpublic void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}\n\t\n\t//0で素数を返す\n\tpublic int conpute(int number) {\n\t\tif(number<2) return 0;\n\t\tif(number==2) return 0;\n\t\tif(number%2==0) return 1;\n\t\tdouble a = Math.sqrt(number);\n\t\tfor(int i=3; i<=a; i++) {\n\t\t\tif(number%i == 0) return 1;\n\t\t}\n\t\treturn 0;\n\t}\n\t\n\tpublic void output() {\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif( conpute(A[i]) == 0 ) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.input();\n\t\tobj.output();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
int n;
int count=0; //素数カウント変数
int[] A;
public void input() {
n = sc.nextInt();
A = new int[n];
for(int i=0; i<n; i++) {
A[i] = sc.nextInt();
}
}
//0で素数を返す
public int conpute(int number) {
if(number<2) return 0;
if(number==2) return 0;
if(number%2==0) return 1;
double a = Math.sqrt(number);
for(int i=3; i<=a; i++) {
if(number%i == 0) return 1;
}
return 0;
}
public void output() {
for(int i=0; i<n; i++) {
if( conpute(A[i]) == 0 ) count++;
}
System.out.println(count);
}
public static void main(String[] args) {
Main obj = new Main();
obj.input();
obj.output();
}
}
|
[
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,
29,
17,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
99,
8
],
[
99,
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
],
[
99,
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
],
[
71,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
71,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
64,
94
],
[
94,
95
],
[
62,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n \n public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\n }\n static boolean isPrime(int n){\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }\n}\n",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n \n public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\n }\n static boolean isPrime(int n){\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\n }",
"main",
"{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\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 ans=0;",
"ans",
"0",
"for(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}",
"{\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}",
"int a=Integer.parseInt(br.readLine());",
"a",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(isPrime(a)){\n\t\tans++;\n\t }",
"isPrime(a)",
"isPrime",
"a",
"{\n\t\tans++;\n\t }",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String args[]",
"args",
"static boolean isPrime(int n){\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }",
"isPrime",
"{\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }",
"if(n==1)\n\t return true;",
"n==1",
"n",
"1",
"return true;",
"true",
"for (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t if(n % i == 0)\n\t\treturn false;\n\t}",
"{\n\t if(n % i == 0)\n\t\treturn false;\n\t}",
"if(n % i == 0)\n\t\treturn false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main{\n \n public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\n }\n static boolean isPrime(int n){\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }\n}",
"public class Main{\n \n public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer.parseInt(br.readLine());\n\t if(isPrime(a)){\n\t\tans++;\n\t }\n\t}\n\tSystem.out.println(ans);\n\n\t\n }\n static boolean isPrime(int n){\n\n\tif(n==1)\n\t return true;\n\t\n\t\n\tfor (int i = 2; i * i <= n; i++) {\n\t if(n % i == 0)\n\t\treturn false;\n\t}\n\treturn true;\n }\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 a=Integer.parseInt(br.readLine());
if(isPrime(a)){
ans++;
}
}
System.out.println(ans);
}
static boolean isPrime(int n){
if(n==1)
return true;
for (int i = 2; i * i <= n; i++) {
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,
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,
13,
4,
18,
18,
13,
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,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
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
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
6,
54
],
[
54,
55
],
[
92,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
58,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
58,
87
],
[
87,
88
],
[
56,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] | [
"import java.util.Scanner;\n\n/**\n * A3\n */\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }\n\n private static Boolean check(int n){\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }\n\n private static Boolean check(int n){\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%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 len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int len = Integer.parseInt(sc.nextLine());",
"len",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int result = 0;",
"result",
"0",
"for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<len",
"i",
"len",
"i++",
"i++",
"i",
"{\n if(check(sc.nextInt())){\n result++;\n }\n }",
"{\n if(check(sc.nextInt())){\n result++;\n }\n }",
"if(check(sc.nextInt())){\n result++;\n }",
"check(sc.nextInt())",
"check",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n result++;\n }",
"result++",
"result",
"sc.close()",
"sc.close",
"sc",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"private static Boolean check(int n){\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }\n return true;\n }",
"check",
"{\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }\n return true;\n }",
"int max = (int)Math.sqrt(n);",
"max",
"(int)Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=max",
"i",
"max",
"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 true;",
"true",
"int n",
"n",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }\n\n private static Boolean check(int n){\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n result++;\n }\n }\n sc.close();\n System.out.println(result);\n }\n\n private static Boolean check(int n){\n int max = (int)Math.sqrt(n);\n for(int i=2; i<=max; i++){\n if(n%i == 0){\n return false;\n }\n }\n return true;\n }\n}",
"Main"
] | import java.util.Scanner;
/**
* A3
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int len = Integer.parseInt(sc.nextLine());
int result = 0;
for(int i=0; i<len; i++){
if(check(sc.nextInt())){
result++;
}
}
sc.close();
System.out.println(result);
}
private static Boolean check(int n){
int max = (int)Math.sqrt(n);
for(int i=2; i<=max; i++){
if(n%i == 0){
return false;
}
}
return true;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
17,
11,
1,
41,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
20,
14,
4,
18,
13,
17,
40,
13,
4,
18,
18,
13,
13,
17,
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
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
19,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
48,
54
],
[
9,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
] | [
"import java.util.*;\nimport java.math.*;\npublic class Main{\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }",
"main",
"{\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"while(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}",
"int c = 0;",
"c",
"0",
"for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }",
"int i=s.nextInt();",
"int i=s.nextInt();",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"i>0",
"i",
"0",
"--i",
"--i",
"i",
"{\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }",
"{\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }",
"BigInteger b = new BigInteger(s.next());",
"b",
"new BigInteger(s.next())",
"if(b.isProbablePrime(5))++c;",
"b.isProbablePrime(5)",
"b.isProbablePrime",
"b",
"5",
"++c",
"c",
"System.out.printf(\"%d\\n\",c)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"c",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n\t System.out.printf(\"%d\\n\",c);\n\t}\n }\n}",
"Main"
] | import java.util.*;
import java.math.*;
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
while(s.hasNext()){
int c = 0;
for(int i=s.nextInt();i>0;--i){
BigInteger b = new BigInteger(s.next());
if(b.isProbablePrime(5))++c;
}
System.out.printf("%d\n",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,
41,
13,
4,
18,
13,
14,
4,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
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,
2,
13,
17,
29,
17,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
109,
5
],
[
109,
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
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
109,
51
],
[
51,
52
],
[
51,
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
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
60,
70
],
[
70,
71
],
[
53,
72
],
[
72,
73
],
[
72,
74
],
[
53,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
82,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
53,
96
],
[
96,
97
],
[
51,
98
],
[
98,
99
],
[
109,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
100,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] | [
"import java.util.Scanner;\n\n\npublic class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}\n\tboolean is_prime(int p) {\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}\n\tboolean is_prime(int p) {\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"Main",
"void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}",
"run",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int prime = 0;",
"prime",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}",
"{\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}",
"int p = scan.nextInt();",
"p",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(is_prime(p)) prime += 1;",
"is_prime(p)",
"is_prime",
"p",
"prime += 1",
"prime",
"1",
"System.out.println(prime)",
"System.out.println",
"System.out",
"System",
"System.out",
"prime",
"boolean is_prime(int p) {\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"is_prime",
"{\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"if (p == 2) return true;",
"p == 2",
"p",
"2",
"return true;",
"true",
"if (p < 2 || (p&1) == 0) return false;",
"p < 2 || (p&1) == 0",
"p < 2",
"p",
"2",
"(p&1) == 0",
"(p&1)",
"p",
"1",
"0",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}",
"i <= Math.sqrt(p)",
"i",
"Math.sqrt(p)",
"Math.sqrt",
"Math",
"p",
"{\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}",
"if (p % i == 0) return false;",
"p % i == 0",
"p % i",
"p",
"i",
"0",
"return false;",
"false",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int p",
"p",
"public static void main(String[] args) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}\n\tboolean is_prime(int p) {\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"public class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}\n\tboolean is_prime(int p) {\n\t\tif (p == 2) return true;\n\t\tif (p < 2 || (p&1) == 0) return false;\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(p)) {\n\t\t\tif (p % i == 0) return false;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
void run() {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int prime = 0;
for (int i = 0; i < n; i++) {
int p = scan.nextInt();
if(is_prime(p)) prime += 1;
}
System.out.println(prime);
}
boolean is_prime(int p) {
if (p == 2) return true;
if (p < 2 || (p&1) == 0) return false;
int i = 3;
while (i <= Math.sqrt(p)) {
if (p % i == 0) return false;
i = i + 2;
}
return true;
}
public static void main(String[] args) {
new Main().run();
}
} |
[
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,
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,
17,
42,
2,
2,
13,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
40,
13,
14,
2,
2,
13,
17,
17,
40,
13,
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
],
[
120,
11
],
[
120,
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
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
12,
63
],
[
63,
64
],
[
120,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
67,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
74,
84
],
[
84,
85
],
[
67,
86
],
[
86,
87
],
[
86,
88
],
[
67,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
95,
105
],
[
105,
106
],
[
95,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
67,
115
],
[
115,
116
],
[
65,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] | [
"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\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 cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n static boolean isPrime(int q){\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\n \n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"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 cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n static boolean isPrime(int q){\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\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 cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\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 cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }",
"{\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }",
"int m = Integer.parseInt(br.readLine());",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if (isPrime(m)){\n cnt++;\n }",
"isPrime(m)",
"isPrime",
"m",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static boolean isPrime(int q){\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\n \n }",
"isPrime",
"{\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\n \n }",
"if (q == 2) return true;",
"q == 2",
"q",
"2",
"return true;",
"true",
"if (q < 2 || ((q & 1) == 0)) return false;",
"q < 2 || ((q & 1) == 0)",
"q < 2",
"q",
"2",
"((q & 1) == 0)",
"(q & 1)",
"q",
"1",
"0",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }",
"i * i <= q",
"i * i",
"i",
"i",
"q",
"{\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }",
"if (q % i == 0){\n return false;\n }",
"q % i == 0",
"q % i",
"q",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"i++",
"i",
"if ((i & 1) == 0) i++;",
"(i & 1) == 0",
"(i & 1)",
"i",
"1",
"0",
"i++",
"i",
"return true;",
"true",
"int q",
"q",
"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 cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n static boolean isPrime(int q){\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\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 cnt = 0;\n for (int i = 0; i < n; i++){\n int m = Integer.parseInt(br.readLine());\n if (isPrime(m)){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n static boolean isPrime(int q){\n if (q == 2) return true;\n if (q < 2 || ((q & 1) == 0)) return false;\n \n int i = 3;\n while (i * i <= q){\n if (q % i == 0){\n return false;\n }\n i++;\n if ((i & 1) == 0) i++;\n }\n return true;\n \n }\n}",
"Main"
] | import java.io.IOException;
import java.io.BufferedReader;
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 cnt = 0;
for (int i = 0; i < n; i++){
int m = Integer.parseInt(br.readLine());
if (isPrime(m)){
cnt++;
}
}
System.out.println(cnt);
}
static boolean isPrime(int q){
if (q == 2) return true;
if (q < 2 || ((q & 1) == 0)) return false;
int i = 3;
while (i * i <= q){
if (q % i == 0){
return false;
}
i++;
if ((i & 1) == 0) i++;
}
return true;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
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,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
99,
11
],
[
99,
12
],
[
12,
13
],
[
12,
14
],
[
99,
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
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
17,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
15,
59
],
[
59,
60
],
[
99,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
63,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
70,
81
],
[
81,
82
],
[
82,
83
],
[
70,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
63,
94
],
[
94,
95
],
[
61,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] | [
"import java.util.*;\nimport java.io.*;\nimport java.lang.*;\n\npublic class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n } \n \n static boolean isPrime(int x) {\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n } \n \n static boolean isPrime(int x) {\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }\n}",
"Main",
"static final int INF = 1000000000;",
"INF",
"1000000000",
"public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n }",
"main",
"{ \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int n = input.nextInt();",
"n",
"input.nextInt()",
"input.nextInt",
"input",
"int res = 0;",
"res",
"0",
"for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }",
"{\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }",
"int x = input.nextInt();",
"x",
"input.nextInt()",
"input.nextInt",
"input",
"if (isPrime(x)) ++res;",
"isPrime(x)",
"isPrime",
"x",
"++res",
"res",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"static boolean isPrime(int x) {\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }",
"if (x < 2) return false;",
"x < 2",
"x",
"2",
"return false;",
"false",
"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 class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n } \n \n static boolean isPrime(int x) {\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }\n}",
"public class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = 0;\n for (int i = 0; i < n; ++i) {\n int x = input.nextInt();\n if (isPrime(x)) ++res;\n }\n System.out.println(res);\n } \n \n static boolean isPrime(int x) {\n if (x < 2) return false;\n for (int i = 2; i <= Math.sqrt(x); ++i) {\n if (x % i == 0) return false;\n }\n return true;\n }\n}",
"Main"
] | import java.util.*;
import java.io.*;
import java.lang.*;
public class Main {
static final int INF = 1000000000;
public static void main(String[] args) throws Exception {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int res = 0;
for (int i = 0; i < n; ++i) {
int x = input.nextInt();
if (isPrime(x)) ++res;
}
System.out.println(res);
}
static boolean isPrime(int x) {
if (x < 2) return false;
for (int i = 2; i <= Math.sqrt(x); ++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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
40,
13,
9,
14,
2,
2,
13,
17,
17,
30,
9,
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,
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
],
[
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
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
32,
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
],
[
80,
82
],
[
79,
83
],
[
32,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\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 scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\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 v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int v = scn.nextInt();",
"v",
"scn.nextInt()",
"scn.nextInt",
"scn",
"boolean bol = true;",
"bol",
"true",
"if (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}",
"v == 2",
"v",
"2",
"{\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t}",
"count++",
"count",
"continue;",
"if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}",
"v % 2 == 0",
"v % 2",
"v",
"2",
"0",
"{\n\t\t\t\tcontinue;\n\t\t\t}",
"continue;",
"for (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\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((double)v)",
"j",
"Math.sqrt((double)v)",
"Math.sqrt",
"Math",
"(double)v",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"v % j == 0",
"v % j",
"v",
"j",
"0",
"{\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"bol = false",
"bol",
"false",
"break;",
"if (bol) {\n\t\t\t\tcount++;\n\t\t\t}",
"bol",
"{\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 scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\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 scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++;\n\t\t\t\tcontinue;\n\t\t\t} else if (v % 2 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (int j = 3; j <= Math.sqrt((double)v); j++) {\n\t\t\t\tif (v % j == 0) {\n\t\t\t\t\tbol = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bol) {\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.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
int v = scn.nextInt();
boolean bol = true;
if (v == 2) {
count++;
continue;
} else if (v % 2 == 0) {
continue;
}
for (int j = 3; j <= Math.sqrt((double)v); j++) {
if (v % j == 0) {
bol = false;
break;
}
}
if (bol) {
count++;
}
}
System.out.println(count);
}
}
|
[
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,
0,
13,
8,
4,
13,
4,
18,
13,
2,
13,
17,
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,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
2,
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
],
[
109,
5
],
[
109,
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
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
35,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
6,
51
],
[
51,
52
],
[
109,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
55,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
62,
72
],
[
72,
73
],
[
55,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
55,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
80,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
55,
104
],
[
104,
105
],
[
53,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }\n\n static boolean isPrime(int x) {\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }\n\n static boolean isPrime(int x) {\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }",
"main",
"{\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }",
"@SuppressWarnings(\"resource\")\n 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 cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }",
"{\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }",
"cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt",
"cnt",
"isPrime(sc.nextInt()) ? cnt + 1 : cnt",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"cnt + 1",
"cnt",
"1",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static boolean isPrime(int x) {\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }",
"isPrime",
"{\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }",
"if (x == 2)\n return true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if (x < 2 || x % 2 == 0)\n return false;",
"x < 2 || x % 2 == 0",
"x < 2",
"x",
"2",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"int sqrt = (int) Math.sqrt((double) x);",
"sqrt",
"(int) Math.sqrt((double) x)",
"Math.sqrt",
"Math",
"(double) x",
"for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrt",
"i",
"sqrt",
"i = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n if (x % i == 0)\n return false;\n }",
"{\n if (x % i == 0)\n return false;\n }",
"if (x % i == 0)\n return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int x",
"x",
"public class Main {\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }\n\n static boolean isPrime(int x) {\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n System.out.println(cnt);\n }\n\n static boolean isPrime(int x) {\n if (x == 2)\n return true;\n if (x < 2 || x % 2 == 0)\n return false;\n\n // 合成数xはp<=sqrt x を満たす素因子pを持つ\n int sqrt = (int) Math.sqrt((double) x);\n for (int i = 3; i <= sqrt; i = i + 2) {\n if (x % i == 0)\n return false;\n }\n return true;\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for (int i = 0; i < n; i++) {
cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;
}
System.out.println(cnt);
}
static boolean isPrime(int x) {
if (x == 2)
return true;
if (x < 2 || x % 2 == 0)
return false;
// 合成数xはp<=sqrt x を満たす素因子pを持つ
int sqrt = (int) Math.sqrt((double) x);
for (int i = 3; i <= sqrt; i = i + 2) {
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,
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,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
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,
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
],
[
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
],
[
107,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
55,
54
],
[
62,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
62,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
65,
67
],
[
52,
68
],
[
68,
69
],
[
51,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
51,
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
],
[
78,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
51,
102
],
[
102,
103
],
[
49,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] | [
"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 = sc.nextInt();\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean judge(int tmp){\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}\n\t\treturn true;\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 = sc.nextInt();\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean judge(int tmp){\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\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(judge(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(judge(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(judge(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(judge(sc.nextInt())) cnt++;\n\t\t}",
"{\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}",
"if(judge(sc.nextInt())) cnt++;",
"judge(sc.nextInt())",
"judge",
"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 judge(int tmp){\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"judge",
"{\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"if(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;",
"tmp==2 || tmp==3 || tmp==5 || tmp==7",
"tmp==5",
"tmp==2 || tmp==3 || tmp==5 || tmp==7",
"tmp==2",
"tmp",
"2",
"tmp==3",
"tmp",
"3",
"tmp==5",
"tmp",
"5",
"tmp==7",
"tmp",
"7",
"return true;",
"true",
"if(tmp % 2 == 0) return false;",
"tmp % 2 == 0",
"tmp % 2",
"tmp",
"2",
"0",
"return false;",
"false",
"for(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(tmp)",
"i",
"Math.sqrt(tmp)",
"Math.sqrt",
"Math",
"tmp",
"i++",
"i++",
"i",
"{\n\t\t\tif(tmp % i == 0) return false;\n\t\t}",
"{\n\t\t\tif(tmp % i == 0) return false;\n\t\t}",
"if(tmp % i == 0) return false;",
"tmp % i == 0",
"tmp % i",
"tmp",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int tmp",
"tmp",
"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 cnt = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean judge(int tmp){\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}\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\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean judge(int tmp){\n\t\tif(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;\n\t\tif(tmp % 2 == 0) return false;\n\t\tfor(int i = 3; i <= Math.sqrt(tmp); i++){\n\t\t\tif(tmp % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\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 cnt = 0;
for(int i = 0; i < n; i++){
if(judge(sc.nextInt())) cnt++;
}
System.out.println(cnt);
}
static boolean judge(int tmp){
if(tmp==2 || tmp==3 || tmp==5 || tmp==7) return true;
if(tmp % 2 == 0) return false;
for(int i = 3; i <= Math.sqrt(tmp); i++){
if(tmp % 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,
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,
41,
13,
4,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
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
] | [
[
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
],
[
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
],
[
59,
62
],
[
62,
63
],
[
62,
64
],
[
56,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
6,
98
],
[
98,
99
]
] | [
"import java.util.Scanner;\nclass Main{\n static public void main(String[] av){\n\n Scanner sc =new Scanner(System.in);\n int n =sc.nextInt();\n int a[]= new int[n];\n for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }\nint sum=0;\n for (int j=0;j<n;j++){\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}\n\n\n\nSystem.out.println(n-sum); \n }\n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n static public void main(String[] av){\n\n Scanner sc =new Scanner(System.in);\n int n =sc.nextInt();\n int a[]= new int[n];\n for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }\nint sum=0;\n for (int j=0;j<n;j++){\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}\n\n\n\nSystem.out.println(n-sum); \n }\n \n}",
"Main",
"static public void main(String[] av){\n\n Scanner sc =new Scanner(System.in);\n int n =sc.nextInt();\n int a[]= new int[n];\n for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }\nint sum=0;\n for (int j=0;j<n;j++){\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}\n\n\n\nSystem.out.println(n-sum); \n }",
"main",
"{\n\n Scanner sc =new Scanner(System.in);\n int n =sc.nextInt();\n int a[]= new int[n];\n for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }\nint sum=0;\n for (int j=0;j<n;j++){\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}\n\n\n\nSystem.out.println(n-sum); \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",
"for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] =sc.nextInt();\n }",
"{\n a[i] =sc.nextInt();\n }",
"a[i] =sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum=0;",
"sum",
"0",
"for (int j=0;j<n;j++){\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}",
"{\n double len = Math.sqrt(a[j]);\nfor ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }\n}",
"double len = Math.sqrt(a[j]);",
"len",
"Math.sqrt(a[j])",
"Math.sqrt",
"Math",
"a[j]",
"a",
"j",
"for ( int i=2 ; i<=len;i++){\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }",
"int i=2 ;",
"int i=2 ;",
"i",
"2",
"i<=len",
"i",
"len",
"i++",
"i++",
"i",
"{\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }",
"{\n if(a[j]%i==0){\n sum++;\n break;\n }\n\n }",
"if(a[j]%i==0){\n sum++;\n break;\n }",
"a[j]%i==0",
"a[j]%i",
"a[j]",
"a",
"j",
"i",
"0",
"{\n sum++;\n break;\n }",
"sum++",
"sum",
"break;",
"System.out.println(n-sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"n-sum",
"n",
"sum",
"String[] av",
"av"
] | import java.util.Scanner;
class Main{
static public void main(String[] av){
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();
}
int sum=0;
for (int j=0;j<n;j++){
double len = Math.sqrt(a[j]);
for ( int i=2 ; i<=len;i++){
if(a[j]%i==0){
sum++;
break;
}
}
}
System.out.println(n-sum);
}
}
|
[
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,
2,
13,
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,
11,
1,
2,
13,
17,
1,
40,
13,
30,
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
],
[
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
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
6,
51
],
[
51,
52
],
[
4,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
55,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
55,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
53,
90
],
[
90,
91
]
] | [
"import java.util.Scanner;\nclass Main\n{\n\tstatic boolean isPrime( int x )\n\t{\n\t\tif( x == 2 )return true;\n\t\tif( x<2 || x%2==0 )return false;\n\t\tfor( int i = 3 ; i*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;\n\t\treturn true;\n\t}\n\tpublic static void main( String[] args )\n\t{\n\t\tScanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint n = sc.nextInt(), counter=0;\n\t\tfor( ; n != 0 ; n-- )\n\t\t\tif( isPrime(sc.nextInt()) )counter++;\n\t\t\n\t\tSystem.out.println( counter );\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main\n{\n\tstatic boolean isPrime( int x )\n\t{\n\t\tif( x == 2 )return true;\n\t\tif( x<2 || x%2==0 )return false;\n\t\tfor( int i = 3 ; i*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;\n\t\treturn true;\n\t}\n\tpublic static void main( String[] args )\n\t{\n\t\tScanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint n = sc.nextInt(), counter=0;\n\t\tfor( ; n != 0 ; n-- )\n\t\t\tif( isPrime(sc.nextInt()) )counter++;\n\t\t\n\t\tSystem.out.println( counter );\n\t}\n}",
"Main",
"static boolean isPrime( int x )\n\t{\n\t\tif( x == 2 )return true;\n\t\tif( x<2 || x%2==0 )return false;\n\t\tfor( int i = 3 ; i*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;\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*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;\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*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;",
"int i = 3 ;",
"int i = 3 ;",
"i",
"3",
"i*i <= x",
"i*i",
"i",
"i",
"x",
"i++",
"i++",
"i",
"if( x%i==0 )return false;",
"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\t{\n\t\tScanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint n = sc.nextInt(), counter=0;\n\t\tfor( ; n != 0 ; n-- )\n\t\t\tif( isPrime(sc.nextInt()) )counter++;\n\t\t\n\t\tSystem.out.println( counter );\n\t}",
"main",
"{\n\t\tScanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint n = sc.nextInt(), counter=0;\n\t\tfor( ; n != 0 ; n-- )\n\t\t\tif( isPrime(sc.nextInt()) )counter++;\n\t\t\n\t\tSystem.out.println( counter );\n\t}",
"Scanner sc = new java.util.Scanner( System.in );",
"sc",
"new java.util.Scanner( System.in )",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"counter=0;",
"counter",
"0",
"for( ; n != 0 ; n-- )\n\t\t\tif( isPrime(sc.nextInt()) )counter++;",
";",
"n != 0",
"n",
"0",
"n--",
"n--",
"n",
"if( isPrime(sc.nextInt()) )counter++;",
"if( isPrime(sc.nextInt()) )counter++;",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"counter++",
"counter",
"System.out.println( counter )",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"String[] args",
"args"
] | import java.util.Scanner;
class Main
{
static boolean isPrime( int x )
{
if( x == 2 )return true;
if( x<2 || x%2==0 )return false;
for( int i = 3 ; i*i <= x ; i++ )
if( x%i==0 )return false;
return true;
}
public static void main( String[] args )
{
Scanner sc = new java.util.Scanner( System.in );
int n = sc.nextInt(), counter=0;
for( ; n != 0 ; n-- )
if( isPrime(sc.nextInt()) )counter++;
System.out.println( counter );
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
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,
14,
2,
13,
17,
30,
40,
13,
9,
14,
2,
2,
13,
17,
17,
9,
41,
13,
4,
18,
13,
13,
41,
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,
14,
40,
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
],
[
105,
5
],
[
105,
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
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
32,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
32,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
32,
59
],
[
59,
60
],
[
59,
61
],
[
32,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
62,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
32,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
6,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }",
"main",
"{\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }",
"int count = 0;",
"count",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < n",
"k",
"n",
"k++",
"k++",
"k",
"{\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }",
"{\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a == 2) {\n count++;\n continue;\n }",
"a == 2",
"a",
"2",
"{\n count++;\n continue;\n }",
"count++",
"count",
"continue;",
"if ((a % 2) == 0) continue;",
"(a % 2) == 0",
"(a % 2)",
"a",
"2",
"0",
"continue;",
"int sqrt = (int) Math.sqrt(a);",
"sqrt",
"(int) Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"boolean isBreak = false;",
"isBreak",
"false",
"for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrt",
"i",
"sqrt",
"i += 2",
"i += 2",
"i",
"2",
"{\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }",
"{\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }",
"if ((a % i) == 0) {\n isBreak = true;\n break;\n }",
"(a % i) == 0",
"(a % i)",
"a",
"i",
"0",
"{\n isBreak = true;\n break;\n }",
"isBreak = true",
"isBreak",
"true",
"break;",
"if (!isBreak) {\n count++;\n }",
"!isBreak",
"isBreak",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\n if (a == 2) {\n count++;\n continue;\n }\n\n // 2以外の偶数は素数ではないので飛ばす\n if ((a % 2) == 0) continue;\n\n // 奇数だけ判定する\n // エラトステネスの篩を利用\n int sqrt = (int) Math.sqrt(a);\n boolean isBreak = false;\n for (int i = 3; i <= sqrt; i += 2) {\n if ((a % i) == 0) {\n isBreak = true;\n break;\n }\n }\n if (!isBreak) {\n count++;\n }\n }\n System.out.println(count);\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int count = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int k = 0; k < n; k++) {
int a = sc.nextInt();
// 2は素数。後続処理を簡素化するために個別に処理をする
if (a == 2) {
count++;
continue;
}
// 2以外の偶数は素数ではないので飛ばす
if ((a % 2) == 0) continue;
// 奇数だけ判定する
// エラトステネスの篩を利用
int sqrt = (int) Math.sqrt(a);
boolean isBreak = false;
for (int i = 3; i <= sqrt; i += 2) {
if ((a % i) == 0) {
isBreak = true;
break;
}
}
if (!isBreak) {
count++;
}
}
System.out.println(count);
sc.close();
}
}
|
[
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,
41,
13,
20,
28,
13,
13,
30,
30,
14,
4,
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
],
[
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
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
47,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
52,
57
],
[
57,
58
],
[
58,
59
],
[
8,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
6,
66
],
[
66,
67
]
] | [
"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();\n int a[] = new int[n];\n int num = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }\n class Inner{\n boolean inner(int x){\n if(x == 2){\n return true;\n }else if(x < 2 || x%2 == 0){\n return false;\n }else{\n \tint i = 3;\n \twhile(i <= Math.sqrt(x)){\n \t\tif(x%i == 0){\n \t\treturn false;\n \t\t}\n \t\ti = i + 2;\n \t}\n \treturn true;\n }\n }\n }\n Inner in = new Inner();\n for(int aa : a){\n if(in.inner(aa)){\n num++;\n }\n }\n System.out.println(num);\n }\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();\n int a[] = new int[n];\n int num = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }\n class Inner{\n boolean inner(int x){\n if(x == 2){\n return true;\n }else if(x < 2 || x%2 == 0){\n return false;\n }else{\n \tint i = 3;\n \twhile(i <= Math.sqrt(x)){\n \t\tif(x%i == 0){\n \t\treturn false;\n \t\t}\n \t\ti = i + 2;\n \t}\n \treturn true;\n }\n }\n }\n Inner in = new Inner();\n for(int aa : a){\n if(in.inner(aa)){\n num++;\n }\n }\n System.out.println(num);\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n int num = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }\n class Inner{\n boolean inner(int x){\n if(x == 2){\n return true;\n }else if(x < 2 || x%2 == 0){\n return false;\n }else{\n \tint i = 3;\n \twhile(i <= Math.sqrt(x)){\n \t\tif(x%i == 0){\n \t\treturn false;\n \t\t}\n \t\ti = i + 2;\n \t}\n \treturn true;\n }\n }\n }\n Inner in = new Inner();\n for(int aa : a){\n if(in.inner(aa)){\n num++;\n }\n }\n System.out.println(num);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n int num = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }\n class Inner{\n boolean inner(int x){\n if(x == 2){\n return true;\n }else if(x < 2 || x%2 == 0){\n return false;\n }else{\n \tint i = 3;\n \twhile(i <= Math.sqrt(x)){\n \t\tif(x%i == 0){\n \t\treturn false;\n \t\t}\n \t\ti = i + 2;\n \t}\n \treturn true;\n }\n }\n }\n Inner in = new Inner();\n for(int aa : a){\n if(in.inner(aa)){\n num++;\n }\n }\n System.out.println(num);\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 num = 0;",
"num",
"0",
"for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Inner in = new Inner();",
"in",
"new Inner()",
"for(int aa : a){\n if(in.inner(aa)){\n num++;\n }\n }",
"int aa",
"a",
"{\n if(in.inner(aa)){\n num++;\n }\n }",
"{\n if(in.inner(aa)){\n num++;\n }\n }",
"if(in.inner(aa)){\n num++;\n }",
"in.inner(aa)",
"in.inner",
"in",
"aa",
"{\n num++;\n }",
"num++",
"num",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"String args[]",
"args"
] | import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a[] = new int[n];
int num = 0;
for(int i = 0; i < n; i++){
a[i] = sc.nextInt();
}
class Inner{
boolean inner(int x){
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;
}
}
}
Inner in = new Inner();
for(int aa : a){
if(in.inner(aa)){
num++;
}
}
System.out.println(num);
}
}
|
[
7,
15,
13,
17,
6,
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,
41,
13,
18,
13,
13,
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
],
[
136,
5
],
[
136,
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,
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
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
6,
77
],
[
77,
78
],
[
136,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
81,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
81,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
108,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
122,
128
],
[
128,
129
],
[
129,
130
],
[
81,
131
],
[
131,
132
],
[
79,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"\n\nimport java.util.*;\n \npublic class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }\n\n\n public static boolean isPrime(int num) {\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 return true; \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }\n\n\n public static boolean isPrime(int num) {\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 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 x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int x = 0;",
"x",
"0",
"int a[] = new int[N];",
"a",
"new int[N]",
"N",
"for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }",
"int w = 0;",
"int w = 0;",
"w",
"0",
"w < N",
"w",
"N",
"w++",
"w++",
"w",
"{\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }",
"{\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }",
"int num = a[w];",
"num",
"a[w]",
"a",
"w",
"if(isPrime(num) == true){\n x++;\n }",
"isPrime(num) == true",
"isPrime(num)",
"isPrime",
"num",
"true",
"{\n x++;\n }",
"x++",
"x",
"System.out.println(x)",
"System.out.println",
"System.out",
"System",
"System.out",
"x",
"String[] args",
"args",
"public static boolean isPrime(int num) {\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 return true; \n }",
"isPrime",
"{\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 return true; \n }",
"if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) return false;",
"num < 2",
"num",
"2",
"return false;",
"false",
"if (num == 2) return true;\n else if (num % 2 == 0) return false;",
"num == 2",
"num",
"2",
"return true;",
"true",
"if (num % 2 == 0) 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\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }\n\n\n public static boolean isPrime(int num) {\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 return true; \n }\n}",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n }\n for(int w = 0; w < N; w++){\n int num = a[w];\n \n if(isPrime(num) == true){\n x++;\n }\n }\n System.out.println(x);\n }\n\n\n public static boolean isPrime(int num) {\n \n if (num < 2) return false;\n else if (num == 2) return true;\n else if (num % 2 == 0) 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 return true; \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 x = 0;
int a[] = new int[N];
for(int i = 0; i < N; i++){
a[i] = sc.nextInt();
}
for(int w = 0; w < N; w++){
int num = a[w];
if(isPrime(num) == true){
x++;
}
}
System.out.println(x);
}
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,
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,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
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
],
[
86,
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
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
51,
81
],
[
81,
82
],
[
49,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
] | [
"import java.util.Scanner;\n\n\npublic final class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int n) {\n\t\tif (n<2) return false;\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}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public final class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int n) {\n\t\tif (n<2) return false;\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}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\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\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\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 count=0;",
"count",
"0",
"for (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}",
"{\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}",
"if (isPrime(scan.nextInt()))count++;",
"isPrime(scan.nextInt())",
"isPrime",
"scan.nextInt()",
"scan.nextInt",
"scan",
"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\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\tif (n<2) return false;\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}",
"if (n<2) return false;",
"n<2",
"n",
"2",
"return false;",
"false",
"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 final class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int n) {\n\t\tif (n<2) return false;\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}",
"public final class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int n) {\n\t\tif (n<2) return false;\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}",
"Main"
] | import java.util.Scanner;
public final class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n= scan.nextInt();
int count=0;
for (int i=0;i<n;i++) {
if (isPrime(scan.nextInt()))count++;
}
System.out.println(count);
}
static boolean isPrime(int n) {
if (n<2) return false;
for (int i=2;i*i<=n;i++) {
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,
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,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
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
],
[
100,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
55,
72
],
[
72,
73
],
[
72,
74
],
[
55,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
82,
92
],
[
92,
93
],
[
92,
94
],
[
55,
95
],
[
95,
96
],
[
53,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}\n\n\tstatic boolean isPrime(int num) {\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\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) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}\n\n\tstatic boolean isPrime(int num) {\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int primeNum = 0;",
"primeNum",
"0",
"for(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}",
"{\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}",
"isPrime(num)",
"isPrime",
"num",
"{\n\t\t\t\tprimeNum++;\n\t\t\t}",
"primeNum++",
"primeNum",
"System.out.println(primeNum)",
"System.out.println",
"System.out",
"System",
"System.out",
"primeNum",
"String[] args",
"args",
"static boolean isPrime(int num) {\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\n\t\treturn true;\n\t}",
"isPrime",
"{\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\n\t\treturn true;\n\t}",
"if(num == 2) {\n\t\t\treturn true;\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",
"int i = 3;",
"i",
"3",
"while(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}",
"i <= Math.sqrt(num)",
"i",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"{\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\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",
"i += 2",
"i",
"2",
"return true;",
"true",
"int num",
"num",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}\n\n\tstatic boolean isPrime(int num) {\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tprimeNum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(primeNum);\n\t}\n\n\tstatic boolean isPrime(int num) {\n\n\t\tif(num == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(num)) {\n\n\t\t\tif(num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int primeNum = 0;
for(int i = 0; i < n; i++) {
int num = sc.nextInt();
if(isPrime(num)) {
primeNum++;
}
}
System.out.println(primeNum);
}
static boolean isPrime(int num) {
if(num == 2) {
return true;
}
if(num % 2 == 0) {
return false;
}
int i = 3;
while(i <= Math.sqrt(num)) {
if(num % i == 0) {
return false;
}
i += 2;
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
12,
13,
30,
0,
13,
20,
2,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
40,
18,
13,
13,
9,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
0,
13,
13,
30,
0,
18,
13,
13,
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,
0,
13,
8,
18,
13,
13,
17,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
147,
5
],
[
147,
6
],
[
6,
7
],
[
6,
8
],
[
147,
9
],
[
9,
10
],
[
147,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
17,
18
],
[
17,
19
],
[
13,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
13,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
25,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
13,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
43,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
43,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
59,
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
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
147,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
88,
97
],
[
97,
98
],
[
97,
99
],
[
88,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
100,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
112,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
120,
125
],
[
88,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
147,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
134,
141
],
[
141,
142
],
[
142,
143
],
[
132,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tfinal int MAX_N = 100000000;\n\tboolean[] primes;\n\tvoid eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tfinal int MAX_N = 100000000;\n\tboolean[] primes;\n\tvoid eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}\n}",
"Main",
"final int MAX_N = 100000000;",
"MAX_N",
"100000000",
"boolean[] primes;",
"primes",
"void eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}",
"eratosthenes",
"{\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}",
"primes = new boolean[MAX_N + 1]",
"primes",
"new boolean[MAX_N + 1]",
"MAX_N + 1",
"MAX_N",
"1",
"primes[2] = true",
"primes[2]",
"primes",
"2",
"true",
"for (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= MAX_N",
"i",
"MAX_N",
"i += 2",
"i += 2",
"i",
"2",
"primes[i] = true;",
"primes[i] = true",
"primes[i]",
"primes",
"i",
"true",
"for (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(MAX_N)",
"i",
"Math.sqrt(MAX_N)",
"Math.sqrt",
"Math",
"MAX_N",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}",
"{\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}",
"if (!primes[i]) continue;",
"!primes[i]",
"primes[i]",
"primes",
"i",
"continue;",
"for (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;",
"int j = i * 2;",
"int j = i * 2;",
"j",
"i * 2",
"i",
"2",
"j <= MAX_N",
"j",
"MAX_N",
"j += i",
"j += i",
"j",
"i",
"primes[j] = false;",
"primes[j] = false",
"primes[j]",
"primes",
"j",
"false",
"void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"run",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}",
"{\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}",
"int v = scan.nextInt();",
"v",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ans += primes[v] ? 1 : 0",
"ans",
"primes[v] ? 1 : 0",
"primes[v]",
"primes",
"v",
"1",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}",
"main",
"{\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}",
"Main main = new Main();",
"main",
"new Main()",
"main.eratosthenes()",
"main.eratosthenes",
"main",
"main.run()",
"main.run",
"main",
"String[] args",
"args",
"public class Main {\n\tfinal int MAX_N = 100000000;\n\tboolean[] primes;\n\tvoid eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}\n}",
"public class Main {\n\tfinal int MAX_N = 100000000;\n\tboolean[] primes;\n\tvoid eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t\t\tif (!primes[i]) continue;\n\t\t\tfor (int j = i * 2; j <= MAX_N; j += i)\n\t\t\t\tprimes[j] = false;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scan.nextInt();\n\t\t\tans += primes[v] ? 1 : 0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.eratosthenes();\n\t\tmain.run();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
final int MAX_N = 100000000;
boolean[] primes;
void eratosthenes() {
primes = new boolean[MAX_N + 1];
primes[2] = true;
for (int i = 3; i <= MAX_N; i += 2)
primes[i] = true;
for (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {
if (!primes[i]) continue;
for (int j = i * 2; j <= MAX_N; j += i)
primes[j] = false;
}
}
void run() {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int ans = 0;
for (int i = 0; i < n; i++) {
int v = scan.nextInt();
ans += primes[v] ? 1 : 0;
}
System.out.println(ans);
}
public static void main(String[] args) {
Main main = new Main();
main.eratosthenes();
main.run();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
20,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
18,
13,
13,
9,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
40,
18,
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
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
103,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
10,
18
],
[
18,
19
],
[
18,
20
],
[
10,
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
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
39,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
39,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
10,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
10,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
89,
90
],
[
10,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
10,
97
],
[
97,
98
],
[
98,
99
],
[
8,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}\n\n}",
"Main",
"static boolean[] prime;",
"prime",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"prime = new boolean[100000001]",
"prime",
"new boolean[100000001]",
"100000001",
"int count = 0;",
"count",
"0",
"for (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=10000",
"i",
"10000",
"i++",
"i++",
"i",
"{\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}",
"if (prime[i]) continue;",
"prime[i]",
"prime",
"i",
"continue;",
"for (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}",
"int j=i*2;",
"int j=i*2;",
"j",
"i*2",
"i",
"2",
"j<=100000000",
"j",
"100000000",
"j+=i",
"j+=i",
"j",
"i",
"{\n\t\t\t\tprime[j] = true;\n\t\t\t}",
"{\n\t\t\t\tprime[j] = true;\n\t\t\t}",
"prime[j] = true",
"prime[j]",
"prime",
"j",
"true",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[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 = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}",
"!prime[num]",
"prime[num]",
"prime",
"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",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2; j<=100000000; j+=i) {\n\t\t\t\tprime[j] = true;\n\t\t\t}\n\t\t}\n\n\t\tint n = sc.nextInt();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (!prime[num]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t\tsc.close();\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static boolean[] prime;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
prime = new boolean[100000001];
int count = 0;
for (int i=2; i<=10000; i++) {
if (prime[i]) continue;
for (int j=i*2; j<=100000000; j+=i) {
prime[j] = true;
}
}
int n = sc.nextInt();
for (int i=0; i<n; i++) {
int num = sc.nextInt();
if (!prime[num]) {
count++;
}
}
System.out.println(count);
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
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,
40,
13,
4,
18,
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,
2,
13,
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
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
118,
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
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
14,
56
],
[
56,
57
],
[
57,
58
],
[
14,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
12,
65
],
[
65,
66
],
[
118,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
69,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
69,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
82,
88
],
[
88,
89
],
[
69,
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
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
105,
111
],
[
111,
112
],
[
69,
113
],
[
113,
114
],
[
67,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] | [
"import java.util.*;\n\npublic class Main{\n\tfinal int MOD = 1000000007;\n\tfinal int INF = 1000000000;\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\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int x){\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}\n\t\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tfinal int MOD = 1000000007;\n\tfinal int INF = 1000000000;\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\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int x){\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}\n\t\n}",
"Main",
"final int MOD = 1000000007;",
"MOD",
"1000000007",
"final int INF = 1000000000;",
"INF",
"1000000000",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\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 cnt = 0;",
"cnt",
"0",
"for(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}",
"{\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}",
"int a = Integer.parseInt(sc.next());",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"if(isPrime(a)) ++cnt;",
"isPrime(a)",
"isPrime",
"a",
"++cnt",
"cnt",
"sc.close()",
"sc.close",
"sc",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public static boolean isPrime(int x){\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}",
"isPrime",
"{\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}",
"if(x < 2) return false;",
"x < 2",
"x",
"2",
"return false;",
"false",
"if(x == 2) return true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if(x % 2 == 0) return false;",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i * i <= x",
"i * i",
"i",
"i",
"x",
"i += 2",
"i += 2",
"i",
"2",
"if(x % i == 0) return false;",
"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\tfinal int MOD = 1000000007;\n\tfinal int INF = 1000000000;\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\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int x){\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}\n\t\n}",
"public class Main{\n\tfinal int MOD = 1000000007;\n\tfinal int INF = 1000000000;\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\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(sc.next());\n\t\t\tif(isPrime(a)) ++cnt;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int x){\n\t\tif(x < 2) return false;\n\t if(x == 2) return true;\n\t if(x % 2 == 0) return false;\n\t for(int i = 3; i * i <= x; i += 2)\n\t if(x % i == 0) return false;\n\t return true;\n\t}\n\t\n}",
"Main"
] | import java.util.*;
public class Main{
final int MOD = 1000000007;
final int INF = 1000000000;
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
int cnt = 0;
for(int i = 0; i < n; ++i){
int a = Integer.parseInt(sc.next());
if(isPrime(a)) ++cnt;
}
sc.close();
System.out.println(cnt);
}
public static boolean isPrime(int x){
if(x < 2) return false;
if(x == 2) return true;
if(x % 2 == 0) return false;
for(int i = 3; i * i <= x; i += 2)
if(x % i == 0) return false;
return true;
}
}
|
[
7,
15,
13,
17,
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,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
20,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
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,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
42,
2,
13,
13,
30,
14,
2,
2,
13,
13,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
18,
13,
13,
30,
0,
13,
4,
18,
4,
18,
4,
18,
13,
17,
0,
13,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
0,
13,
17,
0,
13,
17,
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,
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,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
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
],
[
359,
17
],
[
359,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
20,
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
],
[
20,
53
],
[
53,
54
],
[
54,
55
],
[
18,
56
],
[
56,
57
],
[
0,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
58,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
64,
77
],
[
77,
78
],
[
64,
79
],
[
79,
80
],
[
58,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
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
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
106,
107
],
[
83,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
58,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
116,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
123,
133
],
[
133,
134
],
[
116,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
116,
144
],
[
144,
145
],
[
144,
146
],
[
116,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
152,
162
],
[
162,
163
],
[
151,
164
],
[
164,
165
],
[
164,
166
],
[
116,
167
],
[
167,
168
],
[
114,
169
],
[
169,
170
],
[
0,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
171,
175
],
[
175,
176
],
[
171,
177
],
[
177,
178
],
[
171,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
171,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
185,
191
],
[
191,
192
],
[
171,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
203,
205
],
[
196,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
209,
216
],
[
206,
217
],
[
217,
218
],
[
217,
219
],
[
195,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
171,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
171,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
233,
237
],
[
237,
238
],
[
237,
239
],
[
233,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
171,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
248,
251
],
[
251,
252
],
[
171,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
257,
260
],
[
260,
261
],
[
171,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
266,
269
],
[
269,
270
],
[
171,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
278,
283
],
[
283,
284
],
[
283,
285
],
[
278,
286
],
[
286,
287
],
[
287,
288
],
[
278,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
294
],
[
294,
295
],
[
273,
296
],
[
296,
297
],
[
271,
298
],
[
298,
299
],
[
171,
300
],
[
300,
301
],
[
300,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
307
],
[
307,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
307,
312
],
[
312,
313
],
[
312,
314
],
[
307,
315
],
[
315,
316
],
[
316,
317
],
[
307,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
323
],
[
323,
324
],
[
302,
325
],
[
325,
326
],
[
300,
327
],
[
327,
328
],
[
171,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
336,
341
],
[
341,
342
],
[
341,
343
],
[
336,
344
],
[
344,
345
],
[
345,
346
],
[
336,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
348,
352
],
[
352,
353
],
[
331,
354
],
[
354,
355
],
[
329,
356
],
[
356,
357
],
[
0,
358
],
[
358,
359
],
[
358,
360
]
] | [
"import java.io.BufferedReader;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}\n\n}\nclass Solve {\n\tprivate final int N;\n\tprivate final int[] Nums;\n\n\tpublic Solve(final int N, final int[] Nums)\n\t{\n\t\tthis.N = N;\n\t\tthis.Nums = Nums;\n\t}\n\n\tpublic void solve()\n\t{\n\t\tint count = 0;\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic boolean isPrime(final int num)\n\t{\n\t\tif(num <= 2) return true;\n\n\t\tif(num <= 1 || num % 2 == 0) return false;\n\n\t\tint limit = (int)Math.ceil(Math.sqrt(num));\n\t\tint v = 3;\n\n\t\tdo {\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t} while(v <= limit);\n\n\t\treturn true;\n\t}\n}\nclass ContestScanner {\n\tBufferedReader reader;\n\tString[] line;\n\tint index;\n\tpublic ContestScanner() {\n\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\n\tpublic ContestScanner(String filename) throws FileNotFoundException {\n\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\n\t}\n\n\tpublic String nextToken() throws IOException {\n\t\tif(line == null || index >= line.length)\n\t\t{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\n\t\treturn line[index++];\n\t}\n\n\tpublic String next() throws IOException {\n\t\treturn nextToken();\n\t}\n\n\tpublic String readLine() throws IOException {\n\t\tline = null;\n\t\tindex = 0;\n\n\t\treturn reader.readLine();\n\t}\n\n\tpublic int nextInt() throws IOException, NumberFormatException {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\n\tpublic long nextLong() throws IOException, NumberFormatException {\n\t\treturn Long.parseLong(nextToken());\n\t}\n\n\tpublic double nextDouble() throws IOException, NumberFormatException {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n\n\tpublic int[] nextIntArray(int N) throws IOException, NumberFormatException {\n\t\tint[] result = new int[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextInt();\n\n\t\treturn result;\n\t}\n\n\tpublic long[] nextLongArray(int N) throws IOException, NumberFormatException {\n\t\tlong[] result = new long[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextLong();\n\n\t\treturn result;\n\t}\n\n\tpublic double[] nexDoubleArray(int N) throws IOException, NumberFormatException {\n\t\tdouble[] result = new double[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextDouble();\n\n\t\treturn result;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.FileInputStream;",
"FileInputStream",
"java.io",
"import java.io.FileNotFoundException;",
"FileNotFoundException",
"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\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}",
"main",
"{\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}",
"ContestScanner scan = new ContestScanner();",
"scan",
"new ContestScanner()",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] Nums = new int[N];",
"Nums",
"new int[N]",
"N",
"for(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}",
"Nums[i] = scan.nextInt()",
"Nums[i]",
"Nums",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"(new Solve(N, Nums)).solve()",
"(new Solve(N, Nums)).solve",
"(new Solve(N, Nums))",
"String[] args",
"args",
"class Solve {\n\tprivate final int N;\n\tprivate final int[] Nums;\n\n\tpublic Solve(final int N, final int[] Nums)\n\t{\n\t\tthis.N = N;\n\t\tthis.Nums = Nums;\n\t}\n\n\tpublic void solve()\n\t{\n\t\tint count = 0;\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic boolean isPrime(final int num)\n\t{\n\t\tif(num <= 2) return true;\n\n\t\tif(num <= 1 || num % 2 == 0) return false;\n\n\t\tint limit = (int)Math.ceil(Math.sqrt(num));\n\t\tint v = 3;\n\n\t\tdo {\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t} while(v <= limit);\n\n\t\treturn true;\n\t}\n}",
"Solve",
"private final int N;",
"N",
"private final int[] Nums;",
"Nums",
"public Solve(final int N, final int[] Nums)\n\t{\n\t\tthis.N = N;\n\t\tthis.Nums = Nums;\n\t}",
"Solve",
"{\n\t\tthis.N = N;\n\t\tthis.Nums = Nums;\n\t}",
"this.N = N",
"this.N",
"this",
"this.N",
"N",
"this.Nums = Nums",
"this.Nums",
"this",
"this.Nums",
"Nums",
"final int N",
"N",
"final int[] Nums",
"Nums",
"public void solve()\n\t{\n\t\tint count = 0;\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\t}",
"solve",
"{\n\t\tint count = 0;\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\t}",
"int count = 0;",
"count",
"0",
"for(int i=0; i < N; i++)\n\t\t{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}",
"{\n\t\t\tif(isPrime(Nums[i])) count++;\n\t\t}",
"if(isPrime(Nums[i])) count++;",
"isPrime(Nums[i])",
"isPrime",
"Nums[i]",
"Nums",
"i",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public boolean isPrime(final int num)\n\t{\n\t\tif(num <= 2) return true;\n\n\t\tif(num <= 1 || num % 2 == 0) return false;\n\n\t\tint limit = (int)Math.ceil(Math.sqrt(num));\n\t\tint v = 3;\n\n\t\tdo {\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t} while(v <= limit);\n\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif(num <= 2) return true;\n\n\t\tif(num <= 1 || num % 2 == 0) return false;\n\n\t\tint limit = (int)Math.ceil(Math.sqrt(num));\n\t\tint v = 3;\n\n\t\tdo {\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t} while(v <= limit);\n\n\t\treturn true;\n\t}",
"if(num <= 2) return true;",
"num <= 2",
"num",
"2",
"return true;",
"true",
"if(num <= 1 || num % 2 == 0) return false;",
"num <= 1 || num % 2 == 0",
"num <= 1",
"num",
"1",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"return false;",
"false",
"int limit = (int)Math.ceil(Math.sqrt(num));",
"limit",
"(int)Math.ceil(Math.sqrt(num))",
"Math.ceil",
"Math",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"int v = 3;",
"v",
"3",
"do {\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t} while(v <= limit);",
"v <= limit",
"v",
"limit",
"{\n\t\t\tif(v < num && num % v == 0) return false;\n\n\t\t\tv += 2;\n\t\t}",
"if(v < num && num % v == 0) return false;",
"v < num && num % v == 0",
"v < num",
"v",
"num",
"num % v == 0",
"num % v",
"num",
"v",
"0",
"return false;",
"false",
"v += 2",
"v",
"2",
"return true;",
"true",
"final int num",
"num",
"class ContestScanner {\n\tBufferedReader reader;\n\tString[] line;\n\tint index;\n\tpublic ContestScanner() {\n\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\n\tpublic ContestScanner(String filename) throws FileNotFoundException {\n\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\n\t}\n\n\tpublic String nextToken() throws IOException {\n\t\tif(line == null || index >= line.length)\n\t\t{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\n\t\treturn line[index++];\n\t}\n\n\tpublic String next() throws IOException {\n\t\treturn nextToken();\n\t}\n\n\tpublic String readLine() throws IOException {\n\t\tline = null;\n\t\tindex = 0;\n\n\t\treturn reader.readLine();\n\t}\n\n\tpublic int nextInt() throws IOException, NumberFormatException {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\n\tpublic long nextLong() throws IOException, NumberFormatException {\n\t\treturn Long.parseLong(nextToken());\n\t}\n\n\tpublic double nextDouble() throws IOException, NumberFormatException {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n\n\tpublic int[] nextIntArray(int N) throws IOException, NumberFormatException {\n\t\tint[] result = new int[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextInt();\n\n\t\treturn result;\n\t}\n\n\tpublic long[] nextLongArray(int N) throws IOException, NumberFormatException {\n\t\tlong[] result = new long[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextLong();\n\n\t\treturn result;\n\t}\n\n\tpublic double[] nexDoubleArray(int N) throws IOException, NumberFormatException {\n\t\tdouble[] result = new double[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextDouble();\n\n\t\treturn result;\n\t}\n}",
"ContestScanner",
"BufferedReader reader;",
"reader",
"String[] line;",
"line",
"int index;",
"index",
"public ContestScanner() {\n\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"ContestScanner",
"{\n\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"reader = new BufferedReader(new InputStreamReader(System.in))",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"public ContestScanner(String filename) throws FileNotFoundException {\n\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\n\t}",
"ContestScanner",
"{\n\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\n\t}",
"reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)))",
"reader",
"new BufferedReader(new InputStreamReader(new FileInputStream(filename)))",
"String filename",
"filename",
"public String nextToken() throws IOException {\n\t\tif(line == null || index >= line.length)\n\t\t{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\n\t\treturn line[index++];\n\t}",
"nextToken",
"{\n\t\tif(line == null || index >= line.length)\n\t\t{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\n\t\treturn line[index++];\n\t}",
"if(line == null || index >= line.length)\n\t\t{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}",
"line == null || index >= line.length",
"line == null",
"line",
"null",
"index >= line.length",
"index",
"line.length",
"line",
"line.length",
"{\n\t\t\tline = reader.readLine().trim().split(\" \");\n\t\t\tindex = 0;\n\t\t}",
"line = reader.readLine().trim().split(\" \")",
"line",
"reader.readLine().trim().split(\" \")",
"reader.readLine().trim().split",
"reader.readLine().trim()",
"reader.readLine().trim",
"reader.readLine()",
"reader.readLine",
"reader",
"\" \"",
"index = 0",
"index",
"0",
"return line[index++];",
"line[index++]",
"line",
"index++",
"index",
"public String next() throws IOException {\n\t\treturn nextToken();\n\t}",
"next",
"{\n\t\treturn nextToken();\n\t}",
"return nextToken();",
"nextToken()",
"nextToken",
"public String readLine() throws IOException {\n\t\tline = null;\n\t\tindex = 0;\n\n\t\treturn reader.readLine();\n\t}",
"readLine",
"{\n\t\tline = null;\n\t\tindex = 0;\n\n\t\treturn reader.readLine();\n\t}",
"line = null",
"line",
"null",
"index = 0",
"index",
"0",
"return reader.readLine();",
"reader.readLine()",
"reader.readLine",
"reader",
"public int nextInt() throws IOException, NumberFormatException {\n\t\treturn Integer.parseInt(nextToken());\n\t}",
"nextInt",
"{\n\t\treturn Integer.parseInt(nextToken());\n\t}",
"return Integer.parseInt(nextToken());",
"Integer.parseInt(nextToken())",
"Integer.parseInt",
"Integer",
"nextToken()",
"nextToken",
"public long nextLong() throws IOException, NumberFormatException {\n\t\treturn Long.parseLong(nextToken());\n\t}",
"nextLong",
"{\n\t\treturn Long.parseLong(nextToken());\n\t}",
"return Long.parseLong(nextToken());",
"Long.parseLong(nextToken())",
"Long.parseLong",
"Long",
"nextToken()",
"nextToken",
"public double nextDouble() throws IOException, NumberFormatException {\n\t\treturn Double.parseDouble(nextToken());\n\t}",
"nextDouble",
"{\n\t\treturn Double.parseDouble(nextToken());\n\t}",
"return Double.parseDouble(nextToken());",
"Double.parseDouble(nextToken())",
"Double.parseDouble",
"Double",
"nextToken()",
"nextToken",
"public int[] nextIntArray(int N) throws IOException, NumberFormatException {\n\t\tint[] result = new int[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextInt();\n\n\t\treturn result;\n\t}",
"nextIntArray",
"{\n\t\tint[] result = new int[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextInt();\n\n\t\treturn result;\n\t}",
"int[] result = new int[N];",
"result",
"new int[N]",
"N",
"for(int i=0; i < N; i++) result[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"result[i] = nextInt();",
"result[i] = nextInt()",
"result[i]",
"result",
"i",
"nextInt()",
"nextInt",
"return result;",
"result",
"int N",
"N",
"public long[] nextLongArray(int N) throws IOException, NumberFormatException {\n\t\tlong[] result = new long[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextLong();\n\n\t\treturn result;\n\t}",
"nextLongArray",
"{\n\t\tlong[] result = new long[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextLong();\n\n\t\treturn result;\n\t}",
"long[] result = new long[N];",
"result",
"new long[N]",
"N",
"for(int i=0; i < N; i++) result[i] = nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"result[i] = nextLong();",
"result[i] = nextLong()",
"result[i]",
"result",
"i",
"nextLong()",
"nextLong",
"return result;",
"result",
"int N",
"N",
"public double[] nexDoubleArray(int N) throws IOException, NumberFormatException {\n\t\tdouble[] result = new double[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextDouble();\n\n\t\treturn result;\n\t}",
"nexDoubleArray",
"{\n\t\tdouble[] result = new double[N];\n\n\t\tfor(int i=0; i < N; i++) result[i] = nextDouble();\n\n\t\treturn result;\n\t}",
"double[] result = new double[N];",
"result",
"new double[N]",
"N",
"for(int i=0; i < N; i++) result[i] = nextDouble();",
"int i=0;",
"int i=0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"result[i] = nextDouble();",
"result[i] = nextDouble()",
"result[i]",
"result",
"i",
"nextDouble()",
"nextDouble",
"return result;",
"result",
"int N",
"N",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tint N = scan.nextInt();\n\n\t\tint[] Nums = new int[N];\n\n\t\tfor(int i=0; i < N; i++)\n\t\t{\n\t\t\tNums[i] = scan.nextInt();\n\t\t}\n\n\t\t(new Solve(N, Nums)).solve();\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
ContestScanner scan = new ContestScanner();
int N = scan.nextInt();
int[] Nums = new int[N];
for(int i=0; i < N; i++)
{
Nums[i] = scan.nextInt();
}
(new Solve(N, Nums)).solve();
}
}
class Solve {
private final int N;
private final int[] Nums;
public Solve(final int N, final int[] Nums)
{
this.N = N;
this.Nums = Nums;
}
public void solve()
{
int count = 0;
for(int i=0; i < N; i++)
{
if(isPrime(Nums[i])) count++;
}
System.out.println(count);
}
public boolean isPrime(final int num)
{
if(num <= 2) return true;
if(num <= 1 || num % 2 == 0) return false;
int limit = (int)Math.ceil(Math.sqrt(num));
int v = 3;
do {
if(v < num && num % v == 0) return false;
v += 2;
} while(v <= limit);
return true;
}
}
class ContestScanner {
BufferedReader reader;
String[] line;
int index;
public ContestScanner() {
reader = new BufferedReader(new InputStreamReader(System.in));
}
public ContestScanner(String filename) throws FileNotFoundException {
reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
}
public String nextToken() throws IOException {
if(line == null || index >= line.length)
{
line = reader.readLine().trim().split(" ");
index = 0;
}
return line[index++];
}
public String next() throws IOException {
return nextToken();
}
public String readLine() throws IOException {
line = null;
index = 0;
return reader.readLine();
}
public int nextInt() throws IOException, NumberFormatException {
return Integer.parseInt(nextToken());
}
public long nextLong() throws IOException, NumberFormatException {
return Long.parseLong(nextToken());
}
public double nextDouble() throws IOException, NumberFormatException {
return Double.parseDouble(nextToken());
}
public int[] nextIntArray(int N) throws IOException, NumberFormatException {
int[] result = new int[N];
for(int i=0; i < N; i++) result[i] = nextInt();
return result;
}
public long[] nextLongArray(int N) throws IOException, NumberFormatException {
long[] result = new long[N];
for(int i=0; i < N; i++) result[i] = nextLong();
return result;
}
public double[] nexDoubleArray(int N) throws IOException, NumberFormatException {
double[] result = new double[N];
for(int i=0; i < N; i++) result[i] = nextDouble();
return result;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
2,
4,
18,
13,
17,
17,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
4,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
30,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
0,
13,
13,
3,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
147,
5
],
[
147,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
16,
20
],
[
15,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
33,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
43,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
57,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
80,
87
],
[
87,
88
],
[
87,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
80,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
8,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
8,
110
],
[
110,
111
],
[
110,
112
],
[
8,
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
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
126,
133
],
[
133,
134
],
[
8,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
8,
141
],
[
141,
142
],
[
142,
143
],
[
6,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}\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\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"boolean[] prime=new boolean[(int)Math.pow(10,8)+1];",
"prime",
"new boolean[(int)Math.pow(10,8)+1]",
"(int)Math.pow(10,8)+1",
"(int)Math.pow(10,8)",
"Math.pow",
"Math",
"10",
"8",
"1",
"prime[0]=prime[1]=true",
"prime[0]",
"prime",
"0",
"prime[1]=true",
"prime[1]",
"prime",
"1",
"true",
"int limit=(int)Math.pow(10,8);",
"limit",
"(int)Math.pow(10,8)",
"Math.pow",
"Math",
"10",
"8",
"int limit2=(int)Math.sqrt(Math.pow(10,8));",
"limit2",
"(int)Math.sqrt(Math.pow(10,8))",
"Math.sqrt",
"Math",
"Math.pow(10,8)",
"Math.pow",
"Math",
"10",
"8",
"for(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<limit2",
"i",
"limit2",
"{\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}",
"int j=2;",
"int j=2;",
"j",
"2",
"i*j<=limit",
"i*j",
"i",
"j",
"limit",
"j++",
"j++",
"j",
"{\n\t\t\t\tprime[i*j]=true;\n\t\t\t}",
"{\n\t\t\t\tprime[i*j]=true;\n\t\t\t}",
"prime[i*j]=true",
"prime[i*j]",
"prime",
"i*j",
"i",
"j",
"true",
"for(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j=i+1;",
"int j=i+1;",
"j",
"i+1",
"i",
"1",
"j<=limit",
"j",
"limit",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"!prime[j]",
"prime[j]",
"prime",
"j",
"{\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"i=j",
"i",
"j",
"break;",
"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\tif(!prime[scan.nextInt()]) count++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}",
"{\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}",
"if(!prime[scan.nextInt()]) count++;",
"!prime[scan.nextInt()]",
"prime[scan.nextInt()]",
"prime",
"scan.nextInt()",
"scan.nextInt",
"scan",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int i=2;i<limit2;){\n\t\t\tfor(int j=2;i*j<=limit;j++){\n\t\t\t\tprime[i*j]=true;\n\t\t\t}\n\t\t\tfor(int j=i+1;j<=limit;j++){\n\t\t\t\tif(!prime[j]){\n\t\t\t\t\ti=j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint N=scan.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tif(!prime[scan.nextInt()]) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.close();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
boolean[] prime=new boolean[(int)Math.pow(10,8)+1];
prime[0]=prime[1]=true;
int limit=(int)Math.pow(10,8);
int limit2=(int)Math.sqrt(Math.pow(10,8));
for(int i=2;i<limit2;){
for(int j=2;i*j<=limit;j++){
prime[i*j]=true;
}
for(int j=i+1;j<=limit;j++){
if(!prime[j]){
i=j;
break;
}
}
}
int N=scan.nextInt();
int count=0;
for(int i=0;i<N;i++){
if(!prime[scan.nextInt()]) count++;
}
System.out.println(count);
scan.close();
}
} |
[
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,
20,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
28,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
4,
18,
13,
13,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
28,
13,
13,
30,
14,
2,
2,
13,
13,
2,
2,
13,
13,
17,
0,
13,
17,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
149,
14
],
[
149,
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
],
[
65,
66
],
[
64,
67
],
[
17,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
68,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
86,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
82,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
17,
107
],
[
107,
108
],
[
107,
109
],
[
17,
110
],
[
110,
111
],
[
110,
112
],
[
110,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
118,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
122,
132
],
[
132,
133
],
[
132,
134
],
[
114,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
17,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
15,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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",
"List<Integer> primes = new ArrayList<Integer>();",
"primes",
"new ArrayList<Integer>()",
"primes.add(2)",
"primes.add",
"primes",
"2",
"for (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i * i <= max",
"i * i",
"i",
"i",
"max",
"i++",
"i++",
"i",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\n\t\t}",
"{\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\n\t\t}",
"boolean is_prime = true;",
"is_prime",
"true",
"for (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"int p",
"primes",
"if (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"if (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"i % p == 0",
"i % p",
"i",
"p",
"0",
"{\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"is_prime = false",
"is_prime",
"false",
"break;",
"if (is_prime)\n\t\t\t\tprimes.add(i);",
"is_prime",
"primes.add(i)",
"primes.add",
"primes",
"i",
"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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\n\t\t}",
"{\n\t\t\tboolean is_prime = true;\n//\t\t\tfor (int i = 2; i * i < n; i++)\n\t\t\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\n\t\t}",
"boolean is_prime = true;",
"is_prime",
"true",
"for (int i : primes)\n\t\t\t\tif (n != i && n % i == 0)\n\t\t\t\t\tis_prime = false;",
"int i",
"primes",
"if (n != i && n % i == 0)\n\t\t\t\t\tis_prime = false;",
"if (n != i && n % i == 0)\n\t\t\t\t\tis_prime = false;",
"n != i && n % i == 0",
"n != i",
"n",
"i",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"is_prime = false",
"is_prime",
"false",
"if (is_prime) {\n\t\t\t\tans++;\n\t\t\t}",
"is_prime",
"{\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) 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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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\tList<Integer> primes = new ArrayList<Integer>();\n\t\tprimes.add(2);\n\t\tfor (int i = 3; i * i <= max; i++) {\n\t\t\tboolean is_prime = true;\n\t\t\tfor (int p : primes)\n\t\t\t\tif (i % p == 0) {\n\t\t\t\t\tis_prime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tif (is_prime)\n\t\t\t\tprimes.add(i);\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\tfor (int i : primes)\n\t\t\t\tif (n != i && 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\t}\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;
}
List<Integer> primes = new ArrayList<Integer>();
primes.add(2);
for (int i = 3; i * i <= max; i++) {
boolean is_prime = true;
for (int p : primes)
if (i % p == 0) {
is_prime = false;
break;
}
if (is_prime)
primes.add(i);
}
int ans = 0;
for (int n : list) {
boolean is_prime = true;
// for (int i = 2; i * i < n; i++)
for (int i : primes)
if (n != i && n % i == 0)
is_prime = false;
if (is_prime) {
ans++;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
46,
20
],
[
46,
21
],
[
21,
22
],
[
46,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
25,
34
],
[
34,
35
],
[
34,
36
],
[
25,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
23,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
] | [
"import java.io.*;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.Scanner;\npublic class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Comparator;",
"Comparator",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"static String a;",
"a",
"public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int count = 0;",
"count",
"0",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"public class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tint count = 0;\n\t\tIN:for(int i = 0; i < n; i++) {\n\t\t\tint x = stdIn.nextInt();\n\t\t\tfor(int j = 2; j*j <= x; j++) {\n\t\t\t\tif(x % j == 0) continue IN;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main"
] | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
static String a;
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int count = 0;
IN:for(int i = 0; i < n; i++) {
int x = stdIn.nextInt();
for(int j = 2; j*j <= x; j++) {
if(x % j == 0) continue IN;
}
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,
17,
41,
13,
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,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
11,
1,
0,
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
],
[
120,
11
],
[
120,
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
],
[
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
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
12,
64
],
[
64,
65
],
[
120,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
68,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
68,
89
],
[
89,
90
],
[
68,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
91,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
68,
115
],
[
115,
116
],
[
66,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main{\n\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 count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\n }\n\n public static boolean isPrime(int x){\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\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\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 count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\n }\n\n public static boolean isPrime(int x){\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }\n return true;\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 count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\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 count = 0;",
"count",
"0",
"int x;",
"x",
"for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }",
"{\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }",
"x = Integer.parseInt(br.readLine())",
"x",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"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",
"public static boolean isPrime(int x){\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }\n return true;\n }",
"if(x < 2) return false;\n else if(x == 2) return true;",
"x < 2",
"x",
"2",
"return false;",
"false",
"if(x == 2) return true;",
"x == 2",
"x",
"2",
"return true;",
"true",
"if(x % 2 == 0) return false;",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return false;",
"false",
"int i;",
"i",
"for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }",
"i = 3;",
"i = 3",
"i",
"3",
"i * i <= x",
"i * i",
"i",
"i",
"x",
"i += 2",
"i += 2",
"i",
"2",
"{\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 class Main{\n\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 count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\n }\n\n public static boolean isPrime(int x){\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }\n return true;\n }\n\n}",
"public class Main{\n\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 count = 0;\n int x;\n for(int i = 0; i < n; i++){\n x = Integer.parseInt(br.readLine());\n if(isPrime(x)) count++;\n }\n System.out.println(count);\n }\n\n public static boolean isPrime(int x){\n if(x < 2) return false;\n else if(x == 2) return true;\n if(x % 2 == 0) return false;\n int i;\n for(i = 3; i * i <= x; i += 2){\n if(x % i == 0) return false;\n }\n return true;\n }\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
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 count = 0;
int x;
for(int i = 0; i < n; i++){
x = Integer.parseInt(br.readLine());
if(isPrime(x)) count++;
}
System.out.println(count);
}
public static boolean isPrime(int x){
if(x < 2) return false;
else if(x == 2) return true;
if(x % 2 == 0) return false;
int i;
for(i = 3; i * i <= x; i += 2){
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,
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,
11,
1,
41,
13,
17,
2,
13,
4,
18,
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
],
[
119,
5
],
[
119,
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
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
6,
57
],
[
57,
58
],
[
119,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
61,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
61,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
85,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
85,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
105,
111
],
[
111,
112
],
[
112,
113
],
[
61,
114
],
[
114,
115
],
[
59,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n private static boolean isPrime(int p) {\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n private static boolean isPrime(int p) {\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = Integer.parseInt(scanner.next());",
"n",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }",
"{\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }",
"int p = Integer.parseInt(scanner.next());",
"p",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"if (isPrime(p)) {\n count++;\n }",
"isPrime(p)",
"isPrime",
"p",
"{\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 p) {\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }",
"isPrime",
"{\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }",
"if (p == 1) {\n return false;\n }",
"p == 1",
"p",
"1",
"{\n return false;\n }",
"return false;",
"false",
"if (p == 2) {\n return true;\n }",
"p == 2",
"p",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if (p % 2 == 0) {\n return false;\n }",
"p % 2 == 0",
"p % 2",
"p",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.ceil(Math.sqrt(p))",
"i",
"Math.ceil(Math.sqrt(p))",
"Math.ceil",
"Math",
"Math.sqrt(p)",
"Math.sqrt",
"Math",
"p",
"i += 2",
"i += 2",
"i",
"2",
"{\n if (p % i == 0) {\n return false;\n }\n }",
"{\n if (p % i == 0) {\n return false;\n }\n }",
"if (p % i == 0) {\n return false;\n }",
"p % i == 0",
"p % i",
"p",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int p",
"p",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n private static boolean isPrime(int p) {\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next());\n if (isPrime(p)) {\n count++;\n }\n }\n\n System.out.println(count);\n }\n\n private static boolean isPrime(int p) {\n if (p == 1) {\n return false;\n }\n\n if (p == 2) {\n return true;\n }\n\n if (p % 2 == 0) {\n return false;\n }\n\n for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {\n if (p % i == 0) {\n return false;\n }\n }\n\n return true;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.next());
int count = 0;
for (int i = 0; i < n; i++) {
int p = Integer.parseInt(scanner.next());
if (isPrime(p)) {
count++;
}
}
System.out.println(count);
}
private static boolean isPrime(int p) {
if (p == 1) {
return false;
}
if (p == 2) {
return true;
}
if (p % 2 == 0) {
return false;
}
for (int i = 3; i <= Math.ceil(Math.sqrt(p)); i += 2) {
if (p % i == 0) {
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
41,
13,
4,
18,
13,
13,
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
],
[
100,
5
],
[
100,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
13,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
13,
26
],
[
26,
27
],
[
26,
28
],
[
13,
29
],
[
29,
30
],
[
29,
31
],
[
13,
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
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
44,
54
],
[
54,
55
],
[
54,
56
],
[
44,
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
],
[
80,
82
],
[
79,
83
],
[
44,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
13,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] | [
"import java.io.*;\n\npublic class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }",
"main",
"{\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }",
"try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }",
"catch(IOException e) {\n }",
"IOException e",
"{\n }",
"{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String count = new String(in.readLine());",
"count",
"new String(in.readLine())",
"int lineCount = Integer.parseInt(count);",
"lineCount",
"Integer.parseInt(count)",
"Integer.parseInt",
"Integer",
"count",
"int pFlag = 0;",
"pFlag",
"0",
"int result = 0;",
"result",
"0",
"for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lineCount",
"i",
"lineCount",
"i++",
"i++",
"i",
"{\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }",
"{\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }",
"String num = new String(in.readLine());",
"num",
"new String(in.readLine())",
"int iNum = Integer.parseInt(num);",
"iNum",
"Integer.parseInt(num)",
"Integer.parseInt",
"Integer",
"num",
"pFlag = 0",
"pFlag",
"0",
"for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= Math.sqrt(iNum)",
"j",
"Math.sqrt(iNum)",
"Math.sqrt",
"Math",
"iNum",
"j++",
"j++",
"j",
"{\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }",
"{\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }",
"if(iNum % j == 0) {\n pFlag = 1;\n break;\n }",
"iNum % j == 0",
"iNum % j",
"iNum",
"j",
"0",
"{\n pFlag = 1;\n break;\n }",
"pFlag = 1",
"pFlag",
"1",
"break;",
"if(pFlag == 0) {\n result++;\n }",
"pFlag == 0",
"pFlag",
"0",
"{\n result++;\n }",
"result++",
"result",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result = 0;\n for(int i = 0; i < lineCount; i++) {\n String num = new String(in.readLine());\n int iNum = Integer.parseInt(num);\n pFlag = 0;\n for(int j = 2; j <= Math.sqrt(iNum); j++) {\n if(iNum % j == 0) {\n pFlag = 1;\n break;\n }\n }\n if(pFlag == 0) {\n result++;\n }\n }\n System.out.println(result);\n } catch(IOException e) {\n }\n }\n}",
"Main"
] | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String count = new String(in.readLine());
int lineCount = Integer.parseInt(count);
int pFlag = 0;
int result = 0;
for(int i = 0; i < lineCount; i++) {
String num = new String(in.readLine());
int iNum = Integer.parseInt(num);
pFlag = 0;
for(int j = 2; j <= Math.sqrt(iNum); j++) {
if(iNum % j == 0) {
pFlag = 1;
break;
}
}
if(pFlag == 0) {
result++;
}
}
System.out.println(result);
} catch(IOException e) {
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
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,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
94,
11
],
[
94,
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
],
[
23,
26
],
[
26,
27
],
[
27,
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
],
[
50,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
53,
64
],
[
64,
65
],
[
65,
66
],
[
53,
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
],
[
83,
84
],
[
14,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
12,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] | [
"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 NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\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 NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\n\t}\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\n\t}",
"BufferedReader br = new BufferedReader (new InputStreamReader(System.in));",
"br",
"new BufferedReader (new InputStreamReader(System.in))",
"int countResult = 0;",
"countResult",
"0",
"int inputNumTimes = Integer.parseInt(br.readLine());",
"inputNumTimes",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < inputNumTimes",
"i",
"inputNumTimes",
"i++",
"i++",
"i",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\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",
"boolean isPrimeNumber = true;",
"isPrimeNumber",
"true",
"for(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\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(num)",
"j",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\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\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"num % j == 0",
"num % j",
"num",
"j",
"0",
"{\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"isPrimeNumber = false",
"isPrimeNumber",
"false",
"break;",
"if(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}",
"isPrimeNumber",
"{\n\t\t\t\tcountResult++;\n\t\t\t}",
"countResult++",
"countResult",
"System.out.println(countResult)",
"System.out.println",
"System.out",
"System",
"System.out",
"countResult",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n\n\t\tint inputNumTimes = Integer.parseInt(br.readLine());\n\n\t\tfor(int i = 0; i < inputNumTimes; i++) {\n\t\t\tint num = Integer.parseInt(br.readLine());\n\t\t\tboolean isPrimeNumber = true;\n\n\t\t\tfor(int j = 2; j <= Math.sqrt(num); j++) {\n\t\t\t\tif(num % j == 0) {\n\t\t\t\t\tisPrimeNumber = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrimeNumber) {\n\t\t\t\tcountResult++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(countResult);\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 NumberFormatException, IOException {
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
int countResult = 0;
int inputNumTimes = Integer.parseInt(br.readLine());
for(int i = 0; i < inputNumTimes; i++) {
int num = Integer.parseInt(br.readLine());
boolean isPrimeNumber = true;
for(int j = 2; j <= Math.sqrt(num); j++) {
if(num % j == 0) {
isPrimeNumber = false;
break;
}
}
if(isPrimeNumber) {
countResult++;
}
}
System.out.println(countResult);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
17,
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,
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,
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,
2,
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
],
[
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
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
71,
77
],
[
77,
78
],
[
19,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
4,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
89,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
96,
106
],
[
106,
107
],
[
89,
108
],
[
108,
109
],
[
108,
110
],
[
89,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
111,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
119,
125
],
[
125,
126
],
[
118,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
89,
132
],
[
132,
133
],
[
87,
134
],
[
134,
135
]
] | [
"// ALDS1_1_C Prime Numbers\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n static boolean isPrime(int x) {\n if (x == 2) return true;\n if (x < 2 || x % 2 == 0) return false;\n int i = 3;\n while (i <= Math.sqrt(x)) {\n if (x % i == 0) return false;\n i = i + 2;\n }\n return true;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n static boolean isPrime(int x) {\n if (x == 2) return true;\n if (x < 2 || x % 2 == 0) return false;\n int i = 3;\n while (i <= Math.sqrt(x)) {\n if (x % i == 0) return false;\n i = i + 2;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }\n catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n System.out.println(cnt);\n }",
"int cnt = 0;",
"cnt",
"0",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] x = new int[n];",
"x",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n x[i] = Integer.parseInt(br.readLine());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n x[i] = Integer.parseInt(br.readLine());\n }",
"{\n x[i] = Integer.parseInt(br.readLine());\n }",
"x[i] = Integer.parseInt(br.readLine())",
"x[i]",
"x",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (isPrime(x[i])) cnt++;\n }",
"{\n if (isPrime(x[i])) cnt++;\n }",
"if (isPrime(x[i])) cnt++;",
"isPrime(x[i])",
"isPrime",
"x[i]",
"x",
"i",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static boolean isPrime(int x) {\n if (x == 2) return true;\n if (x < 2 || x % 2 == 0) return false;\n int i = 3;\n while (i <= Math.sqrt(x)) {\n if (x % i == 0) return false;\n i = i + 2;\n }\n return true;\n }",
"isPrime",
"{\n if (x == 2) return true;\n if (x < 2 || x % 2 == 0) return false;\n int i = 3;\n while (i <= Math.sqrt(x)) {\n if (x % i == 0) return false;\n i = i + 2;\n }\n return true;\n }",
"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(x)) {\n if (x % i == 0) return false;\n i = i + 2;\n }",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n if (x % i == 0) return false;\n i = i + 2;\n }",
"if (x % i == 0) return false;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return false;",
"false",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int x",
"x"
] | // ALDS1_1_C Prime Numbers
import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int cnt = 0;
int n = Integer.parseInt(br.readLine());
int[] x = new int[n];
for (int i = 0; i < n; i++) {
x[i] = Integer.parseInt(br.readLine());
}
for (int i = 0; i < n; i++) {
if (isPrime(x[i])) cnt++;
}
System.out.println(cnt);
}
catch (Exception e) {
e.printStackTrace();
}
}
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;
}
} |
[
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,
0,
13,
8,
4,
13,
4,
18,
13,
17,
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,
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
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
35,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
4,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
53,
78
],
[
78,
79
],
[
51,
80
],
[
80,
81
]
] | [
"import java.util.Scanner;\nclass Main{\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\tfor(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int a){\n\t\tfor(int i = 2; i * i <= a; i++){\n\t\t\tif(a % 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\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\tfor(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int a){\n\t\tfor(int i = 2; i * i <= a; i++){\n\t\t\tif(a % 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 N = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\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\tfor(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\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 count = 0;",
"count",
"0",
"for(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}",
"{\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}",
"count += (isPrime(scan.nextInt()) ? 1 : 0)",
"count",
"(isPrime(scan.nextInt()) ? 1 : 0)",
"isPrime(scan.nextInt())",
"isPrime",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"0",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean isPrime(int a){\n\t\tfor(int i = 2; i * i <= a; i++){\n\t\t\tif(a % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tfor(int i = 2; i * i <= a; i++){\n\t\t\tif(a % 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 <= a; i++){\n\t\t\tif(a % 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 <= a",
"i * i",
"i",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tif(a % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if(a % i == 0){\n\t\t\t\treturn false;\n\t\t\t}",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int a",
"a"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int count = 0;
for(int i = 0; i < N; i++){
count += (isPrime(scan.nextInt()) ? 1 : 0);
}
System.out.println(count);
}
public static boolean isPrime(int a){
for(int i = 2; i * i <= a; i++){
if(a % 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,
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,
13,
4,
18,
13,
13,
1,
0,
13,
17,
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
],
[
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
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
],
[
4,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
56,
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
],
[
83,
85
],
[
71,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
56,
95
],
[
95,
96
],
[
54,
97
],
[
97,
98
]
] | [
"import java.util.Scanner;\n\nclass Main{\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 x,count=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\n\tprivate static boolean judge_prime(int x) {\n\t\t\n\t\tif(x<=2) return true;\n\t\t\n\t\telse if(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\n\t\treturn true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\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 x,count=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\n\tprivate static boolean judge_prime(int x) {\n\t\t\n\t\tif(x<=2) return true;\n\t\t\n\t\telse if(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\n\t\treturn true;\n\t}\n}",
"Main",
"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 x,count=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\n\t\tScanner sc =new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint x,count=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\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 x",
"x",
"count=0;",
"count",
"0",
"for(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}",
"{\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}",
"x=sc.nextInt()",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(judge_prime(x)) count++;",
"judge_prime(x)",
"judge_prime",
"x",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean judge_prime(int x) {\n\t\t\n\t\tif(x<=2) return true;\n\t\t\n\t\telse if(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\n\t\treturn true;\n\t}",
"judge_prime",
"{\n\t\t\n\t\tif(x<=2) return true;\n\t\t\n\t\telse if(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\n\t\treturn true;\n\t}",
"if(x<=2) return true;\n\t\t\n\t\telse if(x%2==0) return false;",
"x<=2",
"x",
"2",
"return true;",
"true",
"if(x%2==0) return false;",
"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;",
"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",
"if(x%i==0) return false;",
"if(x%i==0) return false;",
"x%i==0",
"x%i",
"x",
"i",
"0",
"return false;",
"false",
"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 x,count=0;
for(int i=0;i<n;i++) {
x=sc.nextInt();
if(judge_prime(x)) count++;
}
System.out.println(count);
}
private static boolean judge_prime(int x) {
if(x<=2) return true;
else if(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,
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,
28,
13,
13,
30,
30,
14,
4,
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,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
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
],
[
44,
46
],
[
44,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
6,
62
],
[
62,
63
],
[
95,
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
],
[
66,
90
],
[
90,
91
],
[
64,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int number){\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int number){\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\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[] 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",
"int count = 0;",
"count",
"0",
"for(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int x",
"nums",
"{\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(x)",
"isPrime",
"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 static boolean isPrime(int number){\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"for(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i*i<=number",
"i*i",
"i",
"i",
"number",
"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\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int number){\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(x)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic static boolean isPrime(int number){\n\t\tfor(int i=2;i*i<=number;i++){\n\t\t\tif(number%i==0) return false;\n\t\t}\n\t\treturn true;\n\t}\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[] nums = new int[n];
for(int i=0;i<n;i++){
nums[i] = sc.nextInt();
}
int count = 0;
for(int x:nums){
if(isPrime(x)){
count++;
}
}
System.out.println(count);
}
public static boolean isPrime(int number){
for(int i=2;i*i<=number;i++){
if(number%i==0) return false;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
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,
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,
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
],
[
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
],
[
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
],
[
103,
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
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
52,
73
],
[
73,
74
],
[
73,
75
],
[
52,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
76,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
83,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
52,
98
],
[
98,
99
],
[
50,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.util.Scanner;\n\n/**\n * ?´???°????????°?????????????????????\n * @author moritahokuto\n *\n */\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int num) {\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\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\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int num) {\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"int count = 0;",
"count",
"0",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int size = scanner.nextInt();",
"size",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(scanner.nextInt())",
"isPrime",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"{\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 num) {\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"if (num == 2) {\n\t\t\treturn true;\n\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"num < 2 || num % 2 == 0",
"num < 2",
"num",
"2",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}",
"i <= Math.sqrt(num)",
"i",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"{\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\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",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int num",
"num",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int num) {\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tstatic boolean isPrime(int num) {\n\t\tif (num == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (num < 2 || num % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(num)) {\n\t\t\tif (num % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
/**
* ?´???°????????°?????????????????????
* @author moritahokuto
*
*/
public class Main {
public static void main(String[] args) {
int count = 0;
Scanner scanner = new Scanner(System.in);
int size = scanner.nextInt();
for (int i = 0; i < size; i++) {
if (isPrime(scanner.nextInt())) {
count++;
}
}
System.out.println(count);
}
static boolean isPrime(int num) {
if (num == 2) {
return true;
}
if (num < 2 || num % 2 == 0) {
return false;
}
int i = 3;
while (i <= Math.sqrt(num)) {
if (num % i == 0) {
return false;
}
i = i + 2;
}
return true;
}
} |
[
7,
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,
0,
13,
4,
13,
4,
18,
13,
4,
18,
18,
13,
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,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
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,
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
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
86,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
53,
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
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
53,
81
],
[
81,
82
],
[
51,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
] | [
"import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }\n\n public static int Prime(int a) {\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }\n/*\n Dice d1 = new Dice();\n Dice d2 = new Dice();\n\n for (int i=0; i<6; i++) {\n d1.dice[i] = sc.nextInt();\n }\n for (int i=0; i<6; i++) {\n d2.dice[i] = sc.nextInt();\n }\n\n\n\n\n\n\n int[] d1 = new int[6];\n int[] d2 = new int[6];\n\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n int f = 0;\n\n for (int i=0; i<6; i++) d1[i] = sc.nextInt();\n for (int i=0; i<6; i++) d2[i] = sc.nextInt();\n\n\n\n for (int i=0; i<6; i++) {\n if (d1[0] == d2[i]) a = i;\n else if (d1[1] == d2[i]) b = i;\n else if (d1[2] == d2[i]) c = i;\n else if (d1[3] == d2[i]) d = i;\n else if (d1[4] == d2[i]) e = i;\n else if (d1[5] == d2[i]) f = i;\n }\n\n if (a + f == 5) {\n if (Dice.Roll(a+1, b+1) == c+1 && Dice.Roll(a+1, c+1) == e+1) {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n else {\n System.out.println(\"No\");\n }\n }\n}\n\nclass Dice {\n int[] dice = new int[6];\n\n public static int Roll(int a, int b) {\n switch (a) {\n case 1: {\n switch (b) {\n case 2: return 3;\n case 3: return 5;\n case 4: return 2;\n case 5: return 4;\n }\n }\n case 2: {\n switch (b) {\n case 1: return 4;\n case 3: return 1;\n case 4: return 6;\n case 6: return 3;\n }\n }\n case 3: {\n switch (b) {\n case 1: return 2;\n case 2: return 6;\n case 5: return 1;\n case 6: return 5;\n }\n }\n case 4: {\n switch (b) {\n case 1: return 5;\n case 2: return 1;\n case 5: return 6;\n case 6: return 2;\n }\n }\n case 5: {\n switch (b) {\n case 1: return 3;\n case 3: return 6;\n case 4: return 1;\n case 6: return 4;\n }\n }\n case 6: {\n switch (b) {\n case 2: return 4;\n case 3: return 2;\n case 4: return 5;\n case 5: return 3;\n }\n }\n }\n return 0;\n\n\n }\n\n */\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }\n\n public static int Prime(int a) {\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }\n/*\n Dice d1 = new Dice();\n Dice d2 = new Dice();\n\n for (int i=0; i<6; i++) {\n d1.dice[i] = sc.nextInt();\n }\n for (int i=0; i<6; i++) {\n d2.dice[i] = sc.nextInt();\n }\n\n\n\n\n\n\n int[] d1 = new int[6];\n int[] d2 = new int[6];\n\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n int f = 0;\n\n for (int i=0; i<6; i++) d1[i] = sc.nextInt();\n for (int i=0; i<6; i++) d2[i] = sc.nextInt();\n\n\n\n for (int i=0; i<6; i++) {\n if (d1[0] == d2[i]) a = i;\n else if (d1[1] == d2[i]) b = i;\n else if (d1[2] == d2[i]) c = i;\n else if (d1[3] == d2[i]) d = i;\n else if (d1[4] == d2[i]) e = i;\n else if (d1[5] == d2[i]) f = i;\n }\n\n if (a + f == 5) {\n if (Dice.Roll(a+1, b+1) == c+1 && Dice.Roll(a+1, c+1) == e+1) {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n else {\n System.out.println(\"No\");\n }\n }\n}\n\nclass Dice {\n int[] dice = new int[6];\n\n public static int Roll(int a, int b) {\n switch (a) {\n case 1: {\n switch (b) {\n case 2: return 3;\n case 3: return 5;\n case 4: return 2;\n case 5: return 4;\n }\n }\n case 2: {\n switch (b) {\n case 1: return 4;\n case 3: return 1;\n case 4: return 6;\n case 6: return 3;\n }\n }\n case 3: {\n switch (b) {\n case 1: return 2;\n case 2: return 6;\n case 5: return 1;\n case 6: return 5;\n }\n }\n case 4: {\n switch (b) {\n case 1: return 5;\n case 2: return 1;\n case 5: return 6;\n case 6: return 2;\n }\n }\n case 5: {\n switch (b) {\n case 1: return 3;\n case 3: return 6;\n case 4: return 1;\n case 6: return 4;\n }\n }\n case 6: {\n switch (b) {\n case 2: return 4;\n case 3: return 2;\n case 4: return 5;\n case 5: return 3;\n }\n }\n }\n return 0;\n\n\n }\n\n */\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"StringBuilder bd = new StringBuilder();",
"bd",
"new StringBuilder()",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n sum += Prime(sc.nextInt());\n }",
"{\n sum += Prime(sc.nextInt());\n }",
"sum += Prime(sc.nextInt())",
"sum",
"Prime(sc.nextInt())",
"Prime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public static int Prime(int a) {\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }",
"Prime",
"{\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }",
"int d = (int)Math.sqrt(a);",
"d",
"(int)Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=d",
"i",
"d",
"i++",
"i++",
"i",
"{\n if (a % i == 0) return 0;\n }",
"{\n if (a % i == 0) return 0;\n }",
"if (a % i == 0) return 0;",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"return 0;",
"0",
"return 1;",
"1",
"int a",
"a",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }\n\n public static int Prime(int a) {\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }\n/*\n Dice d1 = new Dice();\n Dice d2 = new Dice();\n\n for (int i=0; i<6; i++) {\n d1.dice[i] = sc.nextInt();\n }\n for (int i=0; i<6; i++) {\n d2.dice[i] = sc.nextInt();\n }\n\n\n\n\n\n\n int[] d1 = new int[6];\n int[] d2 = new int[6];\n\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n int f = 0;\n\n for (int i=0; i<6; i++) d1[i] = sc.nextInt();\n for (int i=0; i<6; i++) d2[i] = sc.nextInt();\n\n\n\n for (int i=0; i<6; i++) {\n if (d1[0] == d2[i]) a = i;\n else if (d1[1] == d2[i]) b = i;\n else if (d1[2] == d2[i]) c = i;\n else if (d1[3] == d2[i]) d = i;\n else if (d1[4] == d2[i]) e = i;\n else if (d1[5] == d2[i]) f = i;\n }\n\n if (a + f == 5) {\n if (Dice.Roll(a+1, b+1) == c+1 && Dice.Roll(a+1, c+1) == e+1) {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n else {\n System.out.println(\"No\");\n }\n }\n}\n\nclass Dice {\n int[] dice = new int[6];\n\n public static int Roll(int a, int b) {\n switch (a) {\n case 1: {\n switch (b) {\n case 2: return 3;\n case 3: return 5;\n case 4: return 2;\n case 5: return 4;\n }\n }\n case 2: {\n switch (b) {\n case 1: return 4;\n case 3: return 1;\n case 4: return 6;\n case 6: return 3;\n }\n }\n case 3: {\n switch (b) {\n case 1: return 2;\n case 2: return 6;\n case 5: return 1;\n case 6: return 5;\n }\n }\n case 4: {\n switch (b) {\n case 1: return 5;\n case 2: return 1;\n case 5: return 6;\n case 6: return 2;\n }\n }\n case 5: {\n switch (b) {\n case 1: return 3;\n case 3: return 6;\n case 4: return 1;\n case 6: return 4;\n }\n }\n case 6: {\n switch (b) {\n case 2: return 4;\n case 3: return 2;\n case 4: return 5;\n case 5: return 3;\n }\n }\n }\n return 0;\n\n\n }\n\n */\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n }\n System.out.println(sum);\n\n }\n\n public static int Prime(int a) {\n int d = (int)Math.sqrt(a);\n for (int i=2; i<=d; i++) {\n if (a % i == 0) return 0;\n }\n return 1;\n }\n/*\n Dice d1 = new Dice();\n Dice d2 = new Dice();\n\n for (int i=0; i<6; i++) {\n d1.dice[i] = sc.nextInt();\n }\n for (int i=0; i<6; i++) {\n d2.dice[i] = sc.nextInt();\n }\n\n\n\n\n\n\n int[] d1 = new int[6];\n int[] d2 = new int[6];\n\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n int f = 0;\n\n for (int i=0; i<6; i++) d1[i] = sc.nextInt();\n for (int i=0; i<6; i++) d2[i] = sc.nextInt();\n\n\n\n for (int i=0; i<6; i++) {\n if (d1[0] == d2[i]) a = i;\n else if (d1[1] == d2[i]) b = i;\n else if (d1[2] == d2[i]) c = i;\n else if (d1[3] == d2[i]) d = i;\n else if (d1[4] == d2[i]) e = i;\n else if (d1[5] == d2[i]) f = i;\n }\n\n if (a + f == 5) {\n if (Dice.Roll(a+1, b+1) == c+1 && Dice.Roll(a+1, c+1) == e+1) {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n else {\n System.out.println(\"No\");\n }\n }\n}\n\nclass Dice {\n int[] dice = new int[6];\n\n public static int Roll(int a, int b) {\n switch (a) {\n case 1: {\n switch (b) {\n case 2: return 3;\n case 3: return 5;\n case 4: return 2;\n case 5: return 4;\n }\n }\n case 2: {\n switch (b) {\n case 1: return 4;\n case 3: return 1;\n case 4: return 6;\n case 6: return 3;\n }\n }\n case 3: {\n switch (b) {\n case 1: return 2;\n case 2: return 6;\n case 5: return 1;\n case 6: return 5;\n }\n }\n case 4: {\n switch (b) {\n case 1: return 5;\n case 2: return 1;\n case 5: return 6;\n case 6: return 2;\n }\n }\n case 5: {\n switch (b) {\n case 1: return 3;\n case 3: return 6;\n case 4: return 1;\n case 6: return 4;\n }\n }\n case 6: {\n switch (b) {\n case 2: return 4;\n case 3: return 2;\n case 4: return 5;\n case 5: return 3;\n }\n }\n }\n return 0;\n\n\n }\n\n */\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder bd = new StringBuilder();
int n = sc.nextInt();
int sum = 0;
for (int i=0; i<n; i++) {
sum += Prime(sc.nextInt());
}
System.out.println(sum);
}
public static int Prime(int a) {
int d = (int)Math.sqrt(a);
for (int i=2; i<=d; i++) {
if (a % i == 0) return 0;
}
return 1;
}
/*
Dice d1 = new Dice();
Dice d2 = new Dice();
for (int i=0; i<6; i++) {
d1.dice[i] = sc.nextInt();
}
for (int i=0; i<6; i++) {
d2.dice[i] = sc.nextInt();
}
int[] d1 = new int[6];
int[] d2 = new int[6];
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
for (int i=0; i<6; i++) d1[i] = sc.nextInt();
for (int i=0; i<6; i++) d2[i] = sc.nextInt();
for (int i=0; i<6; i++) {
if (d1[0] == d2[i]) a = i;
else if (d1[1] == d2[i]) b = i;
else if (d1[2] == d2[i]) c = i;
else if (d1[3] == d2[i]) d = i;
else if (d1[4] == d2[i]) e = i;
else if (d1[5] == d2[i]) f = i;
}
if (a + f == 5) {
if (Dice.Roll(a+1, b+1) == c+1 && Dice.Roll(a+1, c+1) == e+1) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
else {
System.out.println("No");
}
}
}
class Dice {
int[] dice = new int[6];
public static int Roll(int a, int b) {
switch (a) {
case 1: {
switch (b) {
case 2: return 3;
case 3: return 5;
case 4: return 2;
case 5: return 4;
}
}
case 2: {
switch (b) {
case 1: return 4;
case 3: return 1;
case 4: return 6;
case 6: return 3;
}
}
case 3: {
switch (b) {
case 1: return 2;
case 2: return 6;
case 5: return 1;
case 6: return 5;
}
}
case 4: {
switch (b) {
case 1: return 5;
case 2: return 1;
case 5: return 6;
case 6: return 2;
}
}
case 5: {
switch (b) {
case 1: return 3;
case 3: return 6;
case 4: return 1;
case 6: return 4;
}
}
case 6: {
switch (b) {
case 2: return 4;
case 3: return 2;
case 4: return 5;
case 5: return 3;
}
}
}
return 0;
}
*/
}
|
[
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,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
14,
2,
2,
13,
2,
13,
17,
17,
29,
17,
0,
13,
17,
29,
17,
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
],
[
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
],
[
117,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
52,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
59,
65
],
[
65,
66
],
[
52,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
52,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
52,
81
],
[
81,
82
],
[
81,
83
],
[
52,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
91,
97
],
[
97,
98
],
[
90,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
99,
107
],
[
107,
108
],
[
90,
109
],
[
109,
110
],
[
109,
111
],
[
52,
112
],
[
112,
113
],
[
50,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] | [
"\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\t}\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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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\t}\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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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\t}\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\t}\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\t}\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\t}\n\t\t}",
"{\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}",
"if (isPrime(scanner.nextInt())) {\n\t\t\t\tsum++;\n\t\t\t}",
"isPrime(scanner.nextInt())",
"isPrime",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"{\n\t\t\t\tsum++;\n\t\t\t}",
"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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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",
"if (i < 8)\n\t\t\treturn true;",
"i < 8",
"i",
"8",
"return true;",
"true",
"if (i % 3 == 0)\n\t\t\treturn false;",
"i % 3 == 0",
"i % 3",
"i",
"3",
"0",
"return false;",
"false",
"int k = 5;",
"k",
"5",
"while (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\n\t\t}",
"k * k <= i",
"k * k",
"k",
"k",
"i",
"{\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\n\t\t}",
"if (i % k == 0)\n\t\t\t\treturn false;",
"i % k == 0",
"i % k",
"i",
"k",
"0",
"return false;",
"false",
"if (i % (k + 2) == 0)\n\t\t\t\treturn false;",
"i % (k + 2) == 0",
"i % (k + 2)",
"i",
"(k + 2)",
"k",
"2",
"0",
"return false;",
"false",
"k += 6",
"k",
"6",
"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\t}\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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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\t}\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\tif (i < 8)\n\t\t\treturn true;\n\t\tif (i % 3 == 0)\n\t\t\treturn false;\n\t\tint k = 5;\n\t\twhile (k * k <= i) {\n\t\t\tif (i % k == 0)\n\t\t\t\treturn false;\n\t\t\tif (i % (k + 2) == 0)\n\t\t\t\treturn false;\n\t\t\tk += 6;\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;
if (i < 8)
return true;
if (i % 3 == 0)
return false;
int k = 5;
while (k * k <= i) {
if (i % k == 0)
return false;
if (i % (k + 2) == 0)
return false;
k += 6;
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
14,
2,
13,
17,
30,
4,
18,
13,
30,
0,
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,
41,
13,
4,
18,
13,
13,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
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,
30,
0,
13,
17,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
124,
5
],
[
124,
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
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
12,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
40,
42
],
[
31,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
55,
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
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
81,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
70,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
55,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
31,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
6,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc = null;",
"sc",
"null",
"try {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}",
"catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}",
"Exception e",
"{\n\t\t\tSystem.out.println(e);\n\t\t}",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}",
"if (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}",
"sc != null",
"sc",
"null",
"{\n\t\t\t\tsc.close();\n\t\t\t}",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"int loop = sc.nextInt();",
"loop",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < loop",
"i",
"loop",
"i++",
"i++",
"i",
"{\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean check = true;",
"check",
"true",
"double border = Math.sqrt(num);",
"border",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"if (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}",
"num == 2 || num % 2 != 0",
"num == 2",
"num",
"2",
"num % 2 != 0",
"num % 2",
"num",
"2",
"0",
"{\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"for (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"int j = 3;",
"int j = 3;",
"j",
"3",
"j <= border",
"j",
"border",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"if ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"(num % j) == 0",
"(num % j)",
"num",
"j",
"0",
"{\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"check = false",
"check",
"false",
"break;",
"{\n\t\t\t\t\tcheck = false;\n\t\t\t\t}",
"check = false",
"check",
"false",
"if (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"check",
"{\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",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????????????????(?????????)\n\t\t\tfor (int i = 0; i < loop; i++) {\n\t\t\t\tint num = sc.nextInt();\n\n\t\t\t\t//?´???°????????§??????\n\t\t\t\tboolean check = true;\n\t\t\t\tdouble border = Math.sqrt(num);\n\t\t\t\tif (num == 2 || num % 2 != 0) {\n\n\t\t\t\t\t//1??¨????????°??\\?????§???????????????????????§??????\n\t\t\t\t\tfor (int j = 3; j <= border; j+=2) {\n\t\t\t\t\t\tif ((num % j) == 0) {\n\t\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tcheck = false;\n\t\t\t\t}\n\n\t\t\t\t//?´???°??????????????????\n\t\t\t\tif (check) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//????????????\n\t\t\tSystem.out.println(count);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tif (sc != null) {\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = null;
try {
sc = new Scanner(System.in);
//??´??°????????°???????????????
int loop = sc.nextInt();
//??????????????¨?????°
int count = 0;
//??\??????????????????(?????????)
for (int i = 0; i < loop; i++) {
int num = sc.nextInt();
//?´???°????????§??????
boolean check = true;
double border = Math.sqrt(num);
if (num == 2 || num % 2 != 0) {
//1??¨????????°??\?????§???????????????????????§??????
for (int j = 3; j <= border; j+=2) {
if ((num % j) == 0) {
check = false;
break;
}
}
}else {
check = false;
}
//?´???°??????????????????
if (check) {
count++;
}
}
//????????????
System.out.println(count);
}catch (Exception e) {
System.out.println(e);
} finally {
if (sc != null) {
sc.close();
}
}
}
} |
[
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,
41,
13,
4,
18,
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,
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
],
[
123,
11
],
[
123,
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
],
[
123,
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
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
70,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
96,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
110,
116
],
[
116,
117
],
[
70,
118
],
[
118,
119
],
[
68,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
] | [
"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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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",
"int k = Double.valueOf( Math.sqrt(num) ).intValue();",
"k",
"Double.valueOf( Math.sqrt(num) ).intValue()",
"Double.valueOf( Math.sqrt(num) ).intValue",
"Double.valueOf( Math.sqrt(num) )",
"Double.valueOf",
"Double",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"for(int i=3; i <= k; i+=2 ) {\n if ( num % i == 0 ) return false;\n }",
"int i=3;",
"int i=3;",
"i",
"3",
"i <= k",
"i",
"k",
"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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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 int k = Double.valueOf( Math.sqrt(num) ).intValue();\n for(int i=3; i <= k; 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;
int k = Double.valueOf( Math.sqrt(num) ).intValue();
for(int i=3; i <= k; i+=2 ) {
if ( num % i == 0 ) return false;
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
13,
17,
17,
30,
0,
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,
3,
14,
2,
13,
17,
30,
0,
13,
17,
29,
13,
23,
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,
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,
14,
2,
4,
13,
18,
13,
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
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
12,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
30,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
30,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
6,
68
],
[
68,
69
],
[
4,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
76,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
86,
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
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
120,
121
],
[
86,
122
],
[
122,
123
],
[
122,
124
],
[
86,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
125,
135
],
[
135,
136
],
[
136,
137
],
[
125,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
141,
147
],
[
140,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
86,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
70,
158
],
[
158,
159
]
] | [
"import java.io.*;\n\nclass Main{\n \n public static int prime(int x){\n int k = 0;\n if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }\n for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0){\n k = 1;\n break;\n }\n }\n if(x == 2){\n k = 0;\n }\n return k;\n }\n\n public static void main(String[] args){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try { \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n } catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main{\n \n public static int prime(int x){\n int k = 0;\n if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }\n for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0){\n k = 1;\n break;\n }\n }\n if(x == 2){\n k = 0;\n }\n return k;\n }\n\n public static void main(String[] args){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try { \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n } catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }\n }\n}",
"Main",
"public static int prime(int x){\n int k = 0;\n if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }\n for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0){\n k = 1;\n break;\n }\n }\n if(x == 2){\n k = 0;\n }\n return k;\n }",
"prime",
"{\n int k = 0;\n if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }\n for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0){\n k = 1;\n break;\n }\n }\n if(x == 2){\n k = 0;\n }\n return k;\n }",
"int k = 0;",
"k",
"0",
"if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }",
"x == 1",
"x",
"1",
"{\n k = 1;\n }",
"k = 1",
"k",
"1",
"if(x % 2 == 0){\n k = 1;\n }",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"{\n k = 1;\n }",
"k = 1",
"k",
"1",
"for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0){\n k = 1;\n break;\n }\n }",
"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 if (x % i == 0){\n k = 1;\n break;\n }\n }",
"{\n if (x % i == 0){\n k = 1;\n break;\n }\n }",
"if (x % i == 0){\n k = 1;\n break;\n }",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n k = 1;\n break;\n }",
"k = 1",
"k",
"1",
"break;",
"if(x == 2){\n k = 0;\n }",
"x == 2",
"x",
"2",
"{\n k = 0;\n }",
"k = 0",
"k",
"0",
"return k;",
"k",
"int x",
"x",
"public static void main(String[] args){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try { \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n } catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }\n }",
"main",
"{\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try { \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n } catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try { \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n } catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }",
"catch (IOException e) {\n //TODO: handle exception\n System.out.println(e);\n }",
"IOException e",
"{\n //TODO: handle exception\n System.out.println(e);\n }",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{ \n int N = Integer.parseInt(reader.readLine());;\n \n\n int[] a = new int[N];\n\n for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }\n\n int count = 0;\n\n for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }\n\n System.out.println(count);\n \n }",
"int N = Integer.parseInt(reader.readLine());",
"N",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int[] a = new int[N];",
"a",
"new int[N]",
"N",
"for(int i = 0; i < N; i ++){\n a[i] = Integer.parseInt(reader.readLine());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i ++",
"i ++",
"i",
"{\n a[i] = Integer.parseInt(reader.readLine());\n }",
"{\n a[i] = Integer.parseInt(reader.readLine());\n }",
"a[i] = Integer.parseInt(reader.readLine())",
"a[i]",
"a",
"i",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < a.length; i++){\n if(prime(a[i]) == 0){\n count += 1;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n if(prime(a[i]) == 0){\n count += 1;\n }\n }",
"{\n if(prime(a[i]) == 0){\n count += 1;\n }\n }",
"if(prime(a[i]) == 0){\n count += 1;\n }",
"prime(a[i]) == 0",
"prime(a[i])",
"prime",
"a[i]",
"a",
"i",
"0",
"{\n count += 1;\n }",
"count += 1",
"count",
"1",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] | import java.io.*;
class Main{
public static int prime(int x){
int k = 0;
if(x == 1){
k = 1;
}else if(x % 2 == 0){
k = 1;
}
for(int i = 3; i <= Math.sqrt(x); i += 2){
if (x % i == 0){
k = 1;
break;
}
}
if(x == 2){
k = 0;
}
return k;
}
public static void main(String[] args){
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
int N = Integer.parseInt(reader.readLine());;
int[] a = new int[N];
for(int i = 0; i < N; i ++){
a[i] = Integer.parseInt(reader.readLine());
}
int count = 0;
for(int i = 0; i < a.length; i++){
if(prime(a[i]) == 0){
count += 1;
}
}
System.out.println(count);
} catch (IOException e) {
//TODO: handle exception
System.out.println(e);
}
}
} |
[
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,
4,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
29,
13,
23,
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
],
[
43,
44
],
[
43,
45
],
[
43,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
6,
53
],
[
53,
54
],
[
4,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
55,
63
],
[
63,
64
],
[
55,
65
],
[
65,
66
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args){\n Scanner nyuryoku = new Scanner(System.in);\n int n = nyuryoku.nextInt();\n int[] num = new int[n];\n for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }\n int ans = prime(n, num);\n System.out.println(ans);\n }\n public static int prime(int n, int[] num){\n int count = 0;\n IN:for (int i = 0; i < n; i++){\n for (int j = 2; j*j <= num[i];j++)\n if (num[i] % j == 0) {continue IN;}\n count++;\n }\n return count;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args){\n Scanner nyuryoku = new Scanner(System.in);\n int n = nyuryoku.nextInt();\n int[] num = new int[n];\n for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }\n int ans = prime(n, num);\n System.out.println(ans);\n }\n public static int prime(int n, int[] num){\n int count = 0;\n IN:for (int i = 0; i < n; i++){\n for (int j = 2; j*j <= num[i];j++)\n if (num[i] % j == 0) {continue IN;}\n count++;\n }\n return count;\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner nyuryoku = new Scanner(System.in);\n int n = nyuryoku.nextInt();\n int[] num = new int[n];\n for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }\n int ans = prime(n, num);\n System.out.println(ans);\n }",
"main",
"{\n Scanner nyuryoku = new Scanner(System.in);\n int n = nyuryoku.nextInt();\n int[] num = new int[n];\n for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }\n int ans = prime(n, num);\n System.out.println(ans);\n }",
"Scanner nyuryoku = new Scanner(System.in);",
"nyuryoku",
"new Scanner(System.in)",
"int n = nyuryoku.nextInt();",
"n",
"nyuryoku.nextInt()",
"nyuryoku.nextInt",
"nyuryoku",
"int[] num = new int[n];",
"num",
"new int[n]",
"n",
"for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num[i] = nyuryoku.nextInt();\n }",
"{\n num[i] = nyuryoku.nextInt();\n }",
"num[i] = nyuryoku.nextInt()",
"num[i]",
"num",
"i",
"nyuryoku.nextInt()",
"nyuryoku.nextInt",
"nyuryoku",
"int ans = prime(n, num);",
"ans",
"prime(n, num)",
"prime",
"n",
"num",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public static int prime(int n, int[] num){\n int count = 0;\n IN:for (int i = 0; i < n; i++){\n for (int j = 2; j*j <= num[i];j++)\n if (num[i] % j == 0) {continue IN;}\n count++;\n }\n return count;\n }",
"prime",
"{\n int count = 0;\n IN:for (int i = 0; i < n; i++){\n for (int j = 2; j*j <= num[i];j++)\n if (num[i] % j == 0) {continue IN;}\n count++;\n }\n return count;\n }",
"int count = 0;",
"count",
"0",
"return count;",
"count",
"int n",
"n",
"int[] num",
"num"
] | import java.util.Scanner;
class Main {
public static void main(String[] args){
Scanner nyuryoku = new Scanner(System.in);
int n = nyuryoku.nextInt();
int[] num = new int[n];
for (int i = 0; i < n; i++){
num[i] = nyuryoku.nextInt();
}
int ans = prime(n, num);
System.out.println(ans);
}
public static int prime(int n, int[] num){
int count = 0;
IN:for (int i = 0; i < n; i++){
for (int j = 2; j*j <= num[i];j++)
if (num[i] % j == 0) {continue IN;}
count++;
}
return count;
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
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,
18,
13,
13,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
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,
3,
14,
13,
40,
13,
23,
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
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
10,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
10,
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
],
[
46,
49
],
[
49,
50
],
[
49,
51
],
[
10,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
4,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
64,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
64,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
90,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
90,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
64,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
62,
122
],
[
122,
123
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\tint count;\n\tpublic static void main(String[] args) {\n\t\tMain pmClass = new Main();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}\n\t\tSystem.out.println(pmClass.count);\n\t}\n\tpublic void calc(int a){\n\t\tboolean pm = true;\n\t\tif(a <= 1 || a % 2 == 0) {\n\t\t\tpm = false;\n\t\t}\n\t\tif(a == 2) {\n\t\t\tpm = true;\n\t\t}\n\t\tfor(int i = 3; i <= Math.sqrt(a); i += 2) {\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (pm) count++;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tint count;\n\tpublic static void main(String[] args) {\n\t\tMain pmClass = new Main();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}\n\t\tSystem.out.println(pmClass.count);\n\t}\n\tpublic void calc(int a){\n\t\tboolean pm = true;\n\t\tif(a <= 1 || a % 2 == 0) {\n\t\t\tpm = false;\n\t\t}\n\t\tif(a == 2) {\n\t\t\tpm = true;\n\t\t}\n\t\tfor(int i = 3; i <= Math.sqrt(a); i += 2) {\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (pm) count++;\n\t}\n}",
"Main",
"int count;",
"count",
"public static void main(String[] args) {\n\t\tMain pmClass = new Main();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}\n\t\tSystem.out.println(pmClass.count);\n\t}",
"main",
"{\n\t\tMain pmClass = new Main();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}\n\t\tSystem.out.println(pmClass.count);\n\t}",
"Main pmClass = new Main();",
"pmClass",
"new Main()",
"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\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}",
"{\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass.calc(array[i]);\n\t\t}",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"pmClass.calc(array[i])",
"pmClass.calc",
"pmClass",
"array[i]",
"array",
"i",
"System.out.println(pmClass.count)",
"System.out.println",
"System.out",
"System",
"System.out",
"pmClass.count",
"pmClass",
"pmClass.count",
"String[] args",
"args",
"public void calc(int a){\n\t\tboolean pm = true;\n\t\tif(a <= 1 || a % 2 == 0) {\n\t\t\tpm = false;\n\t\t}\n\t\tif(a == 2) {\n\t\t\tpm = true;\n\t\t}\n\t\tfor(int i = 3; i <= Math.sqrt(a); i += 2) {\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (pm) count++;\n\t}",
"calc",
"{\n\t\tboolean pm = true;\n\t\tif(a <= 1 || a % 2 == 0) {\n\t\t\tpm = false;\n\t\t}\n\t\tif(a == 2) {\n\t\t\tpm = true;\n\t\t}\n\t\tfor(int i = 3; i <= Math.sqrt(a); i += 2) {\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (pm) count++;\n\t}",
"boolean pm = true;",
"pm",
"true",
"if(a <= 1 || a % 2 == 0) {\n\t\t\tpm = false;\n\t\t}",
"a <= 1 || a % 2 == 0",
"a <= 1",
"a",
"1",
"a % 2 == 0",
"a % 2",
"a",
"2",
"0",
"{\n\t\t\tpm = false;\n\t\t}",
"pm = false",
"pm",
"false",
"if(a == 2) {\n\t\t\tpm = true;\n\t\t}",
"a == 2",
"a",
"2",
"{\n\t\t\tpm = true;\n\t\t}",
"pm = true",
"pm",
"true",
"for(int i = 3; i <= Math.sqrt(a); i += 2) {\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"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\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (a % i == 0) {\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"{\n\t\t\t\tpm = false;\n\t\t\t\tbreak;\n\t\t\t}",
"pm = false",
"pm",
"false",
"break;",
"if (pm) count++;",
"pm",
"count++",
"count",
"int a",
"a"
] | import java.util.Scanner;
class Main {
int count;
public static void main(String[] args) {
Main pmClass = new Main();
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();
pmClass.calc(array[i]);
}
System.out.println(pmClass.count);
}
public void calc(int a){
boolean pm = true;
if(a <= 1 || a % 2 == 0) {
pm = false;
}
if(a == 2) {
pm = true;
}
for(int i = 3; i <= Math.sqrt(a); i += 2) {
if (a % i == 0) {
pm = false;
break;
}
}
if (pm) count++;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
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,
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,
14,
4,
13,
4,
18,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
17,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
16,
42
],
[
42,
43
],
[
6,
44
],
[
44,
45
],
[
91,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
48,
57
],
[
57,
58
],
[
57,
59
],
[
48,
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
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
48,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
46,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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\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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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\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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"public static boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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}",
"x <= 1",
"x",
"1",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"{\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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 = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (x % i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (x % i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\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",
"return true;",
"true",
"int x",
"x",
"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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\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\tif (isPrime(sc.nextInt())) {\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 (isPrime(sc.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (isPrime(sc.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (isPrime(sc.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(sc.nextInt())",
"isPrime",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\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 boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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\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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\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 boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % 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\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\tfor (int i = 0; i < n; i++) {\n\t\t\tif (isPrime(sc.nextInt())) {\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.Scanner;
public class Main {
public static boolean isPrime(int x) {
if(x <= 1) {
return false;
} else {
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 count = 0;
for (int i = 0; i < n; i++) {
if (isPrime(sc.nextInt())) {
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,
41,
13,
4,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
13,
17,
30,
40,
13,
14,
2,
13,
17,
30,
3,
30,
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,
14,
2,
13,
17,
30,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
168,
8
],
[
168,
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
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
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
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
11,
56
],
[
56,
57
],
[
56,
58
],
[
11,
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
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
82,
94
],
[
94,
95
],
[
95,
96
],
[
82,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
75,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
127,
128
],
[
127,
129
],
[
117,
130
],
[
130,
131
],
[
131,
132
],
[
117,
133
],
[
134,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
136,
142
],
[
135,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
71,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
157,
158
],
[
11,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
9,
165
],
[
165,
166
],
[
0,
167
],
[
167,
168
],
[
167,
169
]
] | [
"import java.text.ParseException;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}\n}",
"import java.text.ParseException;",
"ParseException",
"java.text",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}\n}",
"Main",
"public static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int v1 = Integer.parseInt(line);",
"v1",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"int[] vs = new int[v1];",
"vs",
"new int[v1]",
"v1",
"for (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < v1",
"i",
"v1",
"i++",
"i++",
"i",
"{\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}",
"{\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}",
"String line2 = sc.nextLine();",
"line2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"vs[i] = Integer.parseInt(line2)",
"vs[i]",
"vs",
"i",
"Integer.parseInt(line2)",
"Integer.parseInt",
"Integer",
"line2",
"int sosuuc = 0;",
"sosuuc",
"0",
"for (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < v1",
"i",
"v1",
"i++",
"i++",
"i",
"{\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}",
"int count = 0;",
"count",
"0",
"if (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"vs[i] <= 10",
"vs[i]",
"vs",
"i",
"10",
"{\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"for (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= vs[i] /2",
"j",
"vs[i] /2",
"vs[i]",
"vs",
"i",
"2",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"if (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"vs[i] % j == 0",
"vs[i] % j",
"vs[i]",
"vs",
"i",
"j",
"0",
"{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"count++",
"count",
"if (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"count == 1",
"count",
"1",
"{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"break;",
"{\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"for (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= Math.sqrt(vs[i])",
"j",
"Math.sqrt(vs[i])",
"Math.sqrt",
"Math",
"vs[i]",
"vs",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"if (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"vs[i] % j == 0",
"vs[i] % j",
"vs[i]",
"vs",
"i",
"j",
"0",
"{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"count++",
"count",
"if (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"count == 1",
"count",
"1",
"{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"break;",
"if (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}",
"count == 0",
"count",
"0",
"{\n\t\t\t\tsosuuc++;\n\t\t\t}",
"sosuuc++",
"sosuuc",
"System.out.println(sosuuc)",
"System.out.println",
"System.out",
"System",
"System.out",
"sosuuc",
"String[] arges",
"arges",
"public class Main {\n\n\tpublic static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tString line2 = sc.nextLine();\n\t\t\tvs[i] = Integer.parseInt(line2);\n\t\t}\n\t\tint sosuuc = 0;\n\t\tfor (int i = 0; i < v1; i++) {\n\t\t\tint count = 0;\n\t\t\tif (vs[i] <= 10) {\n\n\t\t\t\tfor (int j = 2; j <= vs[i] /2; j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (int j = 2; j <= Math.sqrt(vs[i]); j++) {\n\t\t\t\t\tif (vs[i] % j == 0) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count == 0) {\n\t\t\t\tsosuuc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosuuc);\n\t}\n}",
"Main"
] | import java.text.ParseException;
import java.util.Scanner;
public class Main {
public static void main(String[] arges) throws ParseException {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
int v1 = Integer.parseInt(line);
int[] vs = new int[v1];
for (int i = 0; i < v1; i++) {
String line2 = sc.nextLine();
vs[i] = Integer.parseInt(line2);
}
int sosuuc = 0;
for (int i = 0; i < v1; i++) {
int count = 0;
if (vs[i] <= 10) {
for (int j = 2; j <= vs[i] /2; j++) {
if (vs[i] % j == 0) {
count++;
if (count == 1) {
break;
}
}
}
} else {
for (int j = 2; j <= Math.sqrt(vs[i]); j++) {
if (vs[i] % j == 0) {
count++;
if (count == 1) {
break;
}
}
}
}
if (count == 0) {
sosuuc++;
}
}
System.out.println(sosuuc);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
17,
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,
2,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
9,
11,
1,
41,
13,
2,
13,
13,
2,
13,
18,
13,
13,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
17,
42,
2,
40,
13,
17,
30,
0,
13,
8,
18,
13,
4,
18,
13,
17,
17,
4,
18,
18,
13,
13,
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
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
22,
23
],
[
22,
24
],
[
10,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
10,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
54,
56
],
[
45,
57
],
[
57,
58
],
[
58,
59
],
[
45,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
61,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
70,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
70,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
70,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
10,
93
],
[
93,
94
],
[
93,
95
],
[
10,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
104,
110
],
[
104,
111
],
[
10,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
6,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }",
"main",
"{\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }",
"try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }",
"{\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }",
"Scanner in = new Scanner(System.in)",
"Scanner in = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = in.nextInt();",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"boolean[] FURUI = new boolean[100_000_000 + 1];",
"FURUI",
"new boolean[100_000_000 + 1]",
"100_000_000 + 1",
"100_000_000",
"1",
"for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < FURUI.length",
"i",
"FURUI.length",
"FURUI",
"FURUI.length",
"i++",
"i++",
"i",
"{\n FURUI[i] = true;\n }",
"{\n FURUI[i] = true;\n }",
"FURUI[i] = true",
"FURUI[i]",
"FURUI",
"i",
"true",
"for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= FURUI.length",
"i * i",
"i",
"i",
"FURUI.length",
"FURUI",
"FURUI.length",
"i++",
"i++",
"i",
"{\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }",
"{\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }",
"if (FURUI[i] == false) {\n continue;\n }",
"FURUI[i] == false",
"FURUI[i]",
"FURUI",
"i",
"false",
"{\n continue;\n }",
"continue;",
"for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }",
"int j = i + i;",
"int j = i + i;",
"j",
"i + i",
"i",
"i",
"j < FURUI.length",
"j",
"FURUI.length",
"FURUI",
"FURUI.length",
"j += i",
"j += i",
"j",
"i",
"{\n FURUI[j] = false;\n }",
"{\n FURUI[j] = false;\n }",
"FURUI[j] = false",
"FURUI[j]",
"FURUI",
"j",
"false",
"int count = 0;",
"count",
"0",
"while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }",
"N-- > 0",
"N--",
"N",
"0",
"{\n count += FURUI[in.nextInt()] ? 1 : 0;\n }",
"count += FURUI[in.nextInt()] ? 1 : 0",
"count",
"FURUI[in.nextInt()] ? 1 : 0",
"FURUI[in.nextInt()]",
"FURUI",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"0",
"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 try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n FURUI[i] = true;\n }\n for (int i = 2; i * i <= FURUI.length; i++) {\n if (FURUI[i] == false) {\n continue;\n }\n for (int j = i + i; j < FURUI.length; j += i) {\n FURUI[j] = false;\n }\n }\n int count = 0;\n while (N-- > 0) {\n count += FURUI[in.nextInt()] ? 1 : 0;\n }\n System.out.println(count);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner in = new Scanner(System.in)) {
int N = in.nextInt();
boolean[] FURUI = new boolean[100_000_000 + 1];
for (int i = 2; i < FURUI.length; i++) {
FURUI[i] = true;
}
for (int i = 2; i * i <= FURUI.length; i++) {
if (FURUI[i] == false) {
continue;
}
for (int j = i + i; j < FURUI.length; j += i) {
FURUI[j] = false;
}
}
int count = 0;
while (N-- > 0) {
count += FURUI[in.nextInt()] ? 1 : 0;
}
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
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
],
[
100,
11
],
[
100,
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
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
49,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
49,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
64,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
49,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
14,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
12,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] | [
"import java.lang.*;\nimport java.io.*;\nimport java.math.*;\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }\n}",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }\n}",
"Main",
"public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }",
"main",
"{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br=new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"String nst = br.readLine();",
"nst",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(nst);",
"n",
"Integer.parseInt(nst)",
"Integer.parseInt",
"Integer",
"nst",
"int x",
"x",
"cnt=0;",
"cnt",
"0",
"for(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}",
"{\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}",
"boolean flag = true;",
"flag",
"true",
"nst = br.readLine()",
"nst",
"br.readLine()",
"br.readLine",
"br",
"x=Integer.parseInt(nst)",
"x",
"Integer.parseInt(nst)",
"Integer.parseInt",
"Integer",
"nst",
"for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;",
"int j=2;",
"int j=2;",
"j",
"2",
"j*j<=x",
"j*j",
"j",
"j",
"x",
"j++",
"j++",
"j",
"if(x%j==0)\n\t\t flag=false;",
"if(x%j==0)\n\t\t flag=false;",
"x%j==0",
"x%j",
"x",
"j",
"0",
"flag=false",
"flag",
"false",
"if(flag)\n\t\tcnt++;",
"flag",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }\n}",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst);\n\tint x,cnt=0;\n\tfor(int i=0;i<n;i++){\n\t boolean flag = true;\n\t nst = br.readLine();\n\t x=Integer.parseInt(nst);\n\t for(int j=2;j*j<=x;j++)\n\t\tif(x%j==0)\n\t\t flag=false;\n\t if(flag)\n\t\tcnt++;\n\t}\n\tSystem.out.println(cnt);\n }\n}",
"Main"
] | import java.lang.*;
import java.io.*;
import java.math.*;
public class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
String nst = br.readLine();
int n = Integer.parseInt(nst);
int x,cnt=0;
for(int i=0;i<n;i++){
boolean flag = true;
nst = br.readLine();
x=Integer.parseInt(nst);
for(int j=2;j*j<=x;j++)
if(x%j==0)
flag=false;
if(flag)
cnt++;
}
System.out.println(cnt);
}
} |
[
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
13,
18,
13,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
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
],
[
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,
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
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
8,
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
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
67,
77
],
[
77,
78
],
[
77,
79
],
[
62,
80
],
[
80,
81
],
[
81,
82
],
[
62,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
85,
93
],
[
93,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"Main",
"public static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}",
"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\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"num[i]=sc.nextInt()",
"num[i]",
"num",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int div;",
"div",
"int counter=0;",
"counter",
"0",
"for (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"{\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"div =0",
"div",
"0",
"for (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"int j=2;",
"int j=2;",
"j",
"2",
"j<=(double)Math.pow(num[i],0.5) && div ==0",
"j<=(double)Math.pow(num[i],0.5)",
"j",
"(double)Math.pow(num[i],0.5)",
"Math.pow",
"Math",
"num[i]",
"num",
"i",
"0.5",
"div ==0",
"div",
"0",
"++j",
"++j",
"j",
"{\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"{\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"if (num[i]%j == 0) ++div;",
"num[i]%j == 0",
"num[i]%j",
"num[i]",
"num",
"i",
"j",
"0",
"++div",
"div",
"if (div==0) ++counter;",
"div==0",
"div",
"0",
"++counter",
"counter",
"System.out.println(counter)",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"String args[]",
"args",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tfor (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\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=sc.nextInt();
int num[]= new int[n];
for (int i=0;i<n;++i){
num[i]=sc.nextInt();
}
int div;
int counter=0;
for (int i=0;i<n;++i){
div =0;
for (int j=2;j<=(double)Math.pow(num[i],0.5) && div ==0;++j){
if (num[i]%j == 0) ++div;
}
if (div==0) ++counter;
}
System.out.println(counter);
}
}
|
[
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,
14,
4,
13,
4,
18,
13,
30,
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,
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
],
[
105,
5
],
[
105,
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
],
[
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
],
[
105,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
52,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
63,
73
],
[
73,
74
],
[
52,
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
],
[
87,
89
],
[
75,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
52,
100
],
[
100,
101
],
[
50,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }\n\n public static boolean Check(int a)\n {\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }\n\n public static boolean Check(int a)\n {\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int Count=0;",
"Count",
"0",
"int count_num=scan.nextInt();",
"count_num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<count_num",
"j",
"count_num",
"j++",
"j++",
"j",
"{\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }",
"{\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }",
"if(Check(scan.nextInt()))\n {\n Count++;\n }",
"Check(scan.nextInt())",
"Check",
"scan.nextInt()",
"scan.nextInt",
"scan",
"{\n Count++;\n }",
"Count++",
"Count",
"System.out.println(Count)",
"System.out.println",
"System.out",
"System",
"System.out",
"Count",
"String[] args",
"args",
"public static boolean Check(int a)\n {\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }",
"Check",
"{\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }",
"if(a==2 || a==3) return true;",
"a==2 || a==3",
"a==2",
"a",
"2",
"a==3",
"a",
"3",
"return true;",
"true",
"if(a<=3 || a%2==0) return false;",
"a<=3 || a%2==0",
"a<=3",
"a",
"3",
"a%2==0",
"a%2",
"a",
"2",
"0",
"return false;",
"false",
"for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }",
"int i=3;",
"int i=3;",
"i",
"3",
"i<=Math.sqrt((double)a)",
"i",
"Math.sqrt((double)a)",
"Math.sqrt",
"Math",
"(double)a",
"i+=2",
"i+=2",
"i",
"2",
"{\n if(a%i==0) return false;\n }",
"{\n if(a%i==0) return false;\n }",
"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\n public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }\n\n public static boolean Check(int a)\n {\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n Count++;\n }\n }\n\n System.out.println(Count);\n }\n\n public static boolean Check(int a)\n {\n if(a==2 || a==3) return true;\n if(a<=3 || a%2==0) return false;\n for(int i=3;i<=Math.sqrt((double)a);i+=2)\n {\n if(a%i==0) return false;\n }\n return true;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
int Count=0;
int count_num=scan.nextInt();
for(int j=0;j<count_num;j++){
if(Check(scan.nextInt()))
{
Count++;
}
}
System.out.println(Count);
}
public static boolean Check(int a)
{
if(a==2 || a==3) return true;
if(a<=3 || a%2==0) return false;
for(int i=3;i<=Math.sqrt((double)a);i+=2)
{
if(a%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,
20,
41,
13,
20,
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,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
18,
13,
13,
0,
13,
18,
13,
13,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
18,
13,
13,
40,
13,
4,
18,
13,
13,
4,
18,
13,
12,
13,
30,
4,
18,
20,
23,
13,
6,
13,
41,
13,
17,
41,
13,
20,
13,
41,
13,
17,
41,
13,
20,
13,
41,
13,
17,
12,
13,
30,
14,
2,
2,
13,
13,
13,
30,
37,
20,
14,
2,
13,
13,
30,
29,
4,
13,
13,
30,
29,
40,
18,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
37,
20,
14,
2,
13,
13,
29,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
13,
30,
0,
18,
13,
40,
13,
13,
30,
0,
18,
13,
13,
17,
0,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
3,
14,
2,
2,
13,
18,
13,
13,
17,
30,
0,
13,
17,
3,
30,
0,
13,
2,
13,
18,
13,
13,
29,
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
],
[
275,
14
],
[
275,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
17,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
35,
37
],
[
17,
39
],
[
39,
40
],
[
39,
41
],
[
17,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
65,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
17,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
17,
80
],
[
80,
81
],
[
80,
82
],
[
17,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
96,
103
],
[
103,
104
],
[
17,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
17,
109
],
[
109,
110
],
[
110,
111
],
[
275,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
112,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
120,
129
],
[
129,
130
],
[
129,
131
],
[
120,
132
],
[
132,
133
],
[
132,
134
],
[
120,
136
],
[
136,
137
],
[
136,
138
],
[
120,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
142,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
151,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
139,
166
],
[
166,
167
],
[
120,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
175,
176
],
[
170,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
170,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
186,
188
],
[
182,
189
],
[
189,
190
],
[
189,
191
],
[
182,
192
],
[
192,
193
],
[
193,
194
],
[
182,
195
],
[
196,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
202,
207
],
[
197,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
170,
214
],
[
214,
215
],
[
214,
216
],
[
168,
217
],
[
217,
218
],
[
120,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
225,
226
],
[
225,
227
],
[
221,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
228,
233
],
[
233,
234
],
[
233,
235
],
[
228,
236
],
[
236,
237
],
[
237,
238
],
[
228,
239
],
[
240,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
244,
246
],
[
241,
247
],
[
247,
248
],
[
241,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
253,
255
],
[
250,
256
],
[
249,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
249,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
267,
269
],
[
221,
270
],
[
270,
271
],
[
219,
272
],
[
272,
273
],
[
0,
274
],
[
274,
275
],
[
274,
276
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n \npublic class Main {\n\tpublic void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }\n\n public static void main(String[] args) throws IOException {\n new Main().exec();\n }\n}\n\nclass Prime {\n\tprivate static final int CAPACITY = 10001;\n\tprivate boolean[] isNotPrime = new boolean[CAPACITY];\n\tprivate int checkMax = 1;\n\tprivate int[] primes = new int[CAPACITY];\n\tprivate int ptrPrimes = 0;\n\t\n\tpublic boolean isPrime(int n) {\n\t\tif(CAPACITY*CAPACITY <= n) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}\n\t}\n\t\n\tpublic void checkPrime(int target) {\n\t\tif(CAPACITY<target) throw new IllegalArgumentException();\n\t\tif(target<checkMax) return;\n\t\tfor(int i=checkMax+1; i<=target; i++) {\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}\n\t\tcheckMax=target;\n\t}\n\t\n\tpublic boolean checkPrimeSub(int i) {\n\t\tboolean isPrime = true;\n\t\tint maxPrime = i;\n\t\tfor(int j=0; j<ptrPrimes; j++) {\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\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.PrintWriter;",
"PrintWriter",
"java.io",
"public class Main {\n\tpublic void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }\n\n public static void main(String[] args) throws IOException {\n new Main().exec();\n }\n}",
"Main",
"public void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }",
"exec",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"Prime p = new Prime();",
"p",
"new Prime()",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] v = new int[n];",
"v",
"new int[n]",
"n",
"int max = 0;",
"max",
"0",
"for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }",
"{\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }",
"v[i] = Integer.parseInt(br.readLine())",
"v[i]",
"v",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(max < v[i])\n \t\tmax=v[i];",
"max < v[i]",
"max",
"v[i]",
"v",
"i",
"max=v[i]",
"max",
"v[i]",
"v",
"i",
"p.checkPrime(10000)",
"p.checkPrime",
"p",
"10000",
"int countPrime = 0;",
"countPrime",
"0",
"for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }",
"{\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }",
"if(p.isPrime(v[i]))\n \t\tcountPrime++;",
"p.isPrime(v[i])",
"p.isPrime",
"p",
"v[i]",
"v",
"i",
"countPrime++",
"countPrime",
"out.println(countPrime)",
"out.println",
"out",
"countPrime",
"out.flush()",
"out.flush",
"out",
"public static void main(String[] args) throws IOException {\n new Main().exec();\n }",
"main",
"{\n new Main().exec();\n }",
"new Main().exec()",
"new Main().exec",
"new Main()",
"String[] args",
"args",
"class Prime {\n\tprivate static final int CAPACITY = 10001;\n\tprivate boolean[] isNotPrime = new boolean[CAPACITY];\n\tprivate int checkMax = 1;\n\tprivate int[] primes = new int[CAPACITY];\n\tprivate int ptrPrimes = 0;\n\t\n\tpublic boolean isPrime(int n) {\n\t\tif(CAPACITY*CAPACITY <= n) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}\n\t}\n\t\n\tpublic void checkPrime(int target) {\n\t\tif(CAPACITY<target) throw new IllegalArgumentException();\n\t\tif(target<checkMax) return;\n\t\tfor(int i=checkMax+1; i<=target; i++) {\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}\n\t\tcheckMax=target;\n\t}\n\t\n\tpublic boolean checkPrimeSub(int i) {\n\t\tboolean isPrime = true;\n\t\tint maxPrime = i;\n\t\tfor(int j=0; j<ptrPrimes; j++) {\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}\n}",
"Prime",
"private static final int CAPACITY = 10001;",
"CAPACITY",
"10001",
"private boolean[] isNotPrime = new boolean[CAPACITY];",
"isNotPrime",
"new boolean[CAPACITY]",
"CAPACITY",
"private int checkMax = 1;",
"checkMax",
"1",
"private int[] primes = new int[CAPACITY];",
"primes",
"new int[CAPACITY]",
"CAPACITY",
"private int ptrPrimes = 0;",
"ptrPrimes",
"0",
"public boolean isPrime(int n) {\n\t\tif(CAPACITY*CAPACITY <= n) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}\n\t}",
"isPrime",
"{\n\t\tif(CAPACITY*CAPACITY <= n) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}\n\t}",
"if(CAPACITY*CAPACITY <= n) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}",
"CAPACITY*CAPACITY <= n",
"CAPACITY*CAPACITY",
"CAPACITY",
"CAPACITY",
"n",
"{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}",
"throw new IllegalArgumentException();",
"new IllegalArgumentException()",
"if(CAPACITY <= n){\n\t\t\treturn checkPrimeSub(n);\n\t\t}else{\n\t\t\treturn !isNotPrime[n];\n\t\t}",
"CAPACITY <= n",
"CAPACITY",
"n",
"{\n\t\t\treturn checkPrimeSub(n);\n\t\t}",
"return checkPrimeSub(n);",
"checkPrimeSub(n)",
"checkPrimeSub",
"n",
"{\n\t\t\treturn !isNotPrime[n];\n\t\t}",
"return !isNotPrime[n];",
"!isNotPrime[n]",
"isNotPrime[n]",
"isNotPrime",
"n",
"int n",
"n",
"public void checkPrime(int target) {\n\t\tif(CAPACITY<target) throw new IllegalArgumentException();\n\t\tif(target<checkMax) return;\n\t\tfor(int i=checkMax+1; i<=target; i++) {\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}\n\t\tcheckMax=target;\n\t}",
"checkPrime",
"{\n\t\tif(CAPACITY<target) throw new IllegalArgumentException();\n\t\tif(target<checkMax) return;\n\t\tfor(int i=checkMax+1; i<=target; i++) {\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}\n\t\tcheckMax=target;\n\t}",
"if(CAPACITY<target) throw new IllegalArgumentException();",
"CAPACITY<target",
"CAPACITY",
"target",
"throw new IllegalArgumentException();",
"new IllegalArgumentException()",
"if(target<checkMax) return;",
"target<checkMax",
"target",
"checkMax",
"return;",
"for(int i=checkMax+1; i<=target; i++) {\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}",
"int i=checkMax+1;",
"int i=checkMax+1;",
"i",
"checkMax+1",
"checkMax",
"1",
"i<=target",
"i",
"target",
"i++",
"i++",
"i",
"{\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}\n\t\t}",
"if (checkPrimeSub(i)) {\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t} else {\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}",
"checkPrimeSub(i)",
"checkPrimeSub",
"i",
"{\n\t\t\t\tprimes[ptrPrimes++]=i;\n\t\t\t}",
"primes[ptrPrimes++]=i",
"primes[ptrPrimes++]",
"primes",
"ptrPrimes++",
"ptrPrimes",
"i",
"{\n\t\t\t\tisNotPrime[i]=true;\n\t\t\t}",
"isNotPrime[i]=true",
"isNotPrime[i]",
"isNotPrime",
"i",
"true",
"checkMax=target",
"checkMax",
"target",
"int target",
"target",
"public boolean checkPrimeSub(int i) {\n\t\tboolean isPrime = true;\n\t\tint maxPrime = i;\n\t\tfor(int j=0; j<ptrPrimes; j++) {\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}",
"checkPrimeSub",
"{\n\t\tboolean isPrime = true;\n\t\tint maxPrime = i;\n\t\tfor(int j=0; j<ptrPrimes; j++) {\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}\n\t\treturn isPrime;\n\t}",
"boolean isPrime = true;",
"isPrime",
"true",
"int maxPrime = i;",
"maxPrime",
"i",
"for(int j=0; j<ptrPrimes; j++) {\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<ptrPrimes",
"j",
"ptrPrimes",
"j++",
"j++",
"j",
"{\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}\n\t\t}",
"if(maxPrime <= primes[j]){\n\t\t\t\tbreak;\n\t\t\t}else if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}",
"maxPrime <= primes[j]",
"maxPrime",
"primes[j]",
"primes",
"j",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"if(i % primes[j] == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}",
"i % primes[j] == 0",
"i % primes[j]",
"i",
"primes[j]",
"primes",
"j",
"0",
"{\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"{\n\t\t\t\tmaxPrime = i / primes[j];\n\t\t\t}",
"maxPrime = i / primes[j]",
"maxPrime",
"i / primes[j]",
"i",
"primes[j]",
"primes",
"j",
"return isPrime;",
"isPrime",
"int i",
"i",
"public class Main {\n\tpublic void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }\n\n public static void main(String[] args) throws IOException {\n new Main().exec();\n }\n}",
"public class Main {\n\tpublic void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n Prime p = new Prime();\n int n = Integer.parseInt(br.readLine());\n int[] v = new int[n];\n int max = 0;\n for(int i=0; i<n; i++) {\n \tv[i] = Integer.parseInt(br.readLine());\n \tif(max < v[i])\n \t\tmax=v[i];\n }\n p.checkPrime(10000);\n int countPrime = 0;\n for(int i=0; i<n; i++) {\n \tif(p.isPrime(v[i]))\n \t\tcountPrime++;\n }\n out.println(countPrime);\n out.flush();\n }\n\n public static void main(String[] args) throws IOException {\n new Main().exec();\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public void exec() throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
Prime p = new Prime();
int n = Integer.parseInt(br.readLine());
int[] v = new int[n];
int max = 0;
for(int i=0; i<n; i++) {
v[i] = Integer.parseInt(br.readLine());
if(max < v[i])
max=v[i];
}
p.checkPrime(10000);
int countPrime = 0;
for(int i=0; i<n; i++) {
if(p.isPrime(v[i]))
countPrime++;
}
out.println(countPrime);
out.flush();
}
public static void main(String[] args) throws IOException {
new Main().exec();
}
}
class Prime {
private static final int CAPACITY = 10001;
private boolean[] isNotPrime = new boolean[CAPACITY];
private int checkMax = 1;
private int[] primes = new int[CAPACITY];
private int ptrPrimes = 0;
public boolean isPrime(int n) {
if(CAPACITY*CAPACITY <= n) {
throw new IllegalArgumentException();
}else if(CAPACITY <= n){
return checkPrimeSub(n);
}else{
return !isNotPrime[n];
}
}
public void checkPrime(int target) {
if(CAPACITY<target) throw new IllegalArgumentException();
if(target<checkMax) return;
for(int i=checkMax+1; i<=target; i++) {
if (checkPrimeSub(i)) {
primes[ptrPrimes++]=i;
} else {
isNotPrime[i]=true;
}
}
checkMax=target;
}
public boolean checkPrimeSub(int i) {
boolean isPrime = true;
int maxPrime = i;
for(int j=0; j<ptrPrimes; j++) {
if(maxPrime <= primes[j]){
break;
}else if(i % primes[j] == 0) {
isPrime = false;
break;
}else{
maxPrime = i / primes[j];
}
}
return isPrime;
}
} |
[
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,
13,
4,
18,
13,
23,
13,
12,
13,
30,
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,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
30,
29,
13,
14,
2,
2,
13,
17,
17,
30,
0,
13,
17,
29,
13,
30,
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,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
148,
5
],
[
148,
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
],
[
46,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
6,
53
],
[
53,
54
],
[
148,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
57,
83
],
[
83,
84
],
[
55,
85
],
[
85,
86
],
[
55,
87
],
[
87,
88
],
[
148,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
95,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
102,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
115,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
115,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
132,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
114,
143
],
[
143,
144
],
[
89,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
]
] | [
"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[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n));\n\t\tsc.close();\n\t}\n\n\tpublic static int count(int[] numbers, int n) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}\n\n\tpublic static boolean primeNumbers(int num) {\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\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[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n));\n\t\tsc.close();\n\t}\n\n\tpublic static int count(int[] numbers, int n) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}\n\n\tpublic static boolean primeNumbers(int num) {\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\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[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n));\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, 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[] numbers = new int[n];",
"numbers",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}",
"numbers[i] = sc.nextInt()",
"numbers[i]",
"numbers",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(count(numbers, n))",
"System.out.println",
"System.out",
"System",
"System.out",
"count(numbers, n)",
"count",
"numbers",
"n",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public static int count(int[] numbers, int n) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}",
"count",
"{\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[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 (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}",
"primeNumbers(numbers[i])",
"primeNumbers",
"numbers[i]",
"numbers",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"return count;",
"count",
"int[] numbers",
"numbers",
"int n",
"n",
"public static boolean primeNumbers(int num) {\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\n\t}",
"primeNumbers",
"{\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\n\t}",
"boolean flag = true;",
"flag",
"true",
"if (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\treturn flag;\n\t\t}",
"return flag;",
"flag",
"if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t}",
"flag = false",
"flag",
"false",
"return flag;",
"flag",
"{\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}",
"for (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = 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 <= Math.sqrt(num)",
"i",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = 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\tflag = 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\tflag = 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\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag = false",
"flag",
"false",
"break;",
"return flag;",
"flag",
"int 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[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n));\n\t\tsc.close();\n\t}\n\n\tpublic static int count(int[] numbers, int n) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}\n\n\tpublic static boolean primeNumbers(int num) {\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\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[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n));\n\t\tsc.close();\n\t}\n\n\tpublic static int count(int[] numbers, int n) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeNumbers(numbers[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}\n\n\tpublic static boolean primeNumbers(int num) {\n\t\tboolean flag = true;\n\t\tif (num == 2) {\n\t\t\treturn flag;\n\t\t} else if (num % 2 == 0) {\n\t\t\tflag = false;\n\t\t\treturn flag;\n\t\t} else {\n\t\t\tfor (int i = 3; i <= Math.sqrt(num); i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn flag;\n\t\t}\n\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[] numbers = new int[n];
for (int i = 0; i < n; i++) {
numbers[i] = sc.nextInt();
}
System.out.println(count(numbers, n));
sc.close();
}
public static int count(int[] numbers, int n) {
int count = 0;
for (int i = 0; i < n; i++) {
if (primeNumbers(numbers[i])) {
count++;
}
}
return count;
}
public static boolean primeNumbers(int num) {
boolean flag = true;
if (num == 2) {
return flag;
} else if (num % 2 == 0) {
flag = false;
return flag;
} else {
for (int i = 3; i <= Math.sqrt(num); i += 2) {
if (num % i == 0) {
flag = false;
break;
}
}
return flag;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
0,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
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,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
2,
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
],
[
154,
5
],
[
154,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
8,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
34,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
6,
96
],
[
96,
97
],
[
154,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
108,
118
],
[
118,
119
],
[
119,
120
],
[
100,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
121,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
121,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
140,
146
],
[
146,
147
],
[
147,
148
],
[
100,
149
],
[
149,
150
],
[
98,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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\tpublic static boolean isPrime (int number) {\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}\n\t\n\t\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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\tpublic static boolean isPrime (int number) {\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}\n\t\n\t\n\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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 in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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 in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"ArrayList<String> str = new ArrayList<String>();",
"str",
"new ArrayList<String>()",
"while(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}",
"in.hasNext()",
"in.hasNext",
"in",
"{\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}",
"String buf = in.nextLine();",
"buf",
"in.nextLine()",
"in.nextLine",
"in",
"str.add(buf)",
"str.add",
"str",
"buf",
"int facter[];",
"facter",
"facter = new int[str.size()]",
"facter",
"new int[str.size()]",
"str.size()",
"str.size",
"str",
"for (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < str.size()",
"i",
"str.size()",
"str.size",
"str",
"i++",
"i++",
"i",
"{\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}",
"{\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}",
"facter[i] = Integer.parseInt(str.get(i))",
"facter[i]",
"facter",
"i",
"Integer.parseInt(str.get(i))",
"Integer.parseInt",
"Integer",
"str.get(i)",
"str.get",
"str",
"i",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < facter.length",
"i",
"facter.length",
"facter",
"facter.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (isPrime(facter[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (isPrime(facter[i])) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (isPrime(facter[i])) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(facter[i])",
"isPrime",
"facter[i]",
"facter",
"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 static boolean isPrime (int number) {\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}",
"if (number == 2) {\n\t\t\treturn true;\n\t\t}",
"number == 2",
"number",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}",
"(number < 2) || ((number % 2) == 0)",
"(number < 2)",
"number",
"2",
"((number % 2) == 0)",
"(number % 2)",
"number",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\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 = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"if ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}",
"(number % i) == 0",
"(number % i)",
"number",
"i",
"0",
"{\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int number",
"number",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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\tpublic static boolean isPrime (int number) {\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}\n\t\n\t\n\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new int[str.size()];\n\n\t\tfor (int i = 0; i < str.size(); i++) {\n\t\t\tfacter[i] = Integer.parseInt(str.get(i));\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor (int i = 0; i < facter.length; i++) {\n\t\t\tif (isPrime(facter[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\tpublic static boolean isPrime (int number) {\n\t\tif (number == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif ((number < 2) || ((number % 2) == 0)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {\n\t\t\tif ((number % i) == 0) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}\n\t\n\t\n\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
ArrayList<String> str = new ArrayList<String>();
while(in.hasNext()) {
String buf = in.nextLine();
str.add(buf);
}
int facter[];
facter = new int[str.size()];
for (int i = 0; i < str.size(); i++) {
facter[i] = Integer.parseInt(str.get(i));
}
int count = 0;
for (int i = 0; i < facter.length; i++) {
if (isPrime(facter[i])) {
count++;
}
}
System.out.println(count);
}
public static boolean isPrime (int number) {
if (number == 2) {
return true;
}
if ((number < 2) || ((number % 2) == 0)) {
return false;
}
for (int i = 3; i <= Math.sqrt(number); i = i + 2 ) {
if ((number % i) == 0) {
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
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,
4,
18,
13,
13,
41,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
17,
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,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
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
],
[
17,
20
],
[
20,
21
],
[
21,
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
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
35,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
35,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
55,
66
],
[
35,
67
],
[
67,
68
],
[
67,
69
],
[
35,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
35,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
6,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"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 count=0;\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\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 count=0;\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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 = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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 = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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 = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"String s=sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int num=Integer.parseInt(s);",
"num",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"double numDouble=Double.parseDouble(s);",
"numDouble",
"Double.parseDouble(s)",
"Double.parseDouble",
"Double",
"s",
"int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;",
"divor",
"Math.round(Math.round(Math.sqrt(numDouble)))+1",
"Math.round(Math.round(Math.sqrt(numDouble)))",
"Math.round",
"Math",
"Math.round(Math.sqrt(numDouble))",
"Math.round",
"Math",
"Math.sqrt(numDouble)",
"Math.sqrt",
"Math",
"numDouble",
"1",
"boolean f=true;",
"f",
"true",
"for(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j=2;",
"int j=2;",
"j",
"2",
"j<divor",
"j",
"divor",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\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\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"num%j==0",
"num%j",
"num",
"j",
"0",
"{\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"f=false",
"f",
"false",
"break;",
"if(f){\n\t\t\t\tcount++;\n\t\t\t}",
"f",
"{\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 = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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 = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDouble=Double.parseDouble(s);\n\t\t\tint divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;\n\t\t\tboolean f=true;\n\t\t\tfor(int j=2;j<divor;j++){\n\t\t\t\tif(num%j==0){\n\t\t\t\t\tf=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(f){\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.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count=0;
int n = Integer.parseInt(sc.nextLine());
for(int i=0;i<n;i++){
String s=sc.nextLine();
int num=Integer.parseInt(s);
double numDouble=Double.parseDouble(s);
int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
boolean f=true;
for(int j=2;j<divor;j++){
if(num%j==0){
f=false;
break;
}
}
if(f){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
4,
13,
13,
14,
13,
30,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
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
] | [
[
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
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
41,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
6,
52
],
[
52,
53
],
[
4,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
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
],
[
56,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
56,
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
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
56,
105
],
[
105,
106
],
[
54,
107
],
[
107,
108
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint count = 0;\n\t\tint prime_num = 0;\n\t\tboolean prime = false;\n\t\t\n\t\twhile( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}\n\n\t\t System.out.println(prime_num);\n\t\t\n\t\tscanner.close();\n\t}\n\n\tpublic static boolean isPrime(Scanner scanner) {\n\t\tint num = scanner.nextInt();//要素数\n\t\t\n\t if (num == 2) return true;\n\t else if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\t\n\t double sqrtNum = Math.sqrt(num);\n\t for (int i = 3; i <= sqrtNum; i += 2)\n\t {\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }\n\t\n\t // 素数である\n\t return true;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint count = 0;\n\t\tint prime_num = 0;\n\t\tboolean prime = false;\n\t\t\n\t\twhile( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}\n\n\t\t System.out.println(prime_num);\n\t\t\n\t\tscanner.close();\n\t}\n\n\tpublic static boolean isPrime(Scanner scanner) {\n\t\tint num = scanner.nextInt();//要素数\n\t\t\n\t if (num == 2) return true;\n\t else if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\t\n\t double sqrtNum = Math.sqrt(num);\n\t for (int i = 3; i <= sqrtNum; i += 2)\n\t {\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }\n\t\n\t // 素数である\n\t return true;\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint count = 0;\n\t\tint prime_num = 0;\n\t\tboolean prime = false;\n\t\t\n\t\twhile( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}\n\n\t\t System.out.println(prime_num);\n\t\t\n\t\tscanner.close();\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint count = 0;\n\t\tint prime_num = 0;\n\t\tboolean prime = false;\n\t\t\n\t\twhile( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}\n\n\t\t System.out.println(prime_num);\n\t\t\n\t\tscanner.close();\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int num = scanner.nextInt();",
"num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int count = 0;",
"count",
"0",
"int prime_num = 0;",
"prime_num",
"0",
"boolean prime = false;",
"prime",
"false",
"while( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}",
"count < num",
"count",
"num",
"{\n\t\t\tprime = isPrime(scanner);\n\t\t\tif( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}\n\t\t\tcount ++;\n\t\t}",
"prime = isPrime(scanner)",
"prime",
"isPrime(scanner)",
"isPrime",
"scanner",
"if( prime ) {\n\t\t\t\tprime_num ++;\n\t\t\t}",
"prime",
"{\n\t\t\t\tprime_num ++;\n\t\t\t}",
"prime_num ++",
"prime_num",
"count ++",
"count",
"System.out.println(prime_num)",
"System.out.println",
"System.out",
"System",
"System.out",
"prime_num",
"scanner.close()",
"scanner.close",
"scanner",
"String args[]",
"args",
"public static boolean isPrime(Scanner scanner) {\n\t\tint num = scanner.nextInt();//要素数\n\t\t\n\t if (num == 2) return true;\n\t else if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\t\n\t double sqrtNum = Math.sqrt(num);\n\t for (int i = 3; i <= sqrtNum; i += 2)\n\t {\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }\n\t\n\t // 素数である\n\t return true;\n\t}",
"isPrime",
"{\n\t\tint num = scanner.nextInt();//要素数\n\t\t\n\t if (num == 2) return true;\n\t else if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\t\n\t double sqrtNum = Math.sqrt(num);\n\t for (int i = 3; i <= sqrtNum; i += 2)\n\t {\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }\n\t\n\t // 素数である\n\t return true;\n\t}",
"int num = scanner.nextInt();",
"num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if (num == 2) return true;\n\t else if (num % 2 == 0) return false; // 偶数はあらかじめ除く",
"num == 2",
"num",
"2",
"return true;",
"true",
"if (num % 2 == 0) 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\t {\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrtNum",
"i",
"sqrtNum",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }",
"{\n\t if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }\n\t }",
"if (num % i == 0)\n\t {\n\t // 素数ではない\n\t return false;\n\t }",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\t // 素数ではない\n\t return false;\n\t }",
"return false;",
"false",
"return true;",
"true",
"Scanner scanner",
"scanner"
] | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();//要素数
int count = 0;
int prime_num = 0;
boolean prime = false;
while( count < num ) {
prime = isPrime(scanner);
if( prime ) {
prime_num ++;
}
count ++;
}
System.out.println(prime_num);
scanner.close();
}
public static boolean isPrime(Scanner scanner) {
int num = scanner.nextInt();//要素数
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,
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,
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
] | [
[
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
],
[
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
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
6,
56
],
[
56,
57
],
[
4,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
64,
63
],
[
71,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
71,
71
],
[
71,
72
],
[
71,
73
],
[
64,
74
],
[
74,
75
],
[
74,
76
],
[
61,
77
],
[
77,
78
],
[
78,
79
],
[
60,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
60,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
89,
100
],
[
100,
101
],
[
101,
102
],
[
89,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
105,
111
],
[
111,
112
],
[
112,
113
],
[
60,
114
],
[
114,
115
],
[
58,
116
],
[
116,
117
]
] | [
"import java.io.*;\n\nclass Main{\n\n\npublic 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 answer = 0;\n for(int i = 0;i < n; i++){\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }\n System.out.println(answer);\n }\n\nprivate static boolean isPrime(int numb){\n if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {\n\t return true;\n\t }\n if(numb % 2 == 0) {\n\t return false;\n\t }\n for(int j=3;j <= Math.sqrt(numb);j++){\n if(numb % j == 0){ \n return false;}\n }\n return true;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\n\npublic 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 answer = 0;\n for(int i = 0;i < n; i++){\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }\n System.out.println(answer);\n }\n\nprivate static boolean isPrime(int numb){\n if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {\n\t return true;\n\t }\n if(numb % 2 == 0) {\n\t return false;\n\t }\n for(int j=3;j <= Math.sqrt(numb);j++){\n if(numb % j == 0){ \n return false;}\n }\n return true;\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 answer = 0;\n for(int i = 0;i < n; i++){\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }\n System.out.println(answer);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int answer = 0;\n for(int i = 0;i < n; i++){\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }\n System.out.println(answer);\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 answer = 0;",
"answer",
"0",
"for(int i = 0;i < n; i++){\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }",
"{\n int number = Integer.parseInt(br.readLine());\n if(isPrime(number)) answer++;\n }",
"int number = Integer.parseInt(br.readLine());",
"number",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(isPrime(number)) answer++;",
"isPrime(number)",
"isPrime",
"number",
"answer++",
"answer",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"private static boolean isPrime(int numb){\n if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {\n\t return true;\n\t }\n if(numb % 2 == 0) {\n\t return false;\n\t }\n for(int j=3;j <= Math.sqrt(numb);j++){\n if(numb % j == 0){ \n return false;}\n }\n return true;\n }",
"isPrime",
"{\n if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {\n\t return true;\n\t }\n if(numb % 2 == 0) {\n\t return false;\n\t }\n for(int j=3;j <= Math.sqrt(numb);j++){\n if(numb % j == 0){ \n return false;}\n }\n return true;\n }",
"if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {\n\t return true;\n\t }",
"numb == 2 || numb == 3 || numb == 5 || numb == 7",
"numb == 5",
"numb == 2 || numb == 3 || numb == 5 || numb == 7",
"numb == 2",
"numb",
"2",
"numb == 3",
"numb",
"3",
"numb == 5",
"numb",
"5",
"numb == 7",
"numb",
"7",
"{\n\t return true;\n\t }",
"return true;",
"true",
"if(numb % 2 == 0) {\n\t return false;\n\t }",
"numb % 2 == 0",
"numb % 2",
"numb",
"2",
"0",
"{\n\t return false;\n\t }",
"return false;",
"false",
"for(int j=3;j <= Math.sqrt(numb);j++){\n if(numb % j == 0){ \n return false;}\n }",
"int j=3;",
"int j=3;",
"j",
"3",
"j <= Math.sqrt(numb)",
"j",
"Math.sqrt(numb)",
"Math.sqrt",
"Math",
"numb",
"j++",
"j++",
"j",
"{\n if(numb % j == 0){ \n return false;}\n }",
"{\n if(numb % j == 0){ \n return false;}\n }",
"if(numb % j == 0){ \n return false;}",
"numb % j == 0",
"numb % j",
"numb",
"j",
"0",
"{ \n return false;}",
"return false;",
"false",
"return true;",
"true",
"int numb",
"numb"
] | import java.io.*;
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 answer = 0;
for(int i = 0;i < n; i++){
int number = Integer.parseInt(br.readLine());
if(isPrime(number)) answer++;
}
System.out.println(answer);
}
private static boolean isPrime(int numb){
if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
return true;
}
if(numb % 2 == 0) {
return false;
}
for(int j=3;j <= Math.sqrt(numb);j++){
if(numb % j == 0){
return false;}
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
42,
17,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
13,
14,
2,
40,
13,
13,
3,
4,
18,
18,
13,
13,
4,
18,
13,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
14,
2,
2,
2,
18,
13,
13,
17,
17,
2,
18,
13,
13,
17,
30,
0,
13,
17,
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,
2,
13,
2,
18,
13,
13,
17,
40,
13,
29,
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
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
13,
18
],
[
9,
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
],
[
35,
37
],
[
19,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
40,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
54,
59
],
[
19,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
6,
71
],
[
71,
72
],
[
4,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
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
],
[
79,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
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
],
[
97,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
97,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
126,
128
],
[
116,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
116,
133
],
[
134,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
136,
142
],
[
135,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
93,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
148,
156
],
[
156,
157
],
[
75,
158
],
[
158,
159
],
[
73,
160
],
[
160,
161
]
] | [
"import java.io.*;\n\nclass Main\n{\n \n public static void main(String[] args)\n {\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\n \n }catch(Exception e){\n System.out.println(e);\n }\n }\n \n public static int getPrimeNumber(int array[]){\n\t int total = 0;\n\t for(int i = 0;i < array.length;++i){\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }\n\t return total;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n \n public static void main(String[] args)\n {\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\n \n }catch(Exception e){\n System.out.println(e);\n }\n }\n \n public static int getPrimeNumber(int array[]){\n\t int total = 0;\n\t for(int i = 0;i < array.length;++i){\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }\n\t return total;\n }\n}",
"Main",
"public static void main(String[] args)\n {\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\n \n }catch(Exception e){\n System.out.println(e);\n }\n }",
"main",
"{\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\n \n }catch(Exception e){\n System.out.println(e);\n }\n }",
"try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\n \n }catch(Exception e){\n System.out.println(e);\n }",
"catch(Exception e){\n System.out.println(e);\n }",
"Exception e",
"{\n System.out.println(e);\n }",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new int[n];\n int putnum = 0;\n while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }\n \n System.out.println(String.valueOf(getPrimeNumber(array)));\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[] array = new int[n];",
"array",
"new int[n]",
"n",
"int putnum = 0;",
"putnum",
"0",
"while(true){\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }",
"true",
"{\n \t String str = br.readLine();\n \t array[putnum] = Integer.parseInt(str);\n \t if(++putnum == n)break;\n }",
"String str = br.readLine();",
"str",
"br.readLine()",
"br.readLine",
"br",
"array[putnum] = Integer.parseInt(str)",
"array[putnum]",
"array",
"putnum",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"if(++putnum == n)break;",
"++putnum == n",
"++putnum",
"putnum",
"n",
"break;",
"System.out.println(String.valueOf(getPrimeNumber(array)))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(getPrimeNumber(array))",
"String.valueOf",
"String",
"getPrimeNumber(array)",
"getPrimeNumber",
"array",
"String[] args",
"args",
"public static int getPrimeNumber(int array[]){\n\t int total = 0;\n\t for(int i = 0;i < array.length;++i){\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }\n\t return total;\n }",
"getPrimeNumber",
"{\n\t int total = 0;\n\t for(int i = 0;i < array.length;++i){\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }\n\t return total;\n }",
"int total = 0;",
"total",
"0",
"for(int i = 0;i < array.length;++i){\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"++i",
"++i",
"i",
"{\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }",
"{\n\t\t boolean isPrime = true;\n\t\t if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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\t if(isPrime || array[i] == 2)total++;\n\t }",
"boolean isPrime = true;",
"isPrime",
"true",
"if(array[i] % 2 == 0 || array[i] == 1){\n\t\t\t isPrime = false;\n\t\t }\n\t\t else{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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 }",
"array[i] % 2 == 0 || array[i] == 1",
"array[i] % 2 == 0",
"array[i] % 2",
"array[i]",
"array",
"i",
"2",
"0",
"array[i] == 1",
"array[i]",
"array",
"i",
"1",
"{\n\t\t\t isPrime = false;\n\t\t }",
"isPrime = false",
"isPrime",
"false",
"{\n\t\t\t for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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 }",
"for(int j = 3;j <= Math.sqrt(array[i]);j += 2){\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 0){\n\t\t\t\t\tisPrime = false;\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(array[i])",
"j",
"Math.sqrt(array[i])",
"Math.sqrt",
"Math",
"array[i]",
"array",
"i",
"j += 2",
"j += 2",
"j",
"2",
"{\n\t\t\t //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 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 //for(int j = 3;j < array[i];j += 2){\n\t\t\t\tif(array[i] % j == 0){\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(array[i] % j == 0){\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"array[i] % j == 0",
"array[i] % j",
"array[i]",
"array",
"i",
"j",
"0",
"{\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"if(isPrime || array[i] == 2)total++;",
"isPrime || array[i] == 2",
"isPrime",
"array[i] == 2",
"array[i]",
"array",
"i",
"2",
"total++",
"total",
"return total;",
"total",
"int array[]",
"array"
] | import java.io.*;
class Main
{
public static void main(String[] args)
{
try{
// ??\???????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// ????????°???????????????
int n = Integer.parseInt(br.readLine());
int[] array = new int[n];
int putnum = 0;
while(true){
String str = br.readLine();
array[putnum] = Integer.parseInt(str);
if(++putnum == n)break;
}
System.out.println(String.valueOf(getPrimeNumber(array)));
}catch(Exception e){
System.out.println(e);
}
}
public static int getPrimeNumber(int array[]){
int total = 0;
for(int i = 0;i < array.length;++i){
boolean isPrime = true;
if(array[i] % 2 == 0 || array[i] == 1){
isPrime = false;
}
else{
for(int j = 3;j <= Math.sqrt(array[i]);j += 2){
//for(int j = 3;j < array[i];j += 2){
if(array[i] % j == 0){
isPrime = false;
break;
}
}
}
if(isPrime || array[i] == 2)total++;
}
return total;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
14,
4,
13,
4,
18,
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,
2,
13,
17,
17,
2,
2,
13,
17,
17,
30,
29,
17,
30,
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,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
6,
35
],
[
35,
36
],
[
105,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
51,
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
],
[
78,
80
],
[
67,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
83,
97
],
[
97,
98
],
[
98,
99
],
[
66,
100
],
[
100,
101
],
[
37,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main (String [] args) {\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\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\tpublic static boolean isPrime(int i) {\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\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\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\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\tpublic static boolean isPrime(int i) {\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}\n\t\t}",
"Main",
"public static void main (String [] args) {\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\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 count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"int count = 0;",
"count",
"0",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"in.hasNextInt()",
"in.hasNextInt",
"in",
"{\n\t\t\tif(isPrime(in.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if(isPrime(in.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(in.nextInt())",
"isPrime",
"in.nextInt()",
"in.nextInt",
"in",
"{\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 boolean isPrime(int i) {\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}",
"isPrime",
"{\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}",
"if(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}",
"i == 2 || i == 3",
"i == 2",
"i",
"2",
"i == 3",
"i",
"3",
"{\n\t\t\t\treturn true;\n\t\t\t}",
"return true;",
"true",
"if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}",
"i % 2 == 0 || i % 3 == 0",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"i % 3 == 0",
"i % 3",
"i",
"3",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"{\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}",
"for(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 5;",
"int j = 5;",
"j",
"5",
"j * j <= i",
"j * j",
"j",
"j",
"i",
"j += 6",
"j += 6",
"j",
"6",
"{\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"if((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}",
"(i % j == 0) || (i % (j + 2) == 0)",
"(i % j == 0)",
"i % j",
"i",
"j",
"0",
"(i % (j + 2) == 0)",
"i % (j + 2)",
"i",
"(j + 2)",
"j",
"2",
"0",
"{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int i",
"i",
"public class Main {\n\n\tpublic static void main (String [] args) {\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\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\tpublic static boolean isPrime(int i) {\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}\n\t\t}",
"public class Main {\n\n\tpublic static void main (String [] args) {\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\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\tpublic static boolean isPrime(int i) {\n\t\t\t\n\t\t\t\n\t\t\tif(i == 2 || i == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse if (i % 2 == 0 || i % 3 == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\telse {\n\t\t\t\n\t\t\t\tfor(int j = 5; j * j <= i; j += 6) {\n\t\t\t\t\t\n\t\t\t\t\tif((i % j == 0) || (i % (j + 2) == 0)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t}\n\t\t}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main (String [] args) {
int count = 0;
Scanner in = new Scanner(System.in);
while(in.hasNextInt()) {
if(isPrime(in.nextInt())) {
count++;
}
}
System.out.println(count);
}
public static boolean isPrime(int i) {
if(i == 2 || i == 3) {
return true;
}
else if (i % 2 == 0 || i % 3 == 0) {
return false;
}
else {
for(int j = 5; j * j <= i; j += 6) {
if((i % j == 0) || (i % (j + 2) == 0)) {
return false;
}
}
return true;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
28,
13,
13,
30,
30,
0,
13,
8,
4,
13,
4,
18,
13,
13,
17,
17,
4,
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,
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,
12,
13,
30,
41,
13,
4,
18,
13,
17,
17,
17,
17,
17,
17,
17,
17,
29,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
29,
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
],
[
204,
17
],
[
204,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
28,
30
],
[
28,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
35,
42
],
[
35,
43
],
[
20,
44
],
[
44,
45
],
[
44,
46
],
[
18,
47
],
[
47,
48
],
[
204,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
51,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
51,
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
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
91,
97
],
[
97,
98
],
[
98,
99
],
[
51,
100
],
[
100,
101
],
[
49,
102
],
[
102,
103
],
[
204,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
109,
113
],
[
109,
114
],
[
109,
115
],
[
109,
116
],
[
109,
117
],
[
109,
118
],
[
109,
119
],
[
106,
120
],
[
120,
121
],
[
204,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
122,
131
],
[
131,
132
],
[
204,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
133,
145
],
[
145,
146
],
[
204,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
147,
159
],
[
159,
160
],
[
204,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
161,
173
],
[
173,
174
],
[
204,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
181,
183
],
[
177,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
188,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
177,
198
],
[
198,
199
],
[
199,
200
],
[
177,
201
],
[
201,
202
],
[
0,
203
],
[
203,
204
],
[
203,
205
]
] | [
"import java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\n/**\n * Greatest Common Divisor\n *\n */\npublic class Main {\n \n public static void main(String[] args) {\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }\n\n private static boolean isPrimeNumber(int n) {\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n \n private static List<String> mocups() {\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }\n\n /** output data */\n private static void output(Object o) {\n System.out.println(o);\n }\n private static void output(String[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(int[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(Object[] o) {\n System.out.println(Arrays.toString(o));\n }\n\n /** input data */\n private static List<String> inputLines() {\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }\n\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static void main(String[] args) {\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }\n\n private static boolean isPrimeNumber(int n) {\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n \n private static List<String> mocups() {\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }\n\n /** output data */\n private static void output(Object o) {\n System.out.println(o);\n }\n private static void output(String[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(int[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(Object[] o) {\n System.out.println(Arrays.toString(o));\n }\n\n /** input data */\n private static List<String> inputLines() {\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }\n\n}",
"Main",
"public static void main(String[] args) {\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }",
"main",
"{\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }",
"List<String> input = inputLines();",
"input",
"inputLines()",
"inputLines",
"int counter = 0;",
"counter",
"0",
"for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }",
"String target",
"input",
"{\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }",
"{\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }",
"counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0",
"counter",
"isPrimeNumber(Integer.valueOf(target)) ? 1 : 0",
"isPrimeNumber(Integer.valueOf(target))",
"isPrimeNumber",
"Integer.valueOf(target)",
"Integer.valueOf",
"Integer",
"target",
"1",
"0",
"output(counter)",
"output",
"counter",
"String[] args",
"args",
"private static boolean isPrimeNumber(int n) {\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"isPrimeNumber",
"{\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"if (n < 2) {\n return false;\n }",
"n < 2",
"n",
"2",
"{\n return false;\n }",
"return false;",
"false",
"if (n == 2) {\n return true;\n }",
"n == 2",
"n",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if (n % 2 == 0) {\n return false;\n }",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= n / i",
"i",
"n / i",
"n",
"i",
"i += 2",
"i += 2",
"i",
"2",
"{\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 true;",
"true",
"int n",
"n",
"private static List<String> mocups() {\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }",
"mocups",
"{\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }",
"List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );",
"input",
"Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n )",
"Arrays.asList",
"Arrays",
"\"6\"",
"\"1\"",
"\"3\"",
"\"6\"",
"\"4\"",
"\"5\"",
"\"17\"",
"\"3\"",
"return input;",
"input",
"/** output data */\n private static void output(Object o) {\n System.out.println(o);\n }",
"output",
"{\n System.out.println(o);\n }",
"System.out.println(o)",
"System.out.println",
"System.out",
"System",
"System.out",
"o",
"Object o",
"o",
"private static void output(String[] o) {\n System.out.println(Arrays.toString(o));\n }",
"output",
"{\n System.out.println(Arrays.toString(o));\n }",
"System.out.println(Arrays.toString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.toString(o)",
"Arrays.toString",
"Arrays",
"o",
"String[] o",
"o",
"private static void output(int[] o) {\n System.out.println(Arrays.toString(o));\n }",
"output",
"{\n System.out.println(Arrays.toString(o));\n }",
"System.out.println(Arrays.toString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.toString(o)",
"Arrays.toString",
"Arrays",
"o",
"int[] o",
"o",
"private static void output(Object[] o) {\n System.out.println(Arrays.toString(o));\n }",
"output",
"{\n System.out.println(Arrays.toString(o));\n }",
"System.out.println(Arrays.toString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.toString(o)",
"Arrays.toString",
"Arrays",
"o",
"Object[] o",
"o",
"/** input data */\n private static List<String> inputLines() {\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }",
"inputLines",
"{\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"List<String> input = new ArrayList<String>();",
"input",
"new ArrayList<String>()",
"while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }",
"in.hasNext()",
"in.hasNext",
"in",
"{\n String buf = in.nextLine();\n input.add(buf);\n }",
"String buf = in.nextLine();",
"buf",
"in.nextLine()",
"in.nextLine",
"in",
"input.add(buf)",
"input.add",
"input",
"buf",
"in.close()",
"in.close",
"in",
"return input;",
"input",
"public class Main {\n \n public static void main(String[] args) {\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }\n\n private static boolean isPrimeNumber(int n) {\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n \n private static List<String> mocups() {\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }\n\n /** output data */\n private static void output(Object o) {\n System.out.println(o);\n }\n private static void output(String[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(int[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(Object[] o) {\n System.out.println(Arrays.toString(o));\n }\n\n /** input data */\n private static List<String> inputLines() {\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }\n\n}",
"public class Main {\n \n public static void main(String[] args) {\n // input data\n List<String> input = inputLines();\n \n // get data\n int counter = 0;\n \n // main logic\n for (String target : input) {\n counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;\n }\n output(counter);\n }\n\n private static boolean isPrimeNumber(int n) {\n if (n < 2) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n \n // ??¶??°\n if (n % 2 == 0) {\n return false;\n }\n \n // ?\\???°\n for (int i = 3; i <= n / i; i += 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n \n private static List<String> mocups() {\n List<String> input = Arrays.asList(\n \"6\",\n \"1\",\n \"3\",\n \"6\",\n \"4\",\n \"5\",\n \"17\",\n \"3\"\n );\n return input;\n }\n\n /** output data */\n private static void output(Object o) {\n System.out.println(o);\n }\n private static void output(String[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(int[] o) {\n System.out.println(Arrays.toString(o));\n }\n private static void output(Object[] o) {\n System.out.println(Arrays.toString(o));\n }\n\n /** input data */\n private static List<String> inputLines() {\n Scanner in = new Scanner(System.in);\n List<String> input = new ArrayList<String>();\n while(in.hasNext()) {\n String buf = in.nextLine();\n input.add(buf);\n }\n in.close();\n return input;\n }\n\n}",
"Main"
] | import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
/**
* Greatest Common Divisor
*
*/
public class Main {
public static void main(String[] args) {
// input data
List<String> input = inputLines();
// get data
int counter = 0;
// main logic
for (String target : input) {
counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
}
output(counter);
}
private static boolean isPrimeNumber(int n) {
if (n < 2) {
return false;
}
if (n == 2) {
return true;
}
// ??¶??°
if (n % 2 == 0) {
return false;
}
// ?\???°
for (int i = 3; i <= n / i; i += 2) {
if (n % i == 0) {
return false;
}
}
return true;
}
private static List<String> mocups() {
List<String> input = Arrays.asList(
"6",
"1",
"3",
"6",
"4",
"5",
"17",
"3"
);
return input;
}
/** output data */
private static void output(Object o) {
System.out.println(o);
}
private static void output(String[] o) {
System.out.println(Arrays.toString(o));
}
private static void output(int[] o) {
System.out.println(Arrays.toString(o));
}
private static void output(Object[] o) {
System.out.println(Arrays.toString(o));
}
/** input data */
private static List<String> inputLines() {
Scanner in = new Scanner(System.in);
List<String> input = new ArrayList<String>();
while(in.hasNext()) {
String buf = in.nextLine();
input.add(buf);
}
in.close();
return input;
}
} |
[
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,
4,
13,
13,
40,
13,
4,
18,
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,
2,
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
],
[
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
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
9,
54
],
[
54,
55
],
[
7,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
58,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
71,
83
],
[
83,
84
],
[
58,
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
],
[
98,
99
],
[
98,
100
],
[
85,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
103,
117
],
[
117,
118
],
[
58,
119
],
[
119,
120
],
[
56,
121
],
[
121,
122
]
] | [
"import java.util.*;\nimport java.io.*;\nclass Main{\n\tpublic static void main(String[]args){\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tint n=in.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\n\t\t}\n\t\tout.println(count);\n\t}\n\tpublic static boolean check_prime(int n){\n\t\tif(n<=1)\n\t\t\treturn false;\n\t\tif(n<=3)\n\t\t\treturn true;\n\n\t\tif(n%2==0 || n%3==0)\n\t\t\treturn false;\n\n\t\tfor(int i=5; i*i<=n; i=i+6){\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\tpublic static void main(String[]args){\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tint n=in.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\n\t\t}\n\t\tout.println(count);\n\t}\n\tpublic static boolean check_prime(int n){\n\t\tif(n<=1)\n\t\t\treturn false;\n\t\tif(n<=3)\n\t\t\treturn true;\n\n\t\tif(n%2==0 || n%3==0)\n\t\t\treturn false;\n\n\t\tfor(int i=5; i*i<=n; i=i+6){\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[]args){\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tint n=in.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\n\t\t}\n\t\tout.println(count);\n\t}",
"main",
"{\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tint n=in.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\n\t\t}\n\t\tout.println(count);\n\t}",
"Scanner in=new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"PrintWriter out=new PrintWriter(System.out, true);",
"out",
"new PrintWriter(System.out, true)",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int count=0;",
"count",
"0",
"for(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\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(check_prime(a))\n\t\t\t\tcount++;\n\t\t}",
"{\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\t\t\t\tcount++;\n\t\t}",
"int a=in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"if(check_prime(a))\n\t\t\t\tcount++;",
"check_prime(a)",
"check_prime",
"a",
"count++",
"count",
"out.println(count)",
"out.println",
"out",
"count",
"String[]args",
"args",
"public static boolean check_prime(int n){\n\t\tif(n<=1)\n\t\t\treturn false;\n\t\tif(n<=3)\n\t\t\treturn true;\n\n\t\tif(n%2==0 || n%3==0)\n\t\t\treturn false;\n\n\t\tfor(int i=5; i*i<=n; i=i+6){\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"check_prime",
"{\n\t\tif(n<=1)\n\t\t\treturn false;\n\t\tif(n<=3)\n\t\t\treturn true;\n\n\t\tif(n%2==0 || n%3==0)\n\t\t\treturn false;\n\n\t\tfor(int i=5; i*i<=n; i=i+6){\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"if(n<=1)\n\t\t\treturn false;",
"n<=1",
"n",
"1",
"return false;",
"false",
"if(n<=3)\n\t\t\treturn true;",
"n<=3",
"n",
"3",
"return true;",
"true",
"if(n%2==0 || n%3==0)\n\t\t\treturn false;",
"n%2==0 || n%3==0",
"n%2==0",
"n%2",
"n",
"2",
"0",
"n%3==0",
"n%3",
"n",
"3",
"0",
"return false;",
"false",
"for(int i=5; i*i<=n; i=i+6){\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}",
"int i=5;",
"int i=5;",
"i",
"5",
"i*i<=n",
"i*i",
"i",
"i",
"n",
"i=i+6",
"i=i+6",
"i",
"i+6",
"i",
"6",
"{\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}",
"{\n\t\t\tif(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;\n\t\t}",
"if(n%i==0 || n%(i+2)==0)\n\t\t\t\treturn false;",
"n%i==0 || n%(i+2)==0",
"n%i==0",
"n%i",
"n",
"i",
"0",
"n%(i+2)==0",
"n%(i+2)",
"n",
"(i+2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n"
] | import java.util.*;
import java.io.*;
class Main{
public static void main(String[]args){
Scanner in=new Scanner(System.in);
PrintWriter out=new PrintWriter(System.out, true);
int n=in.nextInt();
int count=0;
for(int i=0;i<n;i++){
int a=in.nextInt();
if(check_prime(a))
count++;
}
out.println(count);
}
public static boolean check_prime(int n){
if(n<=1)
return false;
if(n<=3)
return true;
if(n%2==0 || n%3==0)
return false;
for(int i=5; i*i<=n; i=i+6){
if(n%i==0 || n%(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,
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,
2,
13,
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,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
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
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
310,
23
],
[
310,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
26,
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
],
[
50,
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
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
50,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
26,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
24,
96
],
[
96,
97
],
[
310,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
98,
106
],
[
106,
107
],
[
98,
108
],
[
108,
109
],
[
98,
110
],
[
110,
111
],
[
98,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
112,
120
],
[
120,
121
],
[
98,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
125,
130
],
[
130,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
140,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
136,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
124,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
98,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
167,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
167,
181
],
[
181,
182
],
[
181,
183
],
[
167,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
184,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
190,
193
],
[
189,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
167,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
98,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
204,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
204,
217
],
[
217,
218
],
[
217,
219
],
[
204,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
224,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
204,
233
],
[
233,
234
],
[
233,
235
],
[
204,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
236,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
247,
249
],
[
242,
250
],
[
250,
251
],
[
241,
252
],
[
252,
253
],
[
252,
254
],
[
241,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
257,
259
],
[
241,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
204,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
98,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
275
],
[
275,
276
],
[
276,
277
],
[
277,
278
],
[
276,
279
],
[
270,
280
],
[
280,
281
],
[
284,
282
],
[
294,
283
],
[
291,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
288
],
[
288,
289
],
[
288,
290
],
[
291,
291
],
[
291,
292
],
[
291,
293
],
[
294,
294
],
[
294,
295
],
[
294,
296
],
[
284,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
268,
301
],
[
301,
302
],
[
98,
303
],
[
303,
304
],
[
303,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
0,
309
],
[
309,
310
],
[
309,
311
]
] | [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\n\n \npublic class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }\n \n \n// LinkedList<Integer>[] setsu = new LinkedList[n];\n// for(int i = 0; i < n; i++){\n// setsu[i] = new LinkedList<Integer>();\n// } \n\n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n\n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.LinkedList;",
"LinkedList",
"java.util",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }\n \n \n// LinkedList<Integer>[] setsu = new LinkedList[n];\n// for(int i = 0; i < n; i++){\n// setsu[i] = new LinkedList<Integer>();\n// } \n\n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n\n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }",
"main",
"{\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }",
"InputReader sc = new InputReader(System.in);",
"sc",
"new InputReader(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 int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }",
"{\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }",
"int nownum = sc.nextInt();",
"nownum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean prime = true;",
"prime",
"true",
"for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j * j <= nownum",
"j * j",
"j",
"j",
"nownum",
"j++",
"j++",
"j",
"{\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }",
"{\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }",
"if(nownum % j == 0){\n prime = false;\n break;\n }",
"nownum % j == 0",
"nownum % j",
"nownum",
"j",
"0",
"{\n prime = false;\n break;\n }",
"prime = false",
"prime",
"false",
"break;",
"if(prime){ans++;}",
"prime",
"{ans++;}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
" static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n\n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"next",
"{\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n return -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }",
"nextStr",
"{\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }",
"int c = next();",
"c",
"next()",
"next",
"while(isSpaceChar(c)){c = next();}",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{c = next();}",
"c = next()",
"c",
"next()",
"next",
"StringBuffer str = new StringBuffer();",
"str",
"new StringBuffer()",
"do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n str.append((char)c);\n c = next();\n }",
"str.append((char)c)",
"str.append",
"str",
"(char)c",
"c = next()",
"c",
"next()",
"next",
"return str.toString();",
"str.toString()",
"str.toString",
"str",
"public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = next();",
"c",
"next()",
"next",
"while (isSpaceChar(c))\n c = next();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = next()",
"c",
"next()",
"next",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = next();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = next();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = next()",
"c",
"next()",
"next",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = next()",
"c",
"next()",
"next",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n return filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }\n \n \n// LinkedList<Integer>[] setsu = new LinkedList[n];\n// for(int i = 0; i < n; i++){\n// setsu[i] = new LinkedList<Integer>();\n// } \n\n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n\n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n int n = sc.nextInt();\n int ans = 0;\n for(int i = 0; i < n; i++){\n int nownum = sc.nextInt();\n boolean prime = true;\n for(int j = 2; j * j <= nownum; j++){\n if(nownum % j == 0){\n prime = false;\n break;\n }\n }\n if(prime){ans++;}\n }\n System.out.println(ans);\n }\n \n \n// LinkedList<Integer>[] setsu = new LinkedList[n];\n// for(int i = 0; i < n; i++){\n// setsu[i] = new LinkedList<Integer>();\n// } \n\n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n\n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main"
] | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
public class Main {
public static void main(String[] args) {
InputReader sc = new InputReader(System.in);
int n = sc.nextInt();
int ans = 0;
for(int i = 0; i < n; i++){
int nownum = sc.nextInt();
boolean prime = true;
for(int j = 2; j * j <= nownum; j++){
if(nownum % j == 0){
prime = false;
break;
}
}
if(prime){ans++;}
}
System.out.println(ans);
}
// LinkedList<Integer>[] setsu = new LinkedList[n];
// for(int i = 0; i < n; i++){
// setsu[i] = new LinkedList<Integer>();
// }
//ここからテンプレ
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int next() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public String nextStr() {
int c = next();
while(isSpaceChar(c)){c = next();}
StringBuffer str = new StringBuffer();
do{
str.append((char)c);
c = next();
}while(!isSpaceChar(c));
return str.toString();
}
public int nextInt() {
int c = next();
while (isSpaceChar(c))
c = next();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = next();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = next();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
29,
17,
30,
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,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
41,
13,
20,
42,
2,
13,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
30,
4,
18,
13,
18,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
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
],
[
123,
11
],
[
123,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
15,
23
],
[
23,
24
],
[
24,
25
],
[
15,
26
],
[
26,
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
],
[
51,
52
],
[
14,
53
],
[
53,
54
],
[
12,
55
],
[
55,
56
],
[
123,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
59,
71
],
[
71,
72
],
[
71,
73
],
[
59,
74
],
[
74,
75
],
[
74,
76
],
[
59,
78
],
[
78,
79
],
[
78,
80
],
[
59,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
85,
109
],
[
109,
110
],
[
109,
111
],
[
59,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
118,
119
],
[
57,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
] | [
"import java.util.ArrayList;\nimport java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n\tpublic static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}\n\n}\n",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\tpublic static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}\n\n}",
"Main",
"public static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"quo",
"{\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"if((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"(n == 0)||(n == 1)",
"(n == 0)",
"n",
"0",
"(n == 1)",
"n",
"1",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"for(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i<= Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i+=1",
"i+=1",
"i",
"1",
"{\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"if(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"n%i == 0",
"n%i",
"n",
"i",
"0",
"{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int size = Integer.parseInt(sc.nextLine());",
"size",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int i = 0;",
"i",
"0",
"int[] numbs = new int[size];",
"numbs",
"new int[size]",
"size",
"ArrayList<Integer> result = new ArrayList<Integer>();",
"result",
"new ArrayList<Integer>()",
"while (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}",
"i<size",
"i",
"size",
"{\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}",
"numbs[i] = Integer.parseInt( sc.nextLine())",
"numbs[i]",
"numbs",
"i",
"Integer.parseInt( sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}",
"quo(numbs[i])",
"quo",
"numbs[i]",
"numbs",
"i",
"{\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}",
"result.add(numbs[i])",
"result.add",
"result",
"numbs[i]",
"numbs",
"i",
"i+=1",
"i",
"1",
"System.out.println(result.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"result.size()",
"result.size",
"result",
"String[] args",
"args",
"public class Main {\n\tpublic static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}\n\n}",
"public class Main {\n\tpublic static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = Integer.parseInt(sc.nextLine());\n\t\t\n\t\tint i = 0;\n\t\tint[] numbs = new int[size];\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile (i<size) {\n\t\t\tnumbs[i] = Integer.parseInt( sc.nextLine());\n\t\t\tif(quo(numbs[i])) {\n\t\t\t\tresult.add(numbs[i]);\n\t\t\t}\n\t\t\ti+=1;\n\t\t}\n\t\tSystem.out.println(result.size());\n\t}\n\n}",
"Main"
] | import java.util.ArrayList;
import java.util.Scanner;
import java.lang.Math;
public class Main {
public static boolean quo(int n) {
if((n == 0)||(n == 1)) {
return false;
}else{
for(int i = 2; i<= Math.sqrt(n); i+=1) {
if(n%i == 0) {
return false;
}
}
}
return true;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int size = Integer.parseInt(sc.nextLine());
int i = 0;
int[] numbs = new int[size];
ArrayList<Integer> result = new ArrayList<Integer>();
while (i<size) {
numbs[i] = Integer.parseInt( sc.nextLine());
if(quo(numbs[i])) {
result.add(numbs[i]);
}
i+=1;
}
System.out.println(result.size());
}
}
|
[
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,
4,
18,
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,
2,
4,
18,
13,
13,
17,
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
],
[
108,
5
],
[
108,
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
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
6,
54
],
[
54,
55
],
[
108,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
58,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
82,
87
],
[
75,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
75,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
101,
102
],
[
58,
103
],
[
103,
104
],
[
56,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"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\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.close();\n\t}\n\n\tprivate static boolean checkPrimeNum(int data) {\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\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 sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.close();\n\t}\n\n\tprivate static boolean checkPrimeNum(int data) {\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\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\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.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 count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}",
"{\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}",
"int data = sc.nextInt();",
"data",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}",
"checkPrimeNum(data)",
"checkPrimeNum",
"data",
"{\n \t\t\tcount++;\n \t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"private static boolean checkPrimeNum(int data) {\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\n\t\treturn true;\n\t}",
"checkPrimeNum",
"{\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\n\t\treturn true;\n\t}",
"if (data == 2) {\n\t\t\treturn true;\n\t\t}",
"data == 2",
"data",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"data % 2 == 0",
"data % 2",
"data",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"for (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= (int)Math.sqrt(data) + 1",
"i",
"(int)Math.sqrt(data) + 1",
"(int)Math.sqrt(data)",
"Math.sqrt",
"Math",
"data",
"1",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"data % i == 0",
"data % i",
"data",
"i",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"int data",
"data",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.close();\n\t}\n\n\tprivate static boolean checkPrimeNum(int data) {\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\n\t\treturn true;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;\n \t\t}\n \t}\n\n \tSystem.out.println(count);\n \t\n sc.close();\n\t}\n\n\tprivate static boolean checkPrimeNum(int data) {\n\t\tif (data == 2) {\n\t\t\treturn true;\n\t\t}\n\t\tif (data % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {\n\t\t\tif (data % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"prime: \" + data);\n\t\treturn true;\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 data = sc.nextInt();
if (checkPrimeNum(data)) {
count++;
}
}
System.out.println(count);
sc.close();
}
private static boolean checkPrimeNum(int data) {
if (data == 2) {
return true;
}
if (data % 2 == 0) {
return false;
}
for (int i = 3; i <= (int)Math.sqrt(data) + 1; i += 2) {
if (data % i == 0) {
return false;
}
}
// System.out.println("prime: " + data);
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
41,
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,
4,
18,
13,
14,
2,
18,
13,
13,
13,
0,
13,
18,
13,
13,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
41,
13,
13,
41,
13,
2,
13,
17,
11,
1,
41,
13,
13,
2,
13,
18,
13,
13,
1,
0,
13,
13,
30,
0,
18,
13,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
6
],
[
6,
7
],
[
162,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
10,
23
],
[
23,
24
],
[
23,
25
],
[
10,
26
],
[
26,
27
],
[
26,
28
],
[
10,
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
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
10,
63
],
[
63,
64
],
[
63,
65
],
[
10,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
88,
89
],
[
10,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
8,
96
],
[
96,
97
],
[
162,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
104,
105
],
[
104,
106
],
[
100,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
107,
120
],
[
120,
121
],
[
121,
122
],
[
107,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
130,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
139,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
98,
159
],
[
159,
160
],
[
0,
161
],
[
161,
162
],
[
161,
163
]
] | [
"import java.util.*;\n\npublic class Main {\n\t\n\tstatic boolean A[];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\t\n\tstatic void sieve(int n) {\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\tstatic boolean A[];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\t\n\tstatic void sieve(int n) {\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main",
"static boolean A[];",
"A",
"public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\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",
"D[]=new int[n]",
"D",
"new int[n]",
"n",
"max=0",
"max",
"0",
"cnt=0;",
"cnt",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}",
"{\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}",
"D[i]=Integer.parseInt(in.next())",
"D[i]",
"D",
"i",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"if(D[i]>max)max=D[i];",
"D[i]>max",
"D[i]",
"D",
"i",
"max",
"max=D[i]",
"max",
"D[i]",
"D",
"i",
"sieve(max)",
"sieve",
"max",
"for(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<D.length",
"i",
"D.length",
"D",
"D.length",
"i++",
"i++",
"i",
"{\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}",
"{\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}",
"if(!A[D[i]])cnt++;",
"!A[D[i]]",
"A[D[i]]",
"A",
"D[i]",
"D",
"i",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static void sieve(int n) {\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}",
"sieve",
"{\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}",
"A=new boolean[n+1]",
"A",
"new boolean[n+1]",
"n+1",
"n",
"1",
"for(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<Math.sqrt(A.length)",
"i",
"Math.sqrt(A.length)",
"Math.sqrt",
"Math",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}",
"if(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}",
"!A[i]",
"A[i]",
"A",
"i",
"{\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}",
"int p=i",
"p",
"i",
"s=p*2;",
"s",
"p*2",
"p",
"2",
"for(int j=s;j<A.length;j+=p)A[j]=true;",
"int j=s;",
"int j=s;",
"j",
"s",
"j<A.length",
"j",
"A.length",
"A",
"A.length",
"j+=p",
"j+=p",
"j",
"p",
"A[j]=true;",
"A[j]=true",
"A[j]",
"A",
"j",
"true",
"int n",
"n",
"public class Main {\n\t\n\tstatic boolean A[];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\t\n\tstatic void sieve(int n) {\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}\n\n}",
"public class Main {\n\t\n\tstatic boolean A[];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n\t\t}\n\t\tsieve(max);\n\t\tfor(int i=0;i<D.length;i++) {\n\t\t\tif(!A[D[i]])cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\t\n\tstatic void sieve(int n) {\n\t\tA=new boolean[n+1];\n\t\tfor(int i=2;i<Math.sqrt(A.length);i++) {\n\t\t\tif(!A[i]) {\n\t\t\t\tint p=i,s=p*2;\n\t\t\t\tfor(int j=s;j<A.length;j+=p)A[j]=true;\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
static boolean A[];
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(),D[]=new int[n],max=0,cnt=0;
for(int i=0;i<n;i++) {
D[i]=Integer.parseInt(in.next());
if(D[i]>max)max=D[i];
}
sieve(max);
for(int i=0;i<D.length;i++) {
if(!A[D[i]])cnt++;
}
System.out.println(cnt);
}
static void sieve(int n) {
A=new boolean[n+1];
for(int i=2;i<Math.sqrt(A.length);i++) {
if(!A[i]) {
int p=i,s=p*2;
for(int j=s;j<A.length;j+=p)A[j]=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,
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,
2,
13,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
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
],
[
111,
5
],
[
111,
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
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
36,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
6,
53
],
[
53,
54
],
[
111,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
57,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
64,
74
],
[
74,
75
],
[
57,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
57,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
84,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
98,
104
],
[
104,
105
],
[
57,
106
],
[
106,
107
],
[
55,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }\n \n static boolean isprime(int x){\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }\n \n static boolean isprime(int x){\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }",
"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 count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }",
"{\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }",
"if(isprime(Integer.parseInt(sc.next()))) count++;",
"isprime(Integer.parseInt(sc.next()))",
"isprime",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static boolean isprime(int x){\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\n }",
"isprime",
"{\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\n }",
"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",
"double sqrt = Math.sqrt(x+1);",
"sqrt",
"Math.sqrt(x+1)",
"Math.sqrt",
"Math",
"x+1",
"x",
"1",
"for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrt",
"i",
"sqrt",
"i += 2",
"i += 2",
"i",
"2",
"{\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 class Main {\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }\n \n static boolean isprime(int x){\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.next()))) count++;\n }\n System.out.println(count);\n }\n \n static boolean isprime(int x){\n if(x == 2) return true;\n if(x < 2 || x%2 == 0) return false;\n double sqrt = Math.sqrt(x+1);\n for(int i = 3; i <= sqrt; i += 2){\n if(x%i == 0) return false;\n }\n return true;\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 count = 0;
for(int i = 0; i < n; i++){
if(isprime(Integer.parseInt(sc.next()))) count++;
}
System.out.println(count);
}
static boolean isprime(int x){
if(x == 2) return true;
if(x < 2 || x%2 == 0) return false;
double sqrt = Math.sqrt(x+1);
for(int i = 3; i <= sqrt; i += 2){
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,
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,
0,
13,
17,
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
],
[
81,
5
],
[
81,
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
],
[
63,
65
],
[
32,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
] | [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"main",
"{\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n=s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int cnt=0;",
"cnt",
"0",
"for(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\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\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}",
"{\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}",
"int m=s.nextInt();",
"m",
"s.nextInt()",
"s.nextInt",
"s",
"int c=0;",
"c",
"0",
"for(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}",
"int j=2;",
"int j=2;",
"j",
"2",
"j<=Math.sqrt(m)",
"j",
"Math.sqrt(m)",
"Math.sqrt",
"Math",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}",
"{\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}",
"if(m%j==0) c=1;",
"m%j==0",
"m%j",
"m",
"j",
"0",
"c=1",
"c",
"1",
"if(c==0) cnt++;",
"c==0",
"c",
"0",
"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\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t\t\tif(c==0) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int cnt=0;
for(int i=0;i<n;i++){
int m=s.nextInt();
int c=0;
for(int j=2;j<=Math.sqrt(m);j++){
if(m%j==0) c=1;
}
if(c==0) cnt++;
}
System.out.println(cnt);
}
}
|
[
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,
0,
13,
4,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
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,
30,
0,
13,
17,
3,
14,
13,
30,
40,
13,
29,
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
],
[
109,
11
],
[
109,
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
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
14,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
12,
58
],
[
58,
59
],
[
109,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
62,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
62,
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
],
[
95,
97
],
[
94,
98
],
[
62,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
62,
104
],
[
104,
105
],
[
60,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int primaryNumber(int target) {\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}\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\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int primaryNumber(int target) {\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"int primaryRange = Integer.valueOf(in.readLine());",
"primaryRange",
"Integer.valueOf(in.readLine())",
"Integer.valueOf",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"int result = 0;",
"result",
"0",
"for (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}",
"int index = 0;",
"int index = 0;",
"index",
"0",
"index < primaryRange",
"index",
"primaryRange",
"index++",
"index++",
"index",
"{\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}",
"{\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}",
"result += primaryNumber(Integer.valueOf(in.readLine()))",
"result",
"primaryNumber(Integer.valueOf(in.readLine()))",
"primaryNumber",
"Integer.valueOf(in.readLine())",
"Integer.valueOf",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public static int primaryNumber(int target) {\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}",
"primaryNumber",
"{\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}",
"int count = 0;",
"count",
"0",
"boolean isPrime = true;",
"isPrime",
"true",
"int sqrt = (int)Math.sqrt(target);",
"sqrt",
"(int)Math.sqrt(target)",
"Math.sqrt",
"Math",
"target",
"for (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= sqrt",
"i",
"sqrt",
"i++",
"i++",
"i",
"{\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}",
"target % i == 0",
"target % i",
"target",
"i",
"0",
"{\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}",
"isPrime = false",
"isPrime",
"false",
"break;",
"if (isPrime) {\n\t\t\t++count;\n\t\t}",
"isPrime",
"{\n\t\t\t++count;\n\t\t}",
"++count",
"count",
"return count;",
"count",
"int target",
"target",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int primaryNumber(int target) {\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint primaryRange = Integer.valueOf(in.readLine());\n\n\t\tint result = 0;\n\t\tfor (int index = 0; index < primaryRange; index++) {\n\t\t\tresult += primaryNumber(Integer.valueOf(in.readLine()));\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int primaryNumber(int target) {\n\n\t\tint count = 0;\n\t\tboolean isPrime = true;\n\t\tint sqrt = (int)Math.sqrt(target);\n\n\t\tfor (int i = 2; i <= sqrt; i++) {\n\t\t\tif (target % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isPrime) {\n\t\t\t++count;\n\t\t}\n\t\treturn count;\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 NumberFormatException, IOException {
// TODO 自動生成されたメソッド・スタブ
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int primaryRange = Integer.valueOf(in.readLine());
int result = 0;
for (int index = 0; index < primaryRange; index++) {
result += primaryNumber(Integer.valueOf(in.readLine()));
}
System.out.println(result);
}
public static int primaryNumber(int target) {
int count = 0;
boolean isPrime = true;
int sqrt = (int)Math.sqrt(target);
for (int i = 2; i <= sqrt; i++) {
if (target % i == 0) {
isPrime = false;
break;
}
}
if (isPrime) {
++count;
}
return count;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
3,
14,
2,
2,
13,
13,
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
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
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
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
39,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
39,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
]
] | [
"import java.io.*;\n \nclass 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 i, j;\n int count = 0;\n \n for(i=0; i<n; i++){\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }\n System.out.println(count);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"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 i, j;\n int count = 0;\n \n for(i=0; i<n; i++){\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }\n System.out.println(count);\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 i, j;\n int count = 0;\n \n for(i=0; i<n; i++){\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }\n System.out.println(count);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int i, j;\n int count = 0;\n \n for(i=0; i<n; i++){\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }\n System.out.println(count);\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 i",
"i",
"j;",
"j",
"int count = 0;",
"count",
"0",
"for(i=0; i<n; i++){\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }",
"{\n int a = Integer.parseInt(br.readLine());\n for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }\n if((j*j)>a) count++;\n }",
"int a = Integer.parseInt(br.readLine());",
"a",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(j=2; (j*j)<=a; j++){\n if(a%j == 0) break;\n }",
"j=2;",
"j=2",
"j",
"2",
"(j*j)<=a",
"(j*j)",
"j",
"j",
"a",
"j++",
"j++",
"j",
"{\n if(a%j == 0) break;\n }",
"{\n if(a%j == 0) break;\n }",
"if(a%j == 0) break;",
"a%j == 0",
"a%j",
"a",
"j",
"0",
"break;",
"if((j*j)>a) count++;",
"(j*j)>a",
"(j*j)",
"j",
"j",
"a",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] | import java.io.*;
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 i, j;
int count = 0;
for(i=0; i<n; i++){
int a = Integer.parseInt(br.readLine());
for(j=2; (j*j)<=a; j++){
if(a%j == 0) break;
}
if((j*j)>a) count++;
}
System.out.println(count);
}
} |
[
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,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
17,
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
],
[
99,
5
],
[
99,
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
],
[
99,
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
],
[
61,
67
],
[
67,
68
],
[
54,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
69,
81
],
[
81,
82
],
[
82,
83
],
[
69,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
54,
94
],
[
94,
95
],
[
52,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] | [
"import java.util.Scanner;\n\npublic class Main {\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\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tprivate static boolean isPrime(long num) {\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}\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\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tprivate static boolean isPrime(long num) {\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) 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\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}",
"{\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}",
"long num = sc.nextLong();",
"num",
"sc.nextLong()",
"sc.nextLong",
"sc",
"if(isPrime(num)) count++;",
"isPrime(num)",
"isPrime",
"num",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean isPrime(long num) {\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"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 = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= (int)Math.pow(num, 0.5)",
"i",
"(int)Math.pow(num, 0.5)",
"Math.pow",
"Math",
"num",
"0.5",
"i++",
"i++",
"i",
"{\n\t\t\tif(num % i == 0) return false;\n\t\t}",
"{\n\t\t\tif(num % i == 0) return false;\n\t\t}",
"if(num % i == 0) return false;",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"long num",
"num",
"public class Main {\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\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tprivate static boolean isPrime(long num) {\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n}",
"public class Main {\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\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tprivate static boolean isPrime(long num) {\n\n\t\tif (num == 2) return true;\n\t\tif (num % 2 == 0) return false;\n\n\t\tfor (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {\n\t\t\tif(num % i == 0) return false;\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 sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
long num = sc.nextLong();
if(isPrime(num)) count++;
}
System.out.println(count);
}
private static boolean isPrime(long num) {
if (num == 2) return true;
if (num % 2 == 0) return false;
for (int i = 2; i <= (int)Math.pow(num, 0.5); i++) {
if(num % i == 0) return false;
}
return true;
}
} |
[
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,
14,
2,
4,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
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,
0,
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
],
[
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
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
45,
51
],
[
44,
52
],
[
52,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
6,
60
],
[
60,
61
],
[
4,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
67,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
64,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
64,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
90,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
106,
112
],
[
112,
113
],
[
113,
114
],
[
64,
115
],
[
115,
116
],
[
62,
117
],
[
117,
118
]
] | [
" import java.util.*;\nclass Main{\n public static void main(String args[]){\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\n for(int i = 0; i<n; i++){\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }\n System.out.println(count);\n }\n static int Judge_Prime (int n){\n int i;\n if (n < 2){\n return 0;\n }else if (n == 2){\n return 1;\n }\n\n if (n % 2 == 0){\n return 0;\n }\n\n for (i = 3; i <= n / i; i += 2){\n if (n % i == 0){\n return 0;\n }\n }\n return 1;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[]){\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\n for(int i = 0; i<n; i++){\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }\n System.out.println(count);\n }\n static int Judge_Prime (int n){\n int i;\n if (n < 2){\n return 0;\n }else if (n == 2){\n return 1;\n }\n\n if (n % 2 == 0){\n return 0;\n }\n\n for (i = 3; i <= n / i; i += 2){\n if (n % i == 0){\n return 0;\n }\n }\n return 1;\n }\n}",
"Main",
"public static void main(String args[]){\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\n for(int i = 0; i<n; i++){\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }\n System.out.println(count);\n }",
"main",
"{\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\n for(int i = 0; i<n; i++){\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }\n System.out.println(count);\n }",
"int count = 0;",
"count",
"0",
"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 a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }",
"{\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(Judge_Prime(a[i])==1)count++;",
"Judge_Prime(a[i])==1",
"Judge_Prime(a[i])",
"Judge_Prime",
"a[i]",
"a",
"i",
"1",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"static int Judge_Prime (int n){\n int i;\n if (n < 2){\n return 0;\n }else if (n == 2){\n return 1;\n }\n\n if (n % 2 == 0){\n return 0;\n }\n\n for (i = 3; i <= n / i; i += 2){\n if (n % i == 0){\n return 0;\n }\n }\n return 1;\n }",
"Judge_Prime",
"{\n int i;\n if (n < 2){\n return 0;\n }else if (n == 2){\n return 1;\n }\n\n if (n % 2 == 0){\n return 0;\n }\n\n for (i = 3; i <= n / i; i += 2){\n if (n % i == 0){\n return 0;\n }\n }\n return 1;\n }",
"int i;",
"i",
"if (n < 2){\n return 0;\n }else if (n == 2){\n return 1;\n }",
"n < 2",
"n",
"2",
"{\n return 0;\n }",
"return 0;",
"0",
"if (n == 2){\n return 1;\n }",
"n == 2",
"n",
"2",
"{\n return 1;\n }",
"return 1;",
"1",
"if (n % 2 == 0){\n return 0;\n }",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n return 0;\n }",
"return 0;",
"0",
"for (i = 3; i <= n / i; i += 2){\n if (n % i == 0){\n return 0;\n }\n }",
"i = 3;",
"i = 3",
"i",
"3",
"i <= n / i",
"i",
"n / i",
"n",
"i",
"i += 2",
"i += 2",
"i",
"2",
"{\n if (n % i == 0){\n return 0;\n }\n }",
"{\n if (n % i == 0){\n return 0;\n }\n }",
"if (n % i == 0){\n return 0;\n }",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n return 0;\n }",
"return 0;",
"0",
"return 1;",
"1",
"int n",
"n"
] | import java.util.*;
class Main{
public static void main(String args[]){
int count = 0;
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();
if(Judge_Prime(a[i])==1)count++;
}
System.out.println(count);
}
static int Judge_Prime (int n){
int i;
if (n < 2){
return 0;
}else if (n == 2){
return 1;
}
if (n % 2 == 0){
return 0;
}
for (i = 3; i <= n / i; i += 2){
if (n % i == 0){
return 0;
}
}
return 1;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
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,
13,
17,
30,
40,
13,
14,
2,
2,
13,
17,
17,
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,
3,
14,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
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,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
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
],
[
194,
14
],
[
194,
15
],
[
15,
16
],
[
15,
17
],
[
194,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
20,
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
],
[
47,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
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
],
[
76,
78
],
[
64,
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
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
20,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
18,
103
],
[
103,
104
],
[
194,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
105,
109
],
[
109,
110
],
[
105,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
105,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
120,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
130,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
119,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
105,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
105,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
161,
162
],
[
105,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
105,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
178,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
174,
191
],
[
191,
192
],
[
0,
193
],
[
193,
194
],
[
193,
195
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}\n\n\tstatic class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}\n\n\tstatic class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\t\n}",
"Main",
"private static FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"public static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}",
"main",
"{\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"for(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\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 x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}",
"x == 2",
"x",
"2",
"{\n\t\t\t\tcnt++;\n\t\t\t}",
"cnt++",
"cnt",
"if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}",
"x%2 == 1",
"x%2",
"x",
"2",
"1",
"{\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}",
"boolean flag = true;",
"flag",
"true",
"for(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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=3;",
"int j=3;",
"j",
"3",
"j<=Math.sqrt(x)",
"j",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"j+=2",
"j+=2",
"j",
"2",
"{\n\t\t\t\t\tif(x%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(x%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(x%j == 0){\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"x%j == 0",
"x%j",
"x",
"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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}",
"flag",
"{\n\t\t\t\t\tcnt++;\n\t\t\t\t}",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\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 st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\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 str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}\n\n\tstatic class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\t\n}",
"public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tint x = sc.nextInt();\n\t\t\tif(x == 2){\n\t\t\t\tcnt++;\n\t\t\t} else if(x%2 == 1){\n\t\t\t\tboolean flag = true;\n\t\t\t\tfor(int j=3; j<=Math.sqrt(x); j+=2) {\n\t\t\t\t\tif(x%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){\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\n\t}\n\n\tstatic class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\t\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
private static FastScanner sc = new FastScanner();
public static void main(String[] args) {
int n = sc.nextInt();
int cnt = 0;
for(int i=1; i<=n; i++){
int x = sc.nextInt();
if(x == 2){
cnt++;
} else if(x%2 == 1){
boolean flag = true;
for(int j=3; j<=Math.sqrt(x); j+=2) {
if(x%j == 0){
flag = false;
break;
}
}
if(flag){
cnt++;
}
}
}
System.out.println(cnt);
}
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
41,
13,
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,
14,
2,
2,
2,
18,
13,
13,
17,
17,
2,
18,
13,
13,
17,
30,
40,
13,
40,
13,
9,
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,
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
],
[
18,
19
],
[
19,
20
],
[
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
],
[
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
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
60,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
74,
79
],
[
59,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
80,
93
],
[
93,
94
],
[
94,
95
],
[
80,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
6,
116
],
[
116,
117
]
] | [
"import java.util.Scanner;\n\nclass Main\n{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint[] n = new int[10000];\n\t\t\n\t\tint N = scan.nextInt();\n\t\t\n\t\tint kai = N;\n\t\tint x = 0;\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(kai);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main\n{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint[] n = new int[10000];\n\t\t\n\t\tint N = scan.nextInt();\n\t\t\n\t\tint kai = N;\n\t\tint x = 0;\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(kai);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint[] n = new int[10000];\n\t\t\n\t\tint N = scan.nextInt();\n\t\t\n\t\tint kai = N;\n\t\tint x = 0;\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(kai);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint[] n = new int[10000];\n\t\t\n\t\tint N = scan.nextInt();\n\t\t\n\t\tint kai = N;\n\t\tint x = 0;\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(kai);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int[] n = new int[10000];",
"n",
"new int[10000]",
"10000",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int kai = N;",
"kai",
"N",
"int x = 0;",
"x",
"0",
"for(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tn[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tn[i] = scan.nextInt();\n\t\t}",
"n[i] = scan.nextInt()",
"n[i]",
"n",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=0; i<N; i++){\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\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\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if(n[i]%2==0 && n[i]!=2){\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}",
"n[i]%2==0 && n[i]!=2",
"n[i]%2==0",
"n[i]%2",
"n[i]",
"n",
"i",
"2",
"0",
"n[i]!=2",
"n[i]",
"n",
"i",
"2",
"{\n\t\t\t\tkai--;\n\t\t\t\tx++;\n\t\t\t\tcontinue;\n\t\t\t}",
"kai--",
"kai",
"x++",
"x",
"continue;",
"for(int q=2; q<=Math.sqrt(n[i]); q++){\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int q=2;",
"int q=2;",
"q",
"2",
"q<=Math.sqrt(n[i])",
"q",
"Math.sqrt(n[i])",
"Math.sqrt",
"Math",
"n[i]",
"n",
"i",
"q++",
"q++",
"q",
"{\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(n[i]%q==0){\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"n[i]%q==0",
"n[i]%q",
"n[i]",
"n",
"i",
"q",
"0",
"{\n\t\t\t\t\tkai--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"kai--",
"kai",
"break;",
"System.out.println(kai)",
"System.out.println",
"System.out",
"System",
"System.out",
"kai",
"String[] args",
"args"
] | import java.util.Scanner;
class Main
{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int[] n = new int[10000];
int N = scan.nextInt();
int kai = N;
int x = 0;
for(int i=0; i<N; i++){
n[i] = scan.nextInt();
}
for(int i=0; i<N; i++){
if(n[i]%2==0 && n[i]!=2){
kai--;
x++;
continue;
}
for(int q=2; q<=Math.sqrt(n[i]); q++){
if(n[i]%q==0){
kai--;
break;
}
}
}
System.out.println(kai);
}
}
|
[
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,
28,
13,
13,
30,
30,
14,
4,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
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
],
[
44,
46
],
[
44,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
6,
61
],
[
61,
62
],
[
100,
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
],
[
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
],
[
65,
95
],
[
95,
96
],
[
63,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] | [
"\n\nimport java.util.Scanner;\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[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\n }\n System.out.println(count);\n }\n public static boolean isPrime(int N) {\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\n }\n return true;\n }\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[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\n }\n System.out.println(count);\n }\n public static boolean isPrime(int N) {\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\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[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\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[] arr = new int[N];",
"arr",
"new int[N]",
"N",
"for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n arr[i] = sc.nextInt();\n }",
"{\n arr[i] = sc.nextInt();\n }",
"arr[i] = sc.nextInt()",
"arr[i]",
"arr",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int p: arr)\n {\n if(isPrime(p)) count++;\n }",
"int p",
"arr",
"{\n if(isPrime(p)) count++;\n }",
"{\n if(isPrime(p)) count++;\n }",
"if(isPrime(p)) count++;",
"isPrime(p)",
"isPrime",
"p",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean isPrime(int N) {\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\n }\n return true;\n }",
"if(N == 1) return false;",
"N == 1",
"N",
"1",
"return false;",
"false",
"for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\n }",
"long i = 2;",
"long i = 2;",
"i",
"2",
"i * i <= N",
"i * i",
"i",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(N % i == 0) return false;\n }",
"{\n if(N % i == 0) return false;\n }",
"if(N % i == 0) return false;",
"N % i == 0",
"N % i",
"N",
"i",
"0",
"return false;",
"false",
"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[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\n }\n System.out.println(count);\n }\n public static boolean isPrime(int N) {\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\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[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n for(int p: arr)\n {\n if(isPrime(p)) count++;\n }\n System.out.println(count);\n }\n public static boolean isPrime(int N) {\n if(N == 1) return false;\n for(long i = 2; i * i <= N; i++) {\n if(N % i == 0) return false;\n }\n return true;\n }\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[] arr = new int[N];
for(int i = 0; i < N; i++)
{
arr[i] = sc.nextInt();
}
int count = 0;
for(int p: arr)
{
if(isPrime(p)) count++;
}
System.out.println(count);
}
public static boolean isPrime(int N) {
if(N == 1) return false;
for(long i = 2; i * i <= N; i++) {
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,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
14,
2,
13,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
36,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
28,
13,
18,
36,
13,
30,
30,
0,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
13,
18,
36,
13,
18,
36,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
36,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
18,
18,
36,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
18,
36,
13,
13,
0,
13,
2,
13,
17,
42,
2,
2,
13,
17,
2,
18,
18,
36,
13,
13,
13,
30,
0,
18,
18,
36,
13,
2,
13,
17,
18,
18,
36,
13,
13,
40,
13,
0,
18,
18,
36,
13,
2,
13,
17,
13,
4,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
18,
36,
13,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
18,
36,
13,
13,
17,
4,
18,
18,
13,
13,
18,
18,
36,
13,
2,
18,
18,
36,
13,
13,
17,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
396,
5
],
[
396,
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
],
[
45,
46
],
[
6,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
49,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
49,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
60,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
57,
86
],
[
86,
87
],
[
57,
88
],
[
88,
89
],
[
49,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
98,
99
],
[
98,
100
],
[
92,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
101,
111
],
[
111,
112
],
[
112,
113
],
[
101,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
116,
122
],
[
122,
123
],
[
122,
124
],
[
90,
125
],
[
125,
126
],
[
49,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
129,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
49,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
161,
166
],
[
154,
167
],
[
167,
168
],
[
168,
169
],
[
154,
170
],
[
171,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
173,
179
],
[
179,
180
],
[
179,
181
],
[
172,
182
],
[
182,
183
],
[
183,
184
],
[
153,
185
],
[
185,
186
],
[
151,
187
],
[
187,
188
],
[
49,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
192,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
199,
201
],
[
197,
202
],
[
202,
203
],
[
202,
204
],
[
49,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
208,
214
],
[
214,
215
],
[
215,
216
],
[
208,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
219,
222
],
[
222,
223
],
[
222,
224
],
[
205,
225
],
[
225,
226
],
[
205,
227
],
[
227,
228
],
[
0,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
229,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
241,
242
],
[
241,
243
],
[
235,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
244,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
251,
253
],
[
244,
254
],
[
254,
255
],
[
255,
256
],
[
244,
257
],
[
258,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
260,
264
],
[
259,
265
],
[
265,
266
],
[
265,
267
],
[
233,
268
],
[
268,
269
],
[
229,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
272,
275
],
[
275,
276
],
[
272,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
277,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
288
],
[
277,
289
],
[
289,
290
],
[
290,
291
],
[
277,
292
],
[
293,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
296,
300
],
[
293,
301
],
[
301,
302
],
[
301,
303
],
[
303,
304
],
[
303,
305
],
[
293,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
311,
317
],
[
306,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
320,
324
],
[
324,
325
],
[
324,
326
],
[
319,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
318,
332
],
[
332,
333
],
[
293,
334
],
[
334,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
339,
340
],
[
339,
341
],
[
334,
342
],
[
293,
343
],
[
343,
344
],
[
229,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
348,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
356,
360
],
[
355,
361
],
[
348,
362
],
[
362,
363
],
[
363,
364
],
[
348,
365
],
[
366,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
369,
370
],
[
369,
371
],
[
367,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
373,
377
],
[
372,
378
],
[
347,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
379,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
389,
393
],
[
388,
394
],
[
0,
395
],
[
395,
396
],
[
395,
397
]
] | [
"import java.util.Scanner;\n/**\n * @author saiyo\n *\n */\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}\n\n}\n\nclass Seisu{\n\tprivate int x, y;\n\tprivate int snum[];\n\t\n\tSeisu(int x, int y){\n\t\tif(x >= y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}else{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}\n\t\t\n\t}\n\t\n\tSeisu(int snum[]){\n\t\tthis.snum = new int[snum.length];\n\t\tfor(int i = 0; i < snum.length; i++){\n\t\t\tthis.snum[i] = snum[i];\n\t\t}\n\t}\n\t\n\tpublic void countSosu(){\n\t\tint con = 0;\n\t\tfor(int nu: this.snum){\n\t\t\tcon += isSosu(nu);\n\t\t}\n\t\tSystem.out.println(con);\n\t}\n\t\n\tpublic int isSosu(int num){\n\t\tfor(int i = 2; i < Math.sqrt(num) + 1; i++){\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}\n\t\n\tpublic void kouyaku(){\n\t\tSystem.out.println(modSeisu(this.x, this.y));\n\t}\n\t\n\t\n\tpublic int modSeisu(int x, int y){\n\t\tif(x % y == 0){\n\t\t\treturn y;\n\t\t}else{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}\n\t}\n}\n\nclass Sort{\n\tprivate int[] sorted;\n\t\n\tSort(int[] sorted){\n\t\tthis.sorted = new int[sorted.length];\n\t\tfor(int i = 0; i < sorted.length; i++){\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}\n\t}\n\t\n\tpublic void insertionSort(){\n\t\tint v, j;\n\t\tfor(int i = 1; i < this.sorted.length; i++){\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}\n\t}\n\t\n\tpublic void printSort(){\n\t\tfor(int i = 0; i < this.sorted.length - 1; i++){\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}\n\t\tSystem.out.println(this.sorted[this.sorted.length - 1]);\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int con = scan.nextInt();",
"con",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] num = new int[con];",
"num",
"new int[con]",
"con",
"for(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < con",
"i",
"con",
"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",
"Seisu s = new Seisu(num);",
"s",
"new Seisu(num)",
"s.countSosu()",
"s.countSosu",
"s",
"String[] args",
"args",
"class Seisu{\n\tprivate int x, y;\n\tprivate int snum[];\n\t\n\tSeisu(int x, int y){\n\t\tif(x >= y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}else{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}\n\t\t\n\t}\n\t\n\tSeisu(int snum[]){\n\t\tthis.snum = new int[snum.length];\n\t\tfor(int i = 0; i < snum.length; i++){\n\t\t\tthis.snum[i] = snum[i];\n\t\t}\n\t}\n\t\n\tpublic void countSosu(){\n\t\tint con = 0;\n\t\tfor(int nu: this.snum){\n\t\t\tcon += isSosu(nu);\n\t\t}\n\t\tSystem.out.println(con);\n\t}\n\t\n\tpublic int isSosu(int num){\n\t\tfor(int i = 2; i < Math.sqrt(num) + 1; i++){\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}\n\t\n\tpublic void kouyaku(){\n\t\tSystem.out.println(modSeisu(this.x, this.y));\n\t}\n\t\n\t\n\tpublic int modSeisu(int x, int y){\n\t\tif(x % y == 0){\n\t\t\treturn y;\n\t\t}else{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}\n\t}\n}",
"Seisu",
"private int x",
"x",
"y;",
"y",
"private int snum[];",
"snum",
"Seisu(int x, int y){\n\t\tif(x >= y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}else{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}\n\t\t\n\t}",
"Seisu",
"{\n\t\tif(x >= y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}else{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}\n\t\t\n\t}",
"if(x >= y){\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}else{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}",
"x >= y",
"x",
"y",
"{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"{\n\t\t\tthis.x = y;\n\t\t\tthis.y = x;\n\t\t}",
"this.x = y",
"this.x",
"this",
"this.x",
"y",
"this.y = x",
"this.y",
"this",
"this.y",
"x",
"int x",
"x",
"int y",
"y",
"Seisu(int snum[]){\n\t\tthis.snum = new int[snum.length];\n\t\tfor(int i = 0; i < snum.length; i++){\n\t\t\tthis.snum[i] = snum[i];\n\t\t}\n\t}",
"Seisu",
"{\n\t\tthis.snum = new int[snum.length];\n\t\tfor(int i = 0; i < snum.length; i++){\n\t\t\tthis.snum[i] = snum[i];\n\t\t}\n\t}",
"this.snum = new int[snum.length]",
"this.snum",
"this",
"this.snum",
"new int[snum.length]",
"snum.length",
"snum",
"snum.length",
"for(int i = 0; i < snum.length; i++){\n\t\t\tthis.snum[i] = snum[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < snum.length",
"i",
"snum.length",
"snum",
"snum.length",
"i++",
"i++",
"i",
"{\n\t\t\tthis.snum[i] = snum[i];\n\t\t}",
"{\n\t\t\tthis.snum[i] = snum[i];\n\t\t}",
"this.snum[i] = snum[i]",
"this.snum[i]",
"this.snum",
"this",
"this.snum",
"i",
"snum[i]",
"snum",
"i",
"int snum[]",
"snum",
"public void countSosu(){\n\t\tint con = 0;\n\t\tfor(int nu: this.snum){\n\t\t\tcon += isSosu(nu);\n\t\t}\n\t\tSystem.out.println(con);\n\t}",
"countSosu",
"{\n\t\tint con = 0;\n\t\tfor(int nu: this.snum){\n\t\t\tcon += isSosu(nu);\n\t\t}\n\t\tSystem.out.println(con);\n\t}",
"int con = 0;",
"con",
"0",
"for(int nu: this.snum){\n\t\t\tcon += isSosu(nu);\n\t\t}",
"int nu",
"this.snum",
"this",
"this.snum",
"{\n\t\t\tcon += isSosu(nu);\n\t\t}",
"{\n\t\t\tcon += isSosu(nu);\n\t\t}",
"con += isSosu(nu)",
"con",
"isSosu(nu)",
"isSosu",
"nu",
"System.out.println(con)",
"System.out.println",
"System.out",
"System",
"System.out",
"con",
"public int isSosu(int num){\n\t\tfor(int i = 2; i < Math.sqrt(num) + 1; i++){\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}",
"isSosu",
"{\n\t\tfor(int i = 2; i < Math.sqrt(num) + 1; i++){\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}",
"for(int i = 2; i < Math.sqrt(num) + 1; i++){\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < Math.sqrt(num) + 1",
"i",
"Math.sqrt(num) + 1",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"1",
"i++",
"i++",
"i",
"{\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\n\t\t\tif(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}",
"if(num % i == 0 && num != 2){\n\t\t\t\treturn 0;\n\t\t\t}",
"num % i == 0 && num != 2",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"num != 2",
"num",
"2",
"{\n\t\t\t\treturn 0;\n\t\t\t}",
"return 0;",
"0",
"return 1;",
"1",
"int num",
"num",
"public void kouyaku(){\n\t\tSystem.out.println(modSeisu(this.x, this.y));\n\t}",
"kouyaku",
"{\n\t\tSystem.out.println(modSeisu(this.x, this.y));\n\t}",
"System.out.println(modSeisu(this.x, this.y))",
"System.out.println",
"System.out",
"System",
"System.out",
"modSeisu(this.x, this.y)",
"modSeisu",
"this.x",
"this",
"this.x",
"this.y",
"this",
"this.y",
"public int modSeisu(int x, int y){\n\t\tif(x % y == 0){\n\t\t\treturn y;\n\t\t}else{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}\n\t}",
"modSeisu",
"{\n\t\tif(x % y == 0){\n\t\t\treturn y;\n\t\t}else{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}\n\t}",
"if(x % y == 0){\n\t\t\treturn y;\n\t\t}else{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}",
"x % y == 0",
"x % y",
"x",
"y",
"0",
"{\n\t\t\treturn y;\n\t\t}",
"return y;",
"y",
"{\n\t\t\treturn modSeisu(y , x % y);\n\t\t}",
"return modSeisu(y , x % y);",
"modSeisu(y , x % y)",
"modSeisu",
"y",
"x % y",
"x",
"y",
"int x",
"x",
"int y",
"y",
"class Sort{\n\tprivate int[] sorted;\n\t\n\tSort(int[] sorted){\n\t\tthis.sorted = new int[sorted.length];\n\t\tfor(int i = 0; i < sorted.length; i++){\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}\n\t}\n\t\n\tpublic void insertionSort(){\n\t\tint v, j;\n\t\tfor(int i = 1; i < this.sorted.length; i++){\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}\n\t}\n\t\n\tpublic void printSort(){\n\t\tfor(int i = 0; i < this.sorted.length - 1; i++){\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}\n\t\tSystem.out.println(this.sorted[this.sorted.length - 1]);\n\t}\n}",
"Sort",
"private int[] sorted;",
"sorted",
"Sort(int[] sorted){\n\t\tthis.sorted = new int[sorted.length];\n\t\tfor(int i = 0; i < sorted.length; i++){\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}\n\t}",
"Sort",
"{\n\t\tthis.sorted = new int[sorted.length];\n\t\tfor(int i = 0; i < sorted.length; i++){\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}\n\t}",
"this.sorted = new int[sorted.length]",
"this.sorted",
"this",
"this.sorted",
"new int[sorted.length]",
"sorted.length",
"sorted",
"sorted.length",
"for(int i = 0; i < sorted.length; i++){\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sorted.length",
"i",
"sorted.length",
"sorted",
"sorted.length",
"i++",
"i++",
"i",
"{\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}",
"{\n\t\t\tthis.sorted[i] = sorted[i];\n\t\t}",
"this.sorted[i] = sorted[i]",
"this.sorted[i]",
"this.sorted",
"this",
"this.sorted",
"i",
"sorted[i]",
"sorted",
"i",
"int[] sorted",
"sorted",
"public void insertionSort(){\n\t\tint v, j;\n\t\tfor(int i = 1; i < this.sorted.length; i++){\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}\n\t}",
"insertionSort",
"{\n\t\tint v, j;\n\t\tfor(int i = 1; i < this.sorted.length; i++){\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}\n\t}",
"int v",
"v",
"j;",
"j",
"for(int i = 1; i < this.sorted.length; i++){\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < this.sorted.length",
"i",
"this.sorted.length",
"this.sorted",
"this",
"this.sorted",
"this.sorted.length",
"i++",
"i++",
"i",
"{\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}",
"{\n\t\t\tv = this.sorted[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tthis.sorted[j + 1] = v;\n\t\t\tprintSort();\n\t\t}",
"v = this.sorted[i]",
"v",
"this.sorted[i]",
"this.sorted",
"this",
"this.sorted",
"i",
"j = i - 1",
"j",
"i - 1",
"i",
"1",
"while(j >= 0 && this.sorted[j] > v){\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}",
"j >= 0 && this.sorted[j] > v",
"j >= 0",
"j",
"0",
"this.sorted[j] > v",
"this.sorted[j]",
"this.sorted",
"this",
"this.sorted",
"j",
"v",
"{\n\t\t\t\tthis.sorted[j + 1] = this.sorted[j];\n\t\t\t\tj--;\n\t\t\t}",
"this.sorted[j + 1] = this.sorted[j]",
"this.sorted[j + 1]",
"this.sorted",
"this",
"this.sorted",
"j + 1",
"j",
"1",
"this.sorted[j]",
"this.sorted",
"this",
"this.sorted",
"j",
"j--",
"j",
"this.sorted[j + 1] = v",
"this.sorted[j + 1]",
"this.sorted",
"this",
"this.sorted",
"j + 1",
"j",
"1",
"v",
"printSort()",
"printSort",
"public void printSort(){\n\t\tfor(int i = 0; i < this.sorted.length - 1; i++){\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}\n\t\tSystem.out.println(this.sorted[this.sorted.length - 1]);\n\t}",
"printSort",
"{\n\t\tfor(int i = 0; i < this.sorted.length - 1; i++){\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}\n\t\tSystem.out.println(this.sorted[this.sorted.length - 1]);\n\t}",
"for(int i = 0; i < this.sorted.length - 1; i++){\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < this.sorted.length - 1",
"i",
"this.sorted.length - 1",
"this.sorted.length",
"this.sorted",
"this",
"this.sorted",
"this.sorted.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}",
"{\n\t\t\tSystem.out.print(this.sorted[i] + \" \");\n\t\t}",
"System.out.print(this.sorted[i] + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"this.sorted[i] + \" \"",
"this.sorted[i]",
"this.sorted",
"this",
"this.sorted",
"i",
"\" \"",
"System.out.println(this.sorted[this.sorted.length - 1])",
"System.out.println",
"System.out",
"System",
"System.out",
"this.sorted[this.sorted.length - 1]",
"this.sorted",
"this",
"this.sorted",
"this.sorted.length - 1",
"this.sorted.length",
"this.sorted",
"this",
"this.sorted",
"this.sorted.length",
"1",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}\n\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = new Seisu(x, y);\n\t\t//s.kouyaku();\n\n\t\tint con = scan.nextInt();\n\t\t\n\t\tint[] num = new int[con];\n\t\tfor(int i = 0; i < con; i++){\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\t\tSeisu s = new Seisu(num);\n\t\ts.countSosu();\n\t\t/*\n\t\tSort s = new Sort(num);\n\t\ts.printSort();\n\t\ts.insertionSort();\n\t\t*/\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
/**
* @author saiyo
*
*/
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
//int x = scan.nextInt();
//int y = scan.nextInt();
//Seisu s = new Seisu(x, y);
//s.kouyaku();
int con = scan.nextInt();
int[] num = new int[con];
for(int i = 0; i < con; i++){
num[i] = scan.nextInt();
}
Seisu s = new Seisu(num);
s.countSosu();
/*
Sort s = new Sort(num);
s.printSort();
s.insertionSort();
*/
}
}
class Seisu{
private int x, y;
private int snum[];
Seisu(int x, int y){
if(x >= y){
this.x = x;
this.y = y;
}else{
this.x = y;
this.y = x;
}
}
Seisu(int snum[]){
this.snum = new int[snum.length];
for(int i = 0; i < snum.length; i++){
this.snum[i] = snum[i];
}
}
public void countSosu(){
int con = 0;
for(int nu: this.snum){
con += isSosu(nu);
}
System.out.println(con);
}
public int isSosu(int num){
for(int i = 2; i < Math.sqrt(num) + 1; i++){
if(num % i == 0 && num != 2){
return 0;
}
}
return 1;
}
public void kouyaku(){
System.out.println(modSeisu(this.x, this.y));
}
public int modSeisu(int x, int y){
if(x % y == 0){
return y;
}else{
return modSeisu(y , x % y);
}
}
}
class Sort{
private int[] sorted;
Sort(int[] sorted){
this.sorted = new int[sorted.length];
for(int i = 0; i < sorted.length; i++){
this.sorted[i] = sorted[i];
}
}
public void insertionSort(){
int v, j;
for(int i = 1; i < this.sorted.length; i++){
v = this.sorted[i];
j = i - 1;
while(j >= 0 && this.sorted[j] > v){
this.sorted[j + 1] = this.sorted[j];
j--;
}
this.sorted[j + 1] = v;
printSort();
}
}
public void printSort(){
for(int i = 0; i < this.sorted.length - 1; i++){
System.out.print(this.sorted[i] + " ");
}
System.out.println(this.sorted[this.sorted.length - 1]);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
13,
17,
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,
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,
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,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
116,
8
],
[
116,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
15,
18
],
[
14,
19
],
[
11,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
32,
38
],
[
38,
39
],
[
11,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
40,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
54,
60
],
[
60,
61
],
[
11,
62
],
[
62,
63
],
[
9,
64
],
[
64,
65
],
[
116,
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
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
93,
99
],
[
99,
100
],
[
68,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
116,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
107,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] | [
"import java.util.Scanner;\nimport java.lang.Math;\n\n// ALDS1_1_C\npublic class Main {\n\tboolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\tboolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"Main",
"boolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"primeJudge",
"{\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"double sqrt = Math.sqrt(a) + 1;",
"sqrt",
"Math.sqrt(a) + 1",
"Math.sqrt(a)",
"Math.sqrt",
"Math",
"a",
"1",
"if (a < 2) return false;",
"a < 2",
"a",
"2",
"return false;",
"false",
"if (a == 2) return true;",
"a == 2",
"a",
"2",
"return true;",
"true",
"if (a % 2 == 0) return false;",
"a % 2 == 0",
"a % 2",
"a",
"2",
"0",
"return false;",
"false",
"for (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i < sqrt",
"i",
"sqrt",
"i+=2",
"i+=2",
"i",
"2",
"{\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",
"void run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"run",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\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\tif (primeJudge(sc.nextInt())) count++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}",
"{\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}",
"if (primeJudge(sc.nextInt())) count++;",
"primeJudge(sc.nextInt())",
"primeJudge",
"sc.nextInt()",
"sc.nextInt",
"sc",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public static void main(String[] args) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\tboolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"public class Main {\n\tboolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (primeJudge(sc.nextInt())) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}",
"Main"
] | import java.util.Scanner;
import java.lang.Math;
// ALDS1_1_C
public class Main {
boolean primeJudge(int a) {
double sqrt = Math.sqrt(a) + 1;
if (a < 2) return false;
if (a == 2) return true;
if (a % 2 == 0) return false;
for (int i = 3; i < sqrt; i+=2) {
if (a % i == 0) return false;
}
return true;
}
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
if (primeJudge(sc.nextInt())) count++;
}
System.out.println(count);
}
public static void main(String[] args) {
new Main().run();
}
}
|
[
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,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
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,
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,
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
] | [
[
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,
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
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
14,
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
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
14,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
12,
84
],
[
84,
85
],
[
10,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
96,
106
],
[
106,
107
],
[
107,
108
],
[
88,
109
],
[
109,
110
],
[
109,
111
],
[
88,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
112,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
127,
128
],
[
119,
129
],
[
129,
130
],
[
129,
131
],
[
88,
132
],
[
132,
133
],
[
86,
134
],
[
134,
135
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\nclass Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] x = new int[n];\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx[i] = Integer.parseInt(br.readLine());\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int x){\n\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(x < 2 || (x % 2) == 0){\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\n\t\twhile(i <= Math.sqrt(x)){\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] x = new int[n];\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx[i] = Integer.parseInt(br.readLine());\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tstatic boolean isPrime(int x){\n\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(x < 2 || (x % 2) == 0){\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\n\t\twhile(i <= Math.sqrt(x)){\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] x = new int[n];\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx[i] = Integer.parseInt(br.readLine());\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] x = new int[n];\n\t\tint count = 0;\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx[i] = Integer.parseInt(br.readLine());\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\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[] x = new int[n];",
"x",
"new int[n]",
"n",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++){\n\t\t\tx[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\tx[i] = Integer.parseInt(br.readLine());\n\t\t}",
"{\n\t\t\tx[i] = Integer.parseInt(br.readLine());\n\t\t}",
"x[i] = Integer.parseInt(br.readLine())",
"x[i]",
"x",
"i",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}",
"{\n\t\t\t\n\t\t\tif(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t\t}",
"if(isPrime(x[i])){\n\t\t\t\tcount++;\n\t\t\t}",
"isPrime(x[i])",
"isPrime",
"x[i]",
"x",
"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\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(x < 2 || (x % 2) == 0){\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\n\t\twhile(i <= Math.sqrt(x)){\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\n\t\t}\n\n\t\treturn true;\n\n\t}",
"isPrime",
"{\n\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(x < 2 || (x % 2) == 0){\n\t\t\treturn false;\n\t\t}\n\n\t\tint i = 3;\n\n\t\twhile(i <= Math.sqrt(x)){\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\n\t\t}\n\n\t\treturn true;\n\n\t}",
"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",
"int i = 3;",
"i",
"3",
"while(i <= Math.sqrt(x)){\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\n\t\t}",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\n\t\t\tif((x % i) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti += 2;\n\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.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
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[] x = new int[n];
int count = 0;
for(int i = 0; i < n; i++){
x[i] = Integer.parseInt(br.readLine());
}
for(int i = 0; i < n; i++){
if(isPrime(x[i])){
count++;
}
}
System.out.println(count);
}
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;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
33,
5
],
[
33,
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
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
6,
30
],
[
30,
31
],
[
0,
32
],
[
32,
33
],
[
32,
34
]
] | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n",
"n",
"p",
"p",
"q=0;",
"q",
"0",
"n=scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"System.out.println(q)",
"System.out.println",
"System.out",
"System",
"System.out",
"q",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n for(int j=2; j<(int)Math.sqrt(p)+1; j++)\n if(p%j==0){\n continue prime;\n }\n q++;\n }\n \n System.out.println(q);\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n,p,q=0;
n=scan.nextInt();
prime: for(int i=0; i<n; i++){
p=scan.nextInt();
//System.out.println((int)Math.sqrt(p));
for(int j=2; j<(int)Math.sqrt(p)+1; j++)
if(p%j==0){
continue prime;
}
q++;
}
System.out.println(q);
}
}
|
[
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,
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,
11,
1,
41,
13,
17,
2,
2,
13,
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
],
[
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
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
96,
51
],
[
51,
52
],
[
51,
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
],
[
53,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
68,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
53,
91
],
[
91,
92
],
[
51,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\n\tprivate static boolean isPrime(int num)\n\t{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \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{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\n\tprivate static boolean isPrime(int num)\n\t{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \treturn true;\n\t}\n}",
"Main",
"public static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int n = input.nextInt();",
"n",
"input.nextInt()",
"input.nextInt",
"input",
"int b",
"b",
"count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}",
"{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}",
"if( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;",
"isPrime( input.nextInt() )",
"isPrime",
"input.nextInt()",
"input.nextInt",
"input",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"private static boolean isPrime(int num)\n\t{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \treturn true;\n\t}",
"isPrime",
"{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \treturn true;\n\t}",
"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;",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i * i <= num",
"i * i",
"i",
"i",
"num",
"i += 2",
"i += 2",
"i",
"2",
"if (num % i == 0) return false;",
"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\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\n\tprivate static boolean isPrime(int num)\n\t{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \treturn true;\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\n\tprivate static boolean isPrime(int num)\n\t{\n\t\tif (num == 2 ) return true;\n if (num % 2 == 0) return false;\n for (int i = 3; i * i <= num; i += 2)\n if (num % i == 0) return false;\n \treturn true;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int b, count = 0;
for(int i = 0; i < n; i++)
{
if( isPrime( input.nextInt() ) )
count++;
}
System.out.println(count);
}
private 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,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
14,
4,
18,
13,
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
],
[
58,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
17,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
14,
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
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
14,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
12,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
] | [
"import java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n static int primeCounter = 0;\n\n public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n static int primeCounter = 0;\n\n public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }\n}",
"Main",
"static int primeCounter = 0;",
"primeCounter",
"0",
"public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }",
"main",
"{\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }",
"int numEl;",
"numEl",
"Scanner inp = new Scanner(System.in);",
"inp",
"new Scanner(System.in)",
"numEl = inp.nextInt()",
"numEl",
"inp.nextInt()",
"inp.nextInt",
"inp",
"for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numEl",
"i",
"numEl",
"i++",
"i++",
"i",
"{\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }",
"{\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }",
"BigInteger input = new BigInteger(inp.next());",
"input",
"new BigInteger(inp.next())",
"if (input.isProbablePrime(5)) {\n primeCounter++;\n }",
"input.isProbablePrime(5)",
"input.isProbablePrime",
"input",
"5",
"{\n primeCounter++;\n }",
"primeCounter++",
"primeCounter",
"System.out.println(primeCounter)",
"System.out.println",
"System.out",
"System",
"System.out",
"primeCounter",
"String args[]",
"args",
"public class Main {\n static int primeCounter = 0;\n\n public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }\n}",
"public class Main {\n static int primeCounter = 0;\n\n public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl; i++) {\n BigInteger input = new BigInteger(inp.next());\n\n if (input.isProbablePrime(5)) {\n primeCounter++;\n }\n }\n\n System.out.println(primeCounter);\n }\n}",
"Main"
] | import java.math.BigInteger;
import java.util.*;
public class Main {
static int primeCounter = 0;
public static void main(String args[]) {
// input
int numEl;
Scanner inp = new Scanner(System.in);
numEl = inp.nextInt();
for (int i = 0; i < numEl; i++) {
BigInteger input = new BigInteger(inp.next());
if (input.isProbablePrime(5)) {
primeCounter++;
}
}
System.out.println(primeCounter);
}
}
|
[
7,
15,
13,
17,
6,
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,
41,
13,
4,
18,
13,
0,
13,
4,
13,
13,
14,
13,
30,
0,
13,
17,
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
],
[
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
],
[
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
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
6,
57
],
[
57,
58
],
[
116,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
61,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
61,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
88,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
61,
111
],
[
111,
112
],
[
59,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] | [
"import 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\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n\tpublic static boolean isprime(int num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}\n}",
"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\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n\tpublic static boolean isprime(int num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int count = sc.nextInt();",
"count",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sosu=0;",
"sosu",
"0",
"boolean it;",
"it",
"for(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\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 y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}",
"int y = sc.nextInt();",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"it=isprime(y)",
"it",
"isprime(y)",
"isprime",
"y",
"if(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}",
"it",
"{\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",
"public static boolean isprime(int num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}",
"isprime",
"{\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}",
"if (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;",
"num < 2",
"num",
"2",
"return false;",
"false",
"if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;",
"num == 2",
"num",
"2",
"return true;",
"true",
"if (num % 2 == 0) 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\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\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{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\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\tScanner sc = new Scanner(System.in);\n\t\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n\tpublic static boolean isprime(int num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\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\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(it) {\n\t\t\t\tsosu += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sosu);\n\t}\n\tpublic static boolean isprime(int num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false;\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int count = sc.nextInt();
int sosu=0;
boolean it;
for(int i=0; i<count; i++) {
int y = sc.nextInt();
it=isprime(y);
if(it) {
sosu += 1;
}
}
System.out.println(sosu);
}
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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
17,
0,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
30,
40,
13,
3,
40,
13,
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
],
[
87,
5
],
[
87,
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
],
[
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
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
39,
48
],
[
48,
49
],
[
48,
50
],
[
39,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
51,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
58,
69
],
[
69,
70
],
[
39,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
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;\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 num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.out.println(cnt);\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 num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.out.println(cnt);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.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 num",
"num",
"cnt=0",
"cnt",
"0",
"j",
"j",
"a=0;",
"a",
"0",
"for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }",
"{\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }",
"num=sc.nextInt()",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"j=2",
"j",
"2",
"a=0",
"a",
"0",
"while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }",
"j<=Math.sqrt(num)",
"j",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"{\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }",
"if(num%j==0){\n a++;\n break;\n }",
"num%j==0",
"num%j",
"num",
"j",
"0",
"{\n a++;\n break;\n }",
"a++",
"a",
"break;",
"j++",
"j",
"if(a==0){\n cnt++;\n }",
"a==0",
"a",
"0",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"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 int num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.out.println(cnt);\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 num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<=Math.sqrt(num)){\n if(num%j==0){\n a++;\n break;\n }\n j++;\n }\n if(a==0){\n cnt++;\n }\n }\n System.out.println(cnt);\n }\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 num,cnt=0,j,a=0;
for(int i=0;i<n;i++){
num=sc.nextInt();
j=2;
a=0;
while(j<=Math.sqrt(num)){
if(num%j==0){
a++;
break;
}
j++;
}
if(a==0){
cnt++;
}
}
System.out.println(cnt);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
4,
13,
13,
30,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
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,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
133,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
17,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
14,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
49,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
14,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
76,
77
],
[
12,
78
],
[
78,
79
],
[
133,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
82,
103
],
[
103,
104
],
[
103,
105
],
[
82,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
106,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
114,
120
],
[
120,
121
],
[
121,
122
],
[
113,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
82,
128
],
[
128,
129
],
[
80,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n//import java.util.Collections;\n\npublic class Main{\n public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }\n// 素直に解説のとおりに実装\n static boolean isPrime(int n){\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main{\n public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }\n// 素直に解説のとおりに実装\n static boolean isPrime(int n){\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }",
"main",
"{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }",
"int number;",
"number",
"ArrayList<Integer> prime = new ArrayList<>();",
"prime",
"new ArrayList<>()",
"ArrayList<Integer> exist = new ArrayList<>();",
"exist",
"new ArrayList<>()",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(line);",
"n",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }",
"{\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"number = Integer.parseInt(line)",
"number",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"if(isPrime(number)){\n prime.add(number);\n }",
"isPrime(number)",
"isPrime",
"number",
"{\n prime.add(number);\n }",
"prime.add(number)",
"prime.add",
"prime",
"number",
"System.out.println(prime.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"prime.size()",
"prime.size",
"prime",
"String[] args",
"args",
"// 素直に解説のとおりに実装\n static boolean isPrime(int n){\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }",
"isPrime",
"{\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }",
"if(n==2) {\n return true;\n }",
"n==2",
"n",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(n<2 || n%2==0){\n return false;\n }",
"n<2 || n%2==0",
"n<2",
"n",
"2",
"n%2==0",
"n%2",
"n",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }",
"i<=Math.sqrt((double)n)",
"i",
"Math.sqrt((double)n)",
"Math.sqrt",
"Math",
"(double)n",
"{\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }",
"if(n%i==0){\n return false;\n }",
"n%i==0",
"n%i",
"n",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int n",
"n",
"public class Main{\n public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }\n// 素直に解説のとおりに実装\n static boolean isPrime(int n){\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }\n}",
"public class Main{\n public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer> exist = new ArrayList<>();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n for(int i = 0; i<n ; i++) {\n line = br.readLine();\n number = Integer.parseInt(line);\n if(isPrime(number)){\n prime.add(number);\n }\n }\n// Collections.sort(exist);\n// number = exist.get(exist.size()-1);\n//\n// if(number >= 2){\n// prime.add(2);\n// }\n//\n// for (int i = 3; i <= number; i += 2) {\n// isPrime = true;\n// for (int p : prime) {\n// comp = (double) i / (double) p;\n// if (p == 1) {\n// continue;\n// }\n// if (i % p == 0) { //iが見つかった素数で割り切れる\n// isPrime = false;\n// break;\n// } else if (p > comp) {\n// break;\n// }\n// }\n// if (isPrime) {\n// prime.add(i);\n// }\n// }\n// for( int e : exist){\n// if(prime.contains(e)){\n// count++;\n// }\n// }\n \n System.out.println(prime.size());\n }\n// 素直に解説のとおりに実装\n static boolean isPrime(int n){\n if(n==2) {\n return true;\n }\n if(n<2 || n%2==0){\n return false;\n }\n\n int i = 3;\n while(i<=Math.sqrt((double)n)){\n if(n%i==0){\n return false;\n }\n i = i + 2;\n }\n return true;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
//import java.util.Collections;
public class Main{
public static void main(String[] args) throws Exception{
int number;
ArrayList<Integer> prime = new ArrayList<>();
ArrayList<Integer> exist = new ArrayList<>();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
int n = Integer.parseInt(line);
for(int i = 0; i<n ; i++) {
line = br.readLine();
number = Integer.parseInt(line);
if(isPrime(number)){
prime.add(number);
}
}
// Collections.sort(exist);
// number = exist.get(exist.size()-1);
//
// if(number >= 2){
// prime.add(2);
// }
//
// for (int i = 3; i <= number; i += 2) {
// isPrime = true;
// for (int p : prime) {
// comp = (double) i / (double) p;
// if (p == 1) {
// continue;
// }
// if (i % p == 0) { //iが見つかった素数で割り切れる
// isPrime = false;
// break;
// } else if (p > comp) {
// break;
// }
// }
// if (isPrime) {
// prime.add(i);
// }
// }
// for( int e : exist){
// if(prime.contains(e)){
// count++;
// }
// }
System.out.println(prime.size());
}
// 素直に解説のとおりに実装
static boolean isPrime(int n){
if(n==2) {
return true;
}
if(n<2 || n%2==0){
return false;
}
int i = 3;
while(i<=Math.sqrt((double)n)){
if(n%i==0){
return false;
}
i = i + 2;
}
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,
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,
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,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
122,
11
],
[
122,
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
],
[
29,
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
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
12,
63
],
[
63,
64
],
[
122,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
67,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
91,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
91,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
67,
117
],
[
117,
118
],
[
65,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] | [
"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 NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\n }\n\n private static boolean checkPrimeNumber(int number) {\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\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 NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\n }\n\n private static boolean checkPrimeNumber(int number) {\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\n }\n return true;\n }\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\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 number = 0;",
"number",
"0",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }",
"{\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }",
"if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }",
"checkPrimeNumber(Integer.parseInt(br.readLine()))",
"checkPrimeNumber",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"private static boolean checkPrimeNumber(int number) {\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\n }\n return true;\n }",
"checkPrimeNumber",
"{\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\n }\n return true;\n }",
"if(number < 2){\n return false;\n }",
"number < 2",
"number",
"2",
"{\n return false;\n }",
"return false;",
"false",
"if(number == 2){\n return true;\n }",
"number == 2",
"number",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if(number % 2 == 0){\n return false;\n }",
"number % 2 == 0",
"number % 2",
"number",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\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 return false;\n }\n }",
"{\n if(number % i == 0){\n return false;\n }\n }",
"if(number % i == 0){\n return false;\n }",
"number % i == 0",
"number % i",
"number",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int number",
"number",
"public class Main {\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\n }\n\n private static boolean checkPrimeNumber(int number) {\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n\n int number = 0;\n int count = 0;\n\n for(int i = 0; i < n; i++){\n if(checkPrimeNumber(Integer.parseInt(br.readLine()))){\n count++;\n }\n }\n System.out.println(count);\n }\n\n private static boolean checkPrimeNumber(int number) {\n if(number < 2){\n return false;\n }\n if(number == 2){\n return true;\n }\n if(number % 2 == 0){\n return false;\n }\n for(int i = 3; i <= Math.sqrt(number); i += 2){\n if(number % i == 0){\n return false;\n }\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 NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int number = 0;
int count = 0;
for(int i = 0; i < n; i++){
if(checkPrimeNumber(Integer.parseInt(br.readLine()))){
count++;
}
}
System.out.println(count);
}
private static boolean checkPrimeNumber(int number) {
if(number < 2){
return false;
}
if(number == 2){
return true;
}
if(number % 2 == 0){
return false;
}
for(int i = 3; i <= Math.sqrt(number); i += 2){
if(number % i == 0){
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
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,
2,
13,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
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
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
50,
58
],
[
58,
59
],
[
11,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
9,
66
],
[
66,
67
],
[
118,
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
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
77,
87
],
[
87,
88
],
[
70,
89
],
[
89,
90
],
[
89,
91
],
[
70,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
92,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
106,
107
],
[
99,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
70,
113
],
[
113,
114
],
[
68,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int prime(int x){\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int prime(int x){\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}\n}",
"Main",
"public static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}",
"int i",
"i",
"j",
"j",
"k;",
"k",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[] = new int[n];",
"a",
"new int[n]",
"n",
"int count = 0;",
"count",
"0",
"for(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}",
"{\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(prime(a[i]) == 1) count++;",
"prime(a[i]) == 1",
"prime(a[i])",
"prime",
"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 prime(int x){\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}",
"prime",
"{\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}",
"if(x == 2) return 1;",
"x == 2",
"x",
"2",
"return 1;",
"1",
"if(x <= 1 || x % 2 == 0) return 0;",
"x <= 1 || x % 2 == 0",
"x <= 1",
"x",
"1",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"return 0;",
"0",
"int i = 3;",
"i",
"3",
"while( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}",
"if(x % i == 0) return 0;",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"return 0;",
"0",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"return 1;",
"1",
"int x",
"x",
"public class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int prime(int x){\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}\n}",
"public class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime(a[i]) == 1) count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int prime(int x){\n\t\tif(x == 2) return 1;\n\t\tif(x <= 1 || x % 2 == 0) return 0;\n\t\tint i = 3;\n\t\t\n\t\twhile( i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0) return 0;\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn 1;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int i, j, k;
int n = sc.nextInt();
int a[] = new int[n];
int count = 0;
for(i = 0; i < n; i++){
a[i] = sc.nextInt();
if(prime(a[i]) == 1) count++;
}
System.out.println(count);
}
public static int prime(int x){
if(x == 2) return 1;
if(x <= 1 || x % 2 == 0) return 0;
int i = 3;
while( i <= Math.sqrt(x)){
if(x % i == 0) return 0;
i = i + 2;
}
return 1;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
13,
18,
13,
13,
14,
2,
4,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
29,
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,
2,
13,
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
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
11,
32
],
[
32,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
11,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
38,
48
],
[
48,
49
],
[
49,
50
],
[
38,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
11,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
86,
94
],
[
94,
95
],
[
11,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
11,
102
],
[
9,
103
],
[
103,
104
],
[
7,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
114,
124
],
[
124,
125
],
[
107,
126
],
[
126,
127
],
[
126,
128
],
[
107,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
129,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
137,
143
],
[
143,
144
],
[
136,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
107,
150
],
[
150,
151
],
[
105,
152
],
[
152,
153
]
] | [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args) throws Exception{\n\tint i=0;\n\tint Prime_COUNT = 0;\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tString str_A = br.readLine();\n\t\n\tint n = Integer.parseInt(str_A);\n\t\n\tint A[];\n\tA = new int[n];\n\t \n\tfor(i=0;i<A.length;i++){\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}\n\t\n\tfor(i=0;i<A.length;i++){\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}\n\t\n\tSystem.out.println(Prime_COUNT);\n\treturn ;\n }\n\n public static boolean isPrime(int x){\n\tif(x == 2) return true;\n\tif(x<2 || x%2 == 0) return false;\n\n\tint i = 3;\n\twhile(i<= Math.sqrt((double)x)){\n\t if(x%i == 0) return false;\n\t i = i+2;\n\t}\n\n\treturn true;\n }\n}\n \n",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args) throws Exception{\n\tint i=0;\n\tint Prime_COUNT = 0;\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tString str_A = br.readLine();\n\t\n\tint n = Integer.parseInt(str_A);\n\t\n\tint A[];\n\tA = new int[n];\n\t \n\tfor(i=0;i<A.length;i++){\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}\n\t\n\tfor(i=0;i<A.length;i++){\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}\n\t\n\tSystem.out.println(Prime_COUNT);\n\treturn ;\n }\n\n public static boolean isPrime(int x){\n\tif(x == 2) return true;\n\tif(x<2 || x%2 == 0) return false;\n\n\tint i = 3;\n\twhile(i<= Math.sqrt((double)x)){\n\t if(x%i == 0) return false;\n\t i = i+2;\n\t}\n\n\treturn true;\n }\n}",
"Main",
"public static void main(String[] args) throws Exception{\n\tint i=0;\n\tint Prime_COUNT = 0;\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tString str_A = br.readLine();\n\t\n\tint n = Integer.parseInt(str_A);\n\t\n\tint A[];\n\tA = new int[n];\n\t \n\tfor(i=0;i<A.length;i++){\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}\n\t\n\tfor(i=0;i<A.length;i++){\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}\n\t\n\tSystem.out.println(Prime_COUNT);\n\treturn ;\n }",
"main",
"{\n\tint i=0;\n\tint Prime_COUNT = 0;\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tString str_A = br.readLine();\n\t\n\tint n = Integer.parseInt(str_A);\n\t\n\tint A[];\n\tA = new int[n];\n\t \n\tfor(i=0;i<A.length;i++){\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}\n\t\n\tfor(i=0;i<A.length;i++){\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}\n\t\n\tSystem.out.println(Prime_COUNT);\n\treturn ;\n }",
"int i=0;",
"i",
"0",
"int Prime_COUNT = 0;",
"Prime_COUNT",
"0",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str_A = br.readLine();",
"str_A",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(str_A);",
"n",
"Integer.parseInt(str_A)",
"Integer.parseInt",
"Integer",
"str_A",
"int A[];",
"A",
"A = new int[n]",
"A",
"new int[n]",
"n",
"for(i=0;i<A.length;i++){\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}",
"i=0;",
"i=0",
"i",
"0",
"i<A.length",
"i",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}",
"{\n\t String a = br.readLine();\n\t A[i] = Integer.parseInt(a);\n\t}",
"String a = br.readLine();",
"a",
"br.readLine()",
"br.readLine",
"br",
"A[i] = Integer.parseInt(a)",
"A[i]",
"A",
"i",
"Integer.parseInt(a)",
"Integer.parseInt",
"Integer",
"a",
"for(i=0;i<A.length;i++){\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}",
"i=0;",
"i=0",
"i",
"0",
"i<A.length",
"i",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}",
"{\n\t isPrime(A[i]);\n\t if(isPrime(A[i]) == true) Prime_COUNT++;\n\t}",
"isPrime(A[i])",
"isPrime",
"A[i]",
"A",
"i",
"if(isPrime(A[i]) == true) Prime_COUNT++;",
"isPrime(A[i]) == true",
"isPrime(A[i])",
"isPrime",
"A[i]",
"A",
"i",
"true",
"Prime_COUNT++",
"Prime_COUNT",
"System.out.println(Prime_COUNT)",
"System.out.println",
"System.out",
"System",
"System.out",
"Prime_COUNT",
"return ;",
"String[] args",
"args",
"public static boolean isPrime(int x){\n\tif(x == 2) return true;\n\tif(x<2 || x%2 == 0) return false;\n\n\tint i = 3;\n\twhile(i<= Math.sqrt((double)x)){\n\t if(x%i == 0) return false;\n\t i = i+2;\n\t}\n\n\treturn true;\n }",
"isPrime",
"{\n\tif(x == 2) return true;\n\tif(x<2 || x%2 == 0) return false;\n\n\tint i = 3;\n\twhile(i<= Math.sqrt((double)x)){\n\t if(x%i == 0) return false;\n\t i = i+2;\n\t}\n\n\treturn true;\n }",
"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 if(x%i == 0) return false;\n\t i = i+2;\n\t}",
"i<= Math.sqrt((double)x)",
"i",
"Math.sqrt((double)x)",
"Math.sqrt",
"Math",
"(double)x",
"{\n\t if(x%i == 0) return false;\n\t i = i+2;\n\t}",
"if(x%i == 0) return false;",
"x%i == 0",
"x%i",
"x",
"i",
"0",
"return false;",
"false",
"i = i+2",
"i",
"i+2",
"i",
"2",
"return true;",
"true",
"int x",
"x"
] | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) throws Exception{
int i=0;
int Prime_COUNT = 0;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str_A = br.readLine();
int n = Integer.parseInt(str_A);
int A[];
A = new int[n];
for(i=0;i<A.length;i++){
String a = br.readLine();
A[i] = Integer.parseInt(a);
}
for(i=0;i<A.length;i++){
isPrime(A[i]);
if(isPrime(A[i]) == true) Prime_COUNT++;
}
System.out.println(Prime_COUNT);
return ;
}
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 = i+2;
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
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,
18,
13,
2,
13,
17,
30,
40,
13,
4,
18,
13,
4,
18,
18,
13,
13,
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,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
2,
13,
17,
30,
41,
13,
17,
42,
17,
30,
14,
2,
2,
2,
13,
13,
17,
13,
30,
3,
0,
18,
13,
2,
2,
13,
13,
17,
17,
40,
13,
29,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
145,
5
],
[
145,
6
],
[
6,
7
],
[
6,
8
],
[
145,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
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
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
11,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
9,
63
],
[
63,
64
],
[
145,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
67,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
67,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
95,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
122,
128
],
[
121,
129
],
[
129,
130
],
[
120,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
131,
139
],
[
120,
140
],
[
140,
141
],
[
67,
142
],
[
142,
143
],
[
0,
144
],
[
144,
145
],
[
144,
146
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic int MAX_COUNT= 100000000;\n\tpublic static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean[] createIsPrimeNumber(){\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic int MAX_COUNT= 100000000;\n\tpublic static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean[] createIsPrimeNumber(){\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}\n}",
"Main",
"static int MAX_COUNT= 100000000;",
"MAX_COUNT",
"100000000",
"public static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}",
"boolean[] isPrimeNumber = createIsPrimeNumber();",
"isPrimeNumber",
"createIsPrimeNumber()",
"createIsPrimeNumber",
"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 temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\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 temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int temp= sc.nextInt();",
"temp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}",
"isPrimeNumber[temp - 1]",
"isPrimeNumber",
"temp - 1",
"temp",
"1",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"sc.close()",
"sc.close",
"sc",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean[] createIsPrimeNumber(){\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}",
"createIsPrimeNumber",
"{\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}",
"boolean[] isPrimeNumber = new boolean[MAX_COUNT];",
"isPrimeNumber",
"new boolean[MAX_COUNT]",
"MAX_COUNT",
"for(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <MAX_COUNT",
"i",
"MAX_COUNT",
"i++",
"i++",
"i",
"{\n\t\t\tisPrimeNumber[i] = true;\n\t\t}",
"{\n\t\t\tisPrimeNumber[i] = true;\n\t\t}",
"isPrimeNumber[i] = true",
"isPrimeNumber[i]",
"isPrimeNumber",
"i",
"true",
"isPrimeNumber[0] = false",
"isPrimeNumber[0]",
"isPrimeNumber",
"0",
"false",
"for(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < MAX_COUNT",
"i",
"MAX_COUNT",
"i++",
"i++",
"i",
"{\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"isPrimeNumber[i - 1]",
"isPrimeNumber",
"i - 1",
"i",
"1",
"{\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"int count = 2;",
"count",
"2",
"while(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"true",
"{\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"if((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"(i * count - 1) >= MAX_COUNT",
"(i * count - 1)",
"i * count",
"i",
"count",
"1",
"MAX_COUNT",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"isPrimeNumber[i * count - 1] = false",
"isPrimeNumber[i * count - 1]",
"isPrimeNumber",
"i * count - 1",
"i * count",
"i",
"count",
"1",
"false",
"count++",
"count",
"return isPrimeNumber;",
"isPrimeNumber",
"public class Main {\n\tstatic int MAX_COUNT= 100000000;\n\tpublic static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean[] createIsPrimeNumber(){\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}\n}",
"public class Main {\n\tstatic int MAX_COUNT= 100000000;\n\tpublic static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint temp= sc.nextInt();\n\t\t\tif(isPrimeNumber[temp - 1]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t}\n\t\n\tpublic static boolean[] createIsPrimeNumber(){\n\t\tboolean[] isPrimeNumber = new boolean[MAX_COUNT];\n\t\tfor(int i = 0; i <MAX_COUNT; i++){\n\t\t\tisPrimeNumber[i] = true;\n\t\t}\n\t\tisPrimeNumber[0] = false;\n\t\tfor(int i = 2; i < MAX_COUNT; i++){\n\t\t\tif(isPrimeNumber[i - 1]){\n\t\t\t\tint count = 2;\n\t\t\t\twhile(true){\n\t\t\t\t\tif((i * count - 1) >= MAX_COUNT ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tisPrimeNumber[i * count - 1] = false;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isPrimeNumber;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static int MAX_COUNT= 100000000;
public static void main(String[] args){
boolean[] isPrimeNumber = createIsPrimeNumber();
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int count = 0;
for(int i = 0; i <N; i++){
int temp= sc.nextInt();
if(isPrimeNumber[temp - 1]){
count++;
}
}
sc.close();
System.out.println(count);
}
public static boolean[] createIsPrimeNumber(){
boolean[] isPrimeNumber = new boolean[MAX_COUNT];
for(int i = 0; i <MAX_COUNT; i++){
isPrimeNumber[i] = true;
}
isPrimeNumber[0] = false;
for(int i = 2; i < MAX_COUNT; i++){
if(isPrimeNumber[i - 1]){
int count = 2;
while(true){
if((i * count - 1) >= MAX_COUNT ){
break;
}
isPrimeNumber[i * count - 1] = false;
count++;
}
}
}
return isPrimeNumber;
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
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,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
14,
2,
13,
17,
30,
40,
13,
29,
14,
2,
2,
13,
17,
17,
30,
29,
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,
40,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
103,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
24,
25
],
[
24,
26
],
[
19,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
31,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
10,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
8,
46
],
[
46,
47
],
[
103,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
71,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
74,
85
],
[
85,
86
],
[
86,
87
],
[
74,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
50,
98
],
[
98,
99
],
[
48,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static void solve(int num){\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static void solve(int num){\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}\n\n}",
"Main",
"public static int count;",
"count",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\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\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\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",
"for(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"solve(num)",
"solve",
"num",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static void solve(int num){\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}",
"solve",
"{\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}",
"if(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num == 1",
"num",
"1",
"{\n\t\t\treturn;\n\t\t}",
"return;",
"if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num == 2",
"num",
"2",
"{\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}",
"count++",
"count",
"return;",
"if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n\t\t\treturn;\n\t\t}",
"return;",
"{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(num)",
"i",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"if(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\t\t\t\t\treturn;\n\t\t\t\t}",
"return;",
"count++",
"count",
"int num",
"num",
"public class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static void solve(int num){\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}\n\n}",
"public class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n\tpublic static void solve(int num){\n\t\tif(num == 1){\n\t\t\treturn;\n\t\t}\n\t\telse if(num == 2){\n\t\t\tcount++;\n\t\t\treturn;\n\t\t}\n\t\telse if(num % 2 == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 3;i <= Math.sqrt(num); i++){\n\t\t\t\tif(num % i == 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcount++;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static int count;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0;i < n; i++){
int num = sc.nextInt();
solve(num);
}
System.out.println(count);
}
public static void solve(int num){
if(num == 1){
return;
}
else if(num == 2){
count++;
return;
}
else if(num % 2 == 0){
return;
}
else{
for(int i = 3;i <= Math.sqrt(num); i++){
if(num % i == 0){
return;
}
}
}
count++;
}
} |
[
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,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
13,
18,
13,
13,
17,
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
] | [
[
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
],
[
31,
32
],
[
31,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
46,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
],
[
4,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
83,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
90,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
82,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
82,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
112,
124
],
[
125,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
82,
135
],
[
135,
136
],
[
80,
137
],
[
137,
138
]
] | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int[] getNum = new int[a];\n int count = 0; //素数の個数\n\n //標準入力を配列に格納\n for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt();\n }\n for(int i = 0; i < getNum.length; i++) {\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }\n System.out.println(count);\n }\n public static boolean isPrime(int num) {\n //素数の判別\n if(num < 2) {\n \treturn false;\n }\n else if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }\n\n double sqrtNum = Math.sqrt(num);\n for(int i = 3; i <= sqrtNum; i+= 2) {\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int[] getNum = new int[a];\n int count = 0; //素数の個数\n\n //標準入力を配列に格納\n for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt();\n }\n for(int i = 0; i < getNum.length; i++) {\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }\n System.out.println(count);\n }\n public static boolean isPrime(int num) {\n //素数の判別\n if(num < 2) {\n \treturn false;\n }\n else if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }\n\n double sqrtNum = Math.sqrt(num);\n for(int i = 3; i <= sqrtNum; i+= 2) {\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }\n return true;\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int[] getNum = new int[a];\n int count = 0; //素数の個数\n\n //標準入力を配列に格納\n for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt();\n }\n for(int i = 0; i < getNum.length; i++) {\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int[] getNum = new int[a];\n int count = 0; //素数の個数\n\n //標準入力を配列に格納\n for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt();\n }\n for(int i = 0; i < getNum.length; i++) {\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }\n System.out.println(count);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] getNum = new int[a];",
"getNum",
"new int[a]",
"a",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < getNum.length",
"i",
"getNum.length",
"getNum",
"getNum.length",
"i++",
"i++",
"i",
"{\n getNum[i] = scan.nextInt();\n }",
"{\n getNum[i] = scan.nextInt();\n }",
"getNum[i] = scan.nextInt()",
"getNum[i]",
"getNum",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0; i < getNum.length; i++) {\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < getNum.length",
"i",
"getNum.length",
"getNum",
"getNum.length",
"i++",
"i++",
"i",
"{\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }",
"{\n if(isPrime(getNum[i]) == true) {\n \tcount++;\n }\n }",
"if(isPrime(getNum[i]) == true) {\n \tcount++;\n }",
"isPrime(getNum[i]) == true",
"isPrime(getNum[i])",
"isPrime",
"getNum[i]",
"getNum",
"i",
"true",
"{\n \tcount++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"public static boolean isPrime(int num) {\n //素数の判別\n if(num < 2) {\n \treturn false;\n }\n else if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }\n\n double sqrtNum = Math.sqrt(num);\n for(int i = 3; i <= sqrtNum; i+= 2) {\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }\n return true;\n }",
"isPrime",
"{\n //素数の判別\n if(num < 2) {\n \treturn false;\n }\n else if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }\n\n double sqrtNum = Math.sqrt(num);\n for(int i = 3; i <= sqrtNum; i+= 2) {\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }\n return true;\n }",
"if(num < 2) {\n \treturn false;\n }\n else if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }",
"num < 2",
"num",
"2",
"{\n \treturn false;\n }",
"return false;",
"false",
"if(num == 2) {\n \treturn true;\n }\n else if(num % 2 == 0) {\n \treturn false;\n }",
"num == 2",
"num",
"2",
"{\n \treturn true;\n }",
"return true;",
"true",
"if(num % 2 == 0) {\n \treturn false;\n }",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"{\n \treturn false;\n }",
"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 \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrtNum",
"i",
"sqrtNum",
"i+= 2",
"i+= 2",
"i",
"2",
"{\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }",
"{\n \tif(num % i == 0) {\n \t\treturn false;\n \t}\n }",
"if(num % i == 0) {\n \t\treturn false;\n \t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n \t\treturn false;\n \t}",
"return false;",
"false",
"return true;",
"true",
"int num",
"num"
] | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int[] getNum = new int[a];
int count = 0; //素数の個数
//標準入力を配列に格納
for(int i = 0; i < getNum.length; i++) {
getNum[i] = scan.nextInt();
}
for(int i = 0; i < getNum.length; i++) {
if(isPrime(getNum[i]) == true) {
count++;
}
}
System.out.println(count);
}
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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
0,
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,
30,
29,
17,
14,
2,
2,
17,
13,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
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
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
6,
40
],
[
40,
41
],
[
95,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
45,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
44,
65
],
[
65,
66
],
[
65,
67
],
[
44,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
75,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
44,
90
],
[
90,
91
],
[
42,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"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 x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static boolean isPrime(int x) {\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\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 sc = new Scanner(System.in);\n\t\tint x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static boolean isPrime(int x) {\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 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 x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x = 0;",
"x",
"0",
"int count = 0;",
"count",
"0",
"while (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}",
"x = sc.nextInt()",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (isPrime(x))\n\t\t\t\tcount++;",
"isPrime(x)",
"isPrime",
"x",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public static boolean isPrime(int x) {\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"if (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"x == 2",
"x",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}",
"2 > x || x % 2 == 0",
"2 > x",
"2",
"x",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"int i = 3;",
"i",
"3",
"while (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 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 = i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int x",
"x",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static boolean isPrime(int x) {\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 2;\n\t\t}\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\t\tint x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tpublic static boolean isPrime(int x) {\n\t\tif (x == 2) {\n\t\t\treturn true;\n\t\t} else if (2 > x || x % 2 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile (i <= Math.sqrt(x)) {\n\t\t\tif (x % i == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti = i + 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 sc = new Scanner(System.in);
int x = 0;
int count = 0;
while (sc.hasNext()) {
x = sc.nextInt();
if (isPrime(x))
count++;
}
System.out.println(count);
}
public static boolean isPrime(int x) {
if (x == 2) {
return true;
} else if (2 > x || x % 2 == 0) {
return false;
}
int i = 3;
while (i <= Math.sqrt(x)) {
if (x % i == 0) {
return false;
}
i = i + 2;
}
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,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
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
],
[
78,
14
],
[
78,
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
],
[
29,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
33,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
42,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
33,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
17,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
15,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
] | [
"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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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",
"int ans = 0;",
"ans",
"0",
"while (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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}",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"{\n\t\t\tint n = sc.nextInt();\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 = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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\tint ans = 0;\t\t\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\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\n\t\tSystem.out.println(ans);\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();
int ans = 0;
while (sc.hasNextInt()) {
int n = sc.nextInt();
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,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
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,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
6,
43
],
[
43,
44
],
[
75,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
47,
70
],
[
70,
71
],
[
45,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] | [
"import java.util.Scanner;\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 cnt = 0;\n\t\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int num){\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\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 sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int num){\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\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\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) 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\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) 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",
"while(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}",
"n-->0",
"n--",
"n",
"0",
"{\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPrime(num)) cnt++;",
"isPrime(num)",
"isPrime",
"num",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public static boolean isPrime(int num){\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\n\t\treturn true;\n\t}",
"for(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;",
"int i=2;",
"int i=2;",
"i",
"2",
"i*i<=num",
"i*i",
"i",
"i",
"num",
"i++",
"i++",
"i",
"if(num%i==0) return false;",
"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\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\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int num){\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\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\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic static boolean isPrime(int num){\n\t\tfor(int i=2;i*i<=num;i++)\n\t\t\tif(num%i==0) return false;\n\t\treturn true;\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 cnt = 0;
while(n-->0) {
int num = sc.nextInt();
if(isPrime(num)) cnt++;
}
System.out.println(cnt);
}
public static boolean isPrime(int num){
for(int i=2;i*i<=num;i++)
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,
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,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
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
],
[
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
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
6,
71
],
[
71,
72
],
[
111,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
82,
93
],
[
93,
94
],
[
94,
95
],
[
82,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
98,
104
],
[
104,
105
],
[
75,
106
],
[
106,
107
],
[
73,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.out.println(cnt);\n }\n\n public static boolean isPrime(int n) {\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.out.println(cnt);\n }\n\n public static boolean isPrime(int n) {\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\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[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.out.println(cnt);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.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[] x = new int[n];",
"x",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n x[i] = sc.nextInt();\n }",
"{\n x[i] = sc.nextInt();\n }",
"x[i] = sc.nextInt()",
"x[i]",
"x",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (isPrime(x[i])) cnt++;\n }",
"{\n if (isPrime(x[i])) cnt++;\n }",
"if (isPrime(x[i])) cnt++;",
"isPrime(x[i])",
"isPrime",
"x[i]",
"x",
"i",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public static boolean isPrime(int n) {\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\n }",
"if (n == 1) return false;",
"n == 1",
"n",
"1",
"return false;",
"false",
"for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\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) return false;\n }",
"{\n if (n % i == 0) return false;\n }",
"if (n % i == 0) return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.out.println(cnt);\n }\n\n public static boolean isPrime(int n) {\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(x[i])) cnt++;\n }\n\n System.out.println(cnt);\n }\n\n public static boolean isPrime(int n) {\n if (n == 1) return false;\n \n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) return false;\n }\n return true;\n }\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[] x = new int[n];
for (int i = 0; i < n; i++) {
x[i] = sc.nextInt();
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (isPrime(x[i])) cnt++;
}
System.out.println(cnt);
}
public static boolean isPrime(int n) {
if (n == 1) return false;
for (int i = 2; i <= Math.sqrt(n); i++) {
if (n % i == 0) return false;
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
4,
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,
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,
41,
13,
0,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
13,
13,
14,
13,
40,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
6,
11
],
[
11,
12
],
[
122,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
16,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
15,
36
],
[
36,
37
],
[
36,
38
],
[
15,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
39,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
46,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
15,
61
],
[
61,
62
],
[
13,
63
],
[
63,
64
],
[
122,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
67,
76
],
[
76,
77
],
[
67,
78
],
[
78,
79
],
[
67,
80
],
[
80,
81
],
[
80,
82
],
[
67,
83
],
[
83,
84
],
[
67,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
97,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
97,
112
],
[
112,
113
],
[
112,
114
],
[
67,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tstatic void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tstatic void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\trun();\n\t}",
"main",
"{\n\t\trun();\n\t}",
"run()",
"run",
"String args[]",
"args",
"static boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}",
"if(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\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",
"int i = 3;",
"i",
"3",
"while(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}",
"i <= Math.sqrt(x)",
"i",
"Math.sqrt(x)",
"Math.sqrt",
"Math",
"x",
"{\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 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= i + 2",
"i",
"i + 2",
"i",
"2",
"return true;",
"true",
"int x",
"x",
"static void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\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 x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\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 x;",
"x",
"int count;",
"count",
"count = 0",
"count",
"0",
"boolean judge;",
"judge",
"for(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}",
"{\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}",
"x = scan.nextInt()",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"judge = isPrime(x)",
"judge",
"isPrime(x)",
"isPrime",
"x",
"if(judge) count++;",
"judge",
"count++",
"count",
"judge = false",
"judge",
"false",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public class Main {\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tstatic void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti= i + 2;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tstatic void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint count;\n\t\tcount = 0;\n\t\tboolean judge;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tjudge = isPrime(x);\n\t\t\tif(judge) count++;\n\t\t\tjudge = false;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String args[]){
run();
}
static boolean isPrime(int x){
if(x == 2){
return true;
}else 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;
}
static void run(){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int x;
int count;
count = 0;
boolean judge;
for(int i = 0; i < n; i++){
x = scan.nextInt();
judge = isPrime(x);
if(judge) count++;
judge = false;
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
4,
18,
13,
13,
17,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
4,
18,
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
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
20,
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
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
20,
54
],
[
54,
55
],
[
54,
56
],
[
20,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
20,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
77,
83
],
[
76,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
20,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
20,
94
],
[
94,
95
],
[
95,
96
],
[
20,
97
],
[
97,
98
],
[
98,
99
],
[
18,
100
],
[
100,
101
]
] | [
"import java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSet<BigInteger> set=new HashSet<BigInteger>();\n\t\tint c=0;\n\t\tint n=scan.nextInt();\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}\n\t\t\n\t\tArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);\n\t\t\n\t\t\n\t\tint m=set.size();\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(c);\n\t\tbi.clear();\n\t\tset.clear();\n\n\t}\n\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSet<BigInteger> set=new HashSet<BigInteger>();\n\t\tint c=0;\n\t\tint n=scan.nextInt();\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}\n\t\t\n\t\tArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);\n\t\t\n\t\t\n\t\tint m=set.size();\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(c);\n\t\tbi.clear();\n\t\tset.clear();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSet<BigInteger> set=new HashSet<BigInteger>();\n\t\tint c=0;\n\t\tint n=scan.nextInt();\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}\n\t\t\n\t\tArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);\n\t\t\n\t\t\n\t\tint m=set.size();\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(c);\n\t\tbi.clear();\n\t\tset.clear();\n\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tSet<BigInteger> set=new HashSet<BigInteger>();\n\t\tint c=0;\n\t\tint n=scan.nextInt();\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}\n\t\t\n\t\tArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);\n\t\t\n\t\t\n\t\tint m=set.size();\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(c);\n\t\tbi.clear();\n\t\tset.clear();\n\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Set<BigInteger> set=new HashSet<BigInteger>();",
"set",
"new HashSet<BigInteger>()",
"int c=0;",
"c",
"0",
"int n=scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=1;i<=n;i++)\n\t\t{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}",
"{\t\n\t\t\tset.add(scan.nextBigInteger());\n\t\t}",
"set.add(scan.nextBigInteger())",
"set.add",
"set",
"scan.nextBigInteger()",
"scan.nextBigInteger",
"scan",
"ArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);",
"bi",
"new ArrayList<BigInteger>(set)",
"int m=set.size();",
"m",
"set.size()",
"set.size",
"set",
"for(int i=0;i<m;i++)\n\t\t{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"if(bi.get(i).isProbablePrime(10)==true)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}",
"bi.get(i).isProbablePrime(10)==true",
"bi.get(i).isProbablePrime(10)",
"bi.get(i).isProbablePrime",
"bi.get(i)",
"bi.get",
"bi",
"i",
"10",
"true",
"{\n\t\t\t\tc++;\n\t\t\t}",
"c++",
"c",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"bi.clear()",
"bi.clear",
"bi",
"set.clear()",
"set.clear",
"set",
"String[] args",
"args"
] | import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
Set<BigInteger> set=new HashSet<BigInteger>();
int c=0;
int n=scan.nextInt();
for(int i=1;i<=n;i++)
{
set.add(scan.nextBigInteger());
}
ArrayList<BigInteger> bi=new ArrayList<BigInteger>(set);
int m=set.size();
for(int i=0;i<m;i++)
{
if(bi.get(i).isProbablePrime(10)==true)
{
c++;
}
}
System.out.println(c);
bi.clear();
set.clear();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
42,
4,
18,
13,
30,
0,
13,
17,
41,
13,
4,
18,
13,
35,
13,
34,
17,
1,
0,
13,
17,
3,
34,
17,
1,
0,
13,
17,
3,
34,
1,
14,
2,
2,
13,
17,
17,
30,
0,
13,
17,
30,
41,
13,
4,
18,
13,
13,
41,
13,
17,
42,
2,
13,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
0,
13,
17,
30,
40,
13,
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
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
21,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
30,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
30,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
78,
91
],
[
91,
92
],
[
92,
93
],
[
21,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
6,
105
],
[
105,
106
]
] | [
"import java.util.*;\nclass Main {\n public static void main(String...args) {\n Scanner scan = new Scanner(System.in);\n int count = 0;\n boolean isPrime;\n while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\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 scan = new Scanner(System.in);\n int count = 0;\n boolean isPrime;\n while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\n count++;\n }\n }\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String...args) {\n Scanner scan = new Scanner(System.in);\n int count = 0;\n boolean isPrime;\n while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\n count++;\n }\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int count = 0;\n boolean isPrime;\n while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\n count++;\n }\n }\n System.out.println(count);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int count = 0;",
"count",
"0",
"boolean isPrime;",
"isPrime",
"while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\n count++;\n }\n }",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }\n if(isPrime) {\n count++;\n }\n }",
"isPrime = true",
"isPrime",
"true",
"int primeNum = scan.nextInt();",
"primeNum",
"scan.nextInt()",
"scan.nextInt",
"scan",
"switch(primeNum) {\n case 1 :\n isPrime = true;\n break;\n case 2 :\n isPrime = true;\n break;\n default:\n if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }\n }",
"primeNum",
"case 1 :",
"1",
"case 1 :",
"isPrime = true",
"isPrime",
"true",
"break;",
"case 2 :",
"2",
"case 2 :",
"isPrime = true",
"isPrime",
"true",
"break;",
"default:",
"default:",
"if(primeNum % 2 == 0){\n isPrime = false;\n } else {\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }",
"primeNum % 2 == 0",
"primeNum % 2",
"primeNum",
"2",
"0",
"{\n isPrime = false;\n }",
"isPrime = false",
"isPrime",
"false",
"{\n int rootNum = (int)Math.sqrt(primeNum);\n boolean flag = true;\n while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }\n }",
"int rootNum = (int)Math.sqrt(primeNum);",
"rootNum",
"(int)Math.sqrt(primeNum)",
"Math.sqrt",
"Math",
"primeNum",
"boolean flag = true;",
"flag",
"true",
"while(flag && rootNum > 1) {\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }",
"flag && rootNum > 1",
"flag",
"rootNum > 1",
"rootNum",
"1",
"{\n isPrime = true;\n if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }\n }",
"isPrime = true",
"isPrime",
"true",
"if(primeNum % rootNum== 0){\n isPrime = false;\n flag = false;\n }else{\n rootNum--;\n }",
"primeNum % rootNum== 0",
"primeNum % rootNum",
"primeNum",
"rootNum",
"0",
"{\n isPrime = false;\n flag = false;\n }",
"isPrime = false",
"isPrime",
"false",
"flag = false",
"flag",
"false",
"{\n rootNum--;\n }",
"rootNum--",
"rootNum",
"if(isPrime) {\n count++;\n }",
"isPrime",
"{\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 scan = new Scanner(System.in);
int count = 0;
boolean isPrime;
while(scan.hasNext() ) {
isPrime = true;
int primeNum = scan.nextInt();
switch(primeNum) {
case 1 :
isPrime = true;
break;
case 2 :
isPrime = true;
break;
default:
if(primeNum % 2 == 0){
isPrime = false;
} else {
int rootNum = (int)Math.sqrt(primeNum);
boolean flag = true;
while(flag && rootNum > 1) {
isPrime = true;
if(primeNum % rootNum== 0){
isPrime = false;
flag = false;
}else{
rootNum--;
}
}
}
}
if(isPrime) {
count++;
}
}
System.out.println(count);
}
}
|
[
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
4,
18,
20,
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
],
[
0,
13
],
[
13,
14
],
[
13,
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
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
17,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
31,
42
],
[
42,
43
],
[
43,
44
],
[
31,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
52,
57
],
[
57,
58
],
[
58,
59
],
[
17,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
15,
66
],
[
66,
67
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString n = br.readLine();\n\n\t\tString nums;\n\n\t\tint count=0;\n\t\tfor(int i=0; i<Integer.parseInt(n); i++){\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\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.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString n = br.readLine();\n\n\t\tString nums;\n\n\t\tint count=0;\n\t\tfor(int i=0; i<Integer.parseInt(n); i++){\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString n = br.readLine();\n\n\t\tString nums;\n\n\t\tint count=0;\n\t\tfor(int i=0; i<Integer.parseInt(n); i++){\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString n = br.readLine();\n\n\t\tString nums;\n\n\t\tint count=0;\n\t\tfor(int i=0; i<Integer.parseInt(n); i++){\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String n = br.readLine();",
"n",
"br.readLine()",
"br.readLine",
"br",
"String nums;",
"nums",
"int count=0;",
"count",
"0",
"for(int i=0; i<Integer.parseInt(n); i++){\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<Integer.parseInt(n)",
"i",
"Integer.parseInt(n)",
"Integer.parseInt",
"Integer",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\t nums = br.readLine();\n\t\t\tif(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"nums = br.readLine()",
"nums",
"br.readLine()",
"br.readLine",
"br",
"if(new BigInteger(nums).isProbablePrime(10)){\n\t\t\t\tcount++;\n\t\t\t}",
"new BigInteger(nums).isProbablePrime(10)",
"new BigInteger(nums).isProbablePrime",
"new BigInteger(nums)",
"10",
"{\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"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String n = br.readLine();
String nums;
int count=0;
for(int i=0; i<Integer.parseInt(n); i++){
nums = br.readLine();
if(new BigInteger(nums).isProbablePrime(10)){
count++;
}
}
System.out.println(count);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
3,
14,
2,
2,
13,
2,
13,
17,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
18,
19
],
[
19,
20
],
[
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
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
36,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
36,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int i",
"i",
"j",
"j",
"n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int count = 0;",
"count",
"0",
"for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n }",
"{\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n }",
"int input = scanner.nextInt();",
"input",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int root = (int)Math.sqrt(input);",
"root",
"(int)Math.sqrt(input)",
"Math.sqrt",
"Math",
"input",
"for(j = 2; j <= root; ++j) if(input%j == 0) break;",
"j = 2;",
"j = 2",
"j",
"2",
"j <= root",
"j",
"root",
"++j",
"++j",
"j",
"if(input%j == 0) break;",
"if(input%j == 0) break;",
"input%j == 0",
"input%j",
"input",
"j",
"0",
"break;",
"if(j == root + 1 || input == 2) ++count;",
"j == root + 1 || input == 2",
"j == root + 1",
"j",
"root + 1",
"root",
"1",
"input == 2",
"input",
"2",
"++count",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int root = (int)Math.sqrt(input);\n for(j = 2; j <= root; ++j) if(input%j == 0) break;\n if(j == root + 1 || input == 2) ++count;\n } \n System.out.println(count);\n scanner.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int i, j, n = scanner.nextInt();
int count = 0;
for(i = 0; i < n; ++i){
int input = scanner.nextInt();
int root = (int)Math.sqrt(input);
for(j = 2; j <= root; ++j) if(input%j == 0) break;
if(j == root + 1 || input == 2) ++count;
}
System.out.println(count);
scanner.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
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
],
[
104,
5
],
[
104,
6
],
[
6,
7
],
[
6,
8
],
[
104,
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
],
[
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
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
11,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
9,
46
],
[
46,
47
],
[
104,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
54,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
50,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
72,
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
],
[
50,
99
],
[
99,
100
],
[
48,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] | [
"import java.util.*;\n\npublic class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }\n \n private static int primeCheck(int x) {\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }\n \n private static int primeCheck(int x) {\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }\n}",
"Main",
"private static final Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }",
"main",
"{\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }",
"int c = 0",
"c",
"0",
"n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n c += primeCheck(scn.nextInt());\n }",
"{\n c += primeCheck(scn.nextInt());\n }",
"c += primeCheck(scn.nextInt())",
"c",
"primeCheck(scn.nextInt())",
"primeCheck",
"scn.nextInt()",
"scn.nextInt",
"scn",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"private static int primeCheck(int x) {\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }",
"primeCheck",
"{\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }",
"int rslt = 1;",
"rslt",
"1",
"if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }",
"x < 2 || x > 3 && x % 2 == 0",
"x < 2",
"x",
"2",
"x > 3 && x % 2 == 0",
"x > 3",
"x",
"3",
"x % 2 == 0",
"x % 2",
"x",
"2",
"0",
"{\n rslt = 0;\n }",
"rslt = 0",
"rslt",
"0",
"for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= x / i",
"i",
"x / i",
"x",
"i",
"i += 2",
"i += 2",
"i",
"2",
"{\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }",
"{\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }",
"if(x % i == 0) {\n rslt = 0;\n break;\n }",
"x % i == 0",
"x % i",
"x",
"i",
"0",
"{\n rslt = 0;\n break;\n }",
"rslt = 0",
"rslt",
"0",
"break;",
"return rslt;",
"rslt",
"int x",
"x",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }\n \n private static int primeCheck(int x) {\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }\n}",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.println(c);\n }\n \n private static int primeCheck(int x) {\n int rslt = 1;\n if(x < 2 || x > 3 && x % 2 == 0) {\n rslt = 0;\n }\n for(int i = 3; i <= x / i; i += 2) {\n if(x % i == 0) {\n rslt = 0;\n break;\n }\n }\n return rslt;\n }\n}",
"Main"
] | import java.util.*;
public class Main {
private static final Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
int c = 0, n = scn.nextInt();
for(int i = 0; i < n; i++) {
c += primeCheck(scn.nextInt());
}
System.out.println(c);
}
private static int primeCheck(int x) {
int rslt = 1;
if(x < 2 || x > 3 && x % 2 == 0) {
rslt = 0;
}
for(int i = 3; i <= x / i; i += 2) {
if(x % i == 0) {
rslt = 0;
break;
}
}
return rslt;
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
20,
23,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
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,
0,
13,
4,
18,
13,
13,
18,
13,
13,
0,
13,
20,
2,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
9,
41,
13,
17,
42,
2,
2,
13,
13,
2,
13,
17,
30,
0,
18,
13,
2,
13,
13,
17,
40,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
152,
8
],
[
8,
9
],
[
152,
10
],
[
10,
11
],
[
152,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
152,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
20,
33
],
[
33,
34
],
[
33,
35
],
[
20,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
20,
65
],
[
65,
66
],
[
65,
67
],
[
68,
69
],
[
68,
70
],
[
20,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
20,
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
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
98,
100
],
[
92,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
109,
117
],
[
117,
118
],
[
20,
119
],
[
119,
120
],
[
119,
121
],
[
20,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
122,
133
],
[
134,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
135,
142
],
[
142,
143
],
[
143,
144
],
[
20,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tint n;\n\tint list[];\n\tboolean sieve[];\n\tpublic static void main(String main[]) {\n\t\tnew Main();\n\t}\n\tMain() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tint n;\n\tint list[];\n\tboolean sieve[];\n\tpublic static void main(String main[]) {\n\t\tnew Main();\n\t}\n\tMain() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main",
"int n;",
"n",
"int list[];",
"list",
"boolean sieve[];",
"sieve",
"public static void main(String main[]) {\n\t\tnew Main();\n\t}",
"main",
"{\n\t\tnew Main();\n\t}",
"new Main()",
"String main[]",
"main",
"Main() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"Main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"list = new int[n]",
"list",
"new int[n]",
"n",
"int max = 0;",
"max",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}",
"{\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}",
"list [i] = scan.nextInt()",
"list [i]",
"list",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"max = Math.max(max, list[i])",
"max",
"Math.max(max, list[i])",
"Math.max",
"Math",
"max",
"list[i]",
"list",
"i",
"sieve = new boolean[max + 1]",
"sieve",
"new boolean[max + 1]",
"max + 1",
"max",
"1",
"int sqMax = (int)Math.round(Math.sqrt(max));",
"sqMax",
"(int)Math.round(Math.sqrt(max))",
"Math.round",
"Math",
"Math.sqrt(max)",
"Math.sqrt",
"Math",
"max",
"for (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= sqMax",
"i",
"sqMax",
"i++",
"i++",
"i",
"{\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}",
"if (sieve[i])continue;",
"sieve[i]",
"sieve",
"i",
"continue;",
"int j = 2;",
"j",
"2",
"while (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}",
"i * j < max + 1",
"i * j",
"i",
"j",
"max + 1",
"max",
"1",
"{\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}",
"sieve[i * j] = true",
"sieve[i * j]",
"sieve",
"i * j",
"i",
"j",
"true",
"j++",
"j",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\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\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}",
"if (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}",
"!sieve[list[i]]",
"sieve[list[i]]",
"sieve",
"list[i]",
"list",
"i",
"{\n\t\t\t\tcnt++;\n\t\t\t}",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"public class Main {\n\tint n;\n\tint list[];\n\tboolean sieve[];\n\tpublic static void main(String main[]) {\n\t\tnew Main();\n\t}\n\tMain() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"public class Main {\n\tint n;\n\tint list[];\n\tboolean sieve[];\n\tpublic static void main(String main[]) {\n\t\tnew Main();\n\t}\n\tMain() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist [i] = scan.nextInt();\n\t\t\tmax = Math.max(max, list[i]);\n\t\t}\n\t\tsieve = new boolean[max + 1];\n\t\tint sqMax = (int)Math.round(Math.sqrt(max));\n\t\tfor (int i = 2; i <= sqMax; i++) {\n\t\t\tif (sieve[i])continue;\n\t\t\tint j = 2;\n\t\t\twhile (i * j < max + 1) {\n\t\t\t\tsieve[i * j] = true;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!sieve[list[i]]) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
int n;
int list[];
boolean sieve[];
public static void main(String main[]) {
new Main();
}
Main() {
Scanner scan = new Scanner(System.in);
n = scan.nextInt();
list = new int[n];
int max = 0;
for (int i = 0; i < n; i++) {
list [i] = scan.nextInt();
max = Math.max(max, list[i]);
}
sieve = new boolean[max + 1];
int sqMax = (int)Math.round(Math.sqrt(max));
for (int i = 2; i <= sqMax; i++) {
if (sieve[i])continue;
int j = 2;
while (i * j < max + 1) {
sieve[i * j] = true;
j++;
}
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (!sieve[list[i]]) {
cnt++;
}
}
System.out.println(cnt);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
18,
36,
13,
4,
18,
13,
0,
18,
36,
13,
20,
18,
36,
13,
11,
1,
41,
13,
17,
2,
13,
18,
36,
13,
1,
40,
13,
30,
30,
0,
18,
18,
36,
13,
13,
4,
18,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
36,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
4,
18,
13,
18,
18,
36,
13,
13,
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,
40,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
13,
42,
2,
13,
17,
30,
14,
40,
18,
13,
2,
13,
17,
30,
0,
18,
13,
2,
13,
17,
17,
0,
13,
13,
4,
18,
18,
13,
13,
2,
17,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
36,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
40,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
13,
17,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
253,
5
],
[
253,
6
],
[
6,
7
],
[
253,
8
],
[
8,
9
],
[
253,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
12,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
28,
29
],
[
28,
30
],
[
12,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
31,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
253,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
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
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
75,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
103,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
75,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
119,
120
],
[
57,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
253,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
129,
135
],
[
135,
136
],
[
135,
137
],
[
129,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
129,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
144,
149
],
[
149,
150
],
[
149,
151
],
[
144,
152
],
[
152,
153
],
[
153,
154
],
[
144,
155
],
[
156,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
165,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
176,
178
],
[
173,
179
],
[
164,
180
],
[
180,
181
],
[
180,
182
],
[
156,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
183,
188
],
[
188,
189
],
[
188,
190
],
[
129,
191
],
[
191,
192
],
[
191,
193
],
[
129,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
194,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
201,
203
],
[
194,
204
],
[
204,
205
],
[
205,
206
],
[
194,
207
],
[
208,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
209,
214
],
[
214,
215
],
[
215,
216
],
[
129,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
129,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
129,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
228,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
233,
237
],
[
253,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
245,
246
],
[
240,
247
],
[
247,
248
],
[
248,
249
],
[
238,
250
],
[
250,
251
],
[
0,
252
],
[
252,
253
],
[
252,
254
]
] | [
"import java.util.Scanner;\n\n/**\n * Prime\n */\npublic class Main {\n\n public int size;\n public int[] mx;\n\n public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }\n\n public void taskA() {\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }\n\n public void taskB() {\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }\n\n public static void main(String[] args) {\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public int size;\n public int[] mx;\n\n public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }\n\n public void taskA() {\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }\n\n public void taskB() {\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }\n\n public static void main(String[] args) {\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }\n}",
"Main",
"public int size;",
"size",
"public int[] mx;",
"mx",
"public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }",
"scan",
"{\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"this.size = sc.nextInt()",
"this.size",
"this",
"this.size",
"sc.nextInt()",
"sc.nextInt",
"sc",
"this.mx = new int[this.size]",
"this.mx",
"this",
"this.mx",
"new int[this.size]",
"this.size",
"this",
"this.size",
"for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < this.size",
"i",
"this.size",
"this",
"this.size",
"i++",
"i++",
"i",
"{\n this.mx[i] = sc.nextInt();\n }",
"{\n this.mx[i] = sc.nextInt();\n }",
"this.mx[i] = sc.nextInt()",
"this.mx[i]",
"this.mx",
"this",
"this.mx",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"public void taskA() {\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }",
"taskA",
"{\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < this.size",
"i",
"this.size",
"this",
"this.size",
"i++",
"i++",
"i",
"{\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }",
"{\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }",
"boolean flg = false;",
"flg",
"false",
"int sqrt = (int) (Math.sqrt(this.mx[i]));",
"sqrt",
"(int) (Math.sqrt(this.mx[i]))",
"Math.sqrt",
"Math",
"this.mx[i]",
"this.mx",
"this",
"this.mx",
"i",
"for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j <= sqrt",
"j",
"sqrt",
"j++",
"j++",
"j",
"{\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }",
"{\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }",
"if (mx[i] % j == 0) {\n flg = true;\n break;\n }",
"mx[i] % j == 0",
"mx[i] % j",
"mx[i]",
"mx",
"i",
"j",
"0",
"{\n flg = true;\n break;\n }",
"flg = true",
"flg",
"true",
"break;",
"if (!flg) {\n count++;\n }",
"!flg",
"flg",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"public void taskB() {\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }",
"taskB",
"{\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }",
"long start = System.currentTimeMillis();",
"start",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"boolean[] eratosthenes = new boolean[100000000];",
"eratosthenes",
"new boolean[100000000]",
"100000000",
"eratosthenes[0] = true",
"eratosthenes[0]",
"eratosthenes",
"0",
"true",
"for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= 100000000",
"i",
"100000000",
"i++",
"i++",
"i",
"{\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }",
"{\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }",
"int j = i;",
"j",
"i",
"while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }",
"j <= 100000000",
"j",
"100000000",
"{\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }",
"if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }",
"!eratosthenes[j - 1]",
"eratosthenes[j - 1]",
"eratosthenes",
"j - 1",
"j",
"1",
"{\n eratosthenes[j - 1] = true;\n }",
"eratosthenes[j - 1] = true",
"eratosthenes[j - 1]",
"eratosthenes",
"j - 1",
"j",
"1",
"true",
"j += i",
"j",
"i",
"System.out.println(\"end: \" + i)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"end: \" + i",
"\"end: \"",
"i",
"int count = 0;",
"count",
"0",
"for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < this.size",
"i",
"this.size",
"this",
"this.size",
"i++",
"i++",
"i",
"{\n if (!eratosthenes[i]) {\n count++;\n }\n }",
"{\n if (!eratosthenes[i]) {\n count++;\n }\n }",
"if (!eratosthenes[i]) {\n count++;\n }",
"!eratosthenes[i]",
"eratosthenes[i]",
"eratosthenes",
"i",
"{\n count++;\n }",
"count++",
"count",
"long end = System.currentTimeMillis();",
"end",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"System.out.println((end - start) + \"ms\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(end - start) + \"ms\"",
"(end - start)",
"end",
"start",
"\"ms\"",
"public static void main(String[] args) {\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }",
"main",
"{\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }",
"Main prime = new Main();",
"prime",
"new Main()",
"prime.scan()",
"prime.scan",
"prime",
"prime.taskA()",
"prime.taskA",
"prime",
"String[] args",
"args",
"public class Main {\n\n public int size;\n public int[] mx;\n\n public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }\n\n public void taskA() {\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }\n\n public void taskB() {\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }\n\n public static void main(String[] args) {\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }\n}",
"public class Main {\n\n public int size;\n public int[] mx;\n\n public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n this.mx[i] = sc.nextInt();\n }\n }\n\n public void taskA() {\n // long start = System.currentTimeMillis();\n int count = 0;\n for (int i = 0; i < this.size; i++) {\n boolean flg = false;\n int sqrt = (int) (Math.sqrt(this.mx[i]));\n for (int j = 2; j <= sqrt; j++) {\n if (mx[i] % j == 0) {\n flg = true;\n break;\n }\n }\n if (!flg) {\n count++;\n }\n }\n // long end = System.currentTimeMillis();\n System.out.println(count);\n // System.out.println((end - start) + \"ms\");\n }\n\n public void taskB() {\n long start = System.currentTimeMillis();\n boolean[] eratosthenes = new boolean[100000000];\n eratosthenes[0] = true;\n for (int i = 2; i <= 100000000; i++) {\n int j = i;\n while (j <= 100000000) {\n if (!eratosthenes[j - 1]) {\n eratosthenes[j - 1] = true;\n }\n j += i;\n }\n System.out.println(\"end: \" + i);\n }\n int count = 0;\n for (int i = 1; i < this.size; i++) {\n if (!eratosthenes[i]) {\n count++;\n }\n }\n long end = System.currentTimeMillis();\n System.out.println(count);\n System.out.println((end - start) + \"ms\");\n }\n\n public static void main(String[] args) {\n Main prime = new Main();\n prime.scan();\n prime.taskA();\n }\n}",
"Main"
] | import java.util.Scanner;
/**
* Prime
*/
public class Main {
public int size;
public int[] mx;
public void scan() {
Scanner sc = new Scanner(System.in);
this.size = sc.nextInt();
this.mx = new int[this.size];
for (int i = 0; i < this.size; i++) {
this.mx[i] = sc.nextInt();
}
}
public void taskA() {
// long start = System.currentTimeMillis();
int count = 0;
for (int i = 0; i < this.size; i++) {
boolean flg = false;
int sqrt = (int) (Math.sqrt(this.mx[i]));
for (int j = 2; j <= sqrt; j++) {
if (mx[i] % j == 0) {
flg = true;
break;
}
}
if (!flg) {
count++;
}
}
// long end = System.currentTimeMillis();
System.out.println(count);
// System.out.println((end - start) + "ms");
}
public void taskB() {
long start = System.currentTimeMillis();
boolean[] eratosthenes = new boolean[100000000];
eratosthenes[0] = true;
for (int i = 2; i <= 100000000; i++) {
int j = i;
while (j <= 100000000) {
if (!eratosthenes[j - 1]) {
eratosthenes[j - 1] = true;
}
j += i;
}
System.out.println("end: " + i);
}
int count = 0;
for (int i = 1; i < this.size; i++) {
if (!eratosthenes[i]) {
count++;
}
}
long end = System.currentTimeMillis();
System.out.println(count);
System.out.println((end - start) + "ms");
}
public static void main(String[] args) {
Main prime = new Main();
prime.scan();
prime.taskA();
}
}
|
[
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
14,
2,
18,
13,
13,
17,
40,
13,
14,
2,
2,
18,
13,
13,
17,
17,
40,
13,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
13,
18,
13,
13,
17,
2,
13,
17,
1,
0,
13,
2,
13,
17,
30,
30,
14,
2,
2,
18,
13,
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
],
[
131,
5
],
[
131,
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
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
8,
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
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
58,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
70,
78
],
[
78,
79
],
[
58,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
85,
95
],
[
95,
96
],
[
95,
97
],
[
80,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
80,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
106,
114
],
[
114,
115
],
[
58,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
8,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"Main",
"public static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}",
"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\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\tnum[i]=sc.nextInt();\n\t\t}",
"num[i]=sc.nextInt()",
"num[i]",
"num",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int div;",
"div",
"int counter=0;",
"counter",
"0",
"for (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"{\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}",
"div =0",
"div",
"0",
"if (num[i]==2) ++counter;",
"num[i]==2",
"num[i]",
"num",
"i",
"2",
"++counter",
"counter",
"if (num[i]%2==0) ++div;",
"num[i]%2==0",
"num[i]%2",
"num[i]",
"num",
"i",
"2",
"0",
"++div",
"div",
"for (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"int j=3;",
"int j=3;",
"j",
"3",
"j<=(double)Math.pow(num[i],0.5) && div ==0",
"j<=(double)Math.pow(num[i],0.5)",
"j",
"(double)Math.pow(num[i],0.5)",
"Math.pow",
"Math",
"num[i]",
"num",
"i",
"0.5",
"div ==0",
"div",
"0",
"j=j+2",
"j=j+2",
"j",
"j+2",
"j",
"2",
"{\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"{\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}",
"if (num[i]%j == 0) ++div;",
"num[i]%j == 0",
"num[i]%j",
"num[i]",
"num",
"i",
"j",
"0",
"++div",
"div",
"if (div==0) ++counter;",
"div==0",
"div",
"0",
"++counter",
"counter",
"System.out.println(counter)",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"String args[]",
"args",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\n\t}\n\n}",
"public class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tdiv =0;\n\t\t\tif (num[i]==2) ++counter;\n\t\t\tif (num[i]%2==0) ++div;\n\t\t\tfor (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){\n\t\t\t\tif (num[i]%j == 0) ++div;\n\t\t\t}\n\t\t\tif (div==0) ++counter;\n\t\t}\n\t\tSystem.out.println(counter);\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=sc.nextInt();
int num[]= new int[n];
for (int i=0;i<n;++i){
num[i]=sc.nextInt();
}
int div;
int counter=0;
for (int i=0;i<n;++i){
div =0;
if (num[i]==2) ++counter;
if (num[i]%2==0) ++div;
for (int j=3;j<=(double)Math.pow(num[i],0.5) && div ==0;j=j+2){
if (num[i]%j == 0) ++div;
}
if (div==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,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
9,
11,
1,
41,
13,
2,
2,
2,
13,
17,
17,
17,
2,
13,
17,
1,
0,
13,
2,
13,
17,
30,
30,
0,
18,
13,
13,
17,
41,
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,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
142,
5
],
[
142,
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,
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
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
57,
62
],
[
50,
63
],
[
63,
64
],
[
64,
65
],
[
50,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
75,
86
],
[
86,
87
],
[
86,
88
],
[
75,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
75,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
8,
102
],
[
102,
103
],
[
102,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
124,
130
],
[
123,
131
],
[
131,
132
],
[
8,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
6,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }",
"main",
"{\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }",
"Scanner scanner =new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n=scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] ints=new int[99999999];",
"ints",
"new int[99999999]",
"99999999",
"boolean[] booleans=new boolean[99999999];",
"booleans",
"new boolean[99999999]",
"99999999",
"for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<99999999",
"i",
"99999999",
"i++",
"i++",
"i",
"{\n ints[i]=i+2;\n booleans[i]=true;\n }",
"{\n ints[i]=i+2;\n booleans[i]=true;\n }",
"ints[i]=i+2",
"ints[i]",
"ints",
"i",
"i+2",
"i",
"2",
"booleans[i]=true",
"booleans[i]",
"booleans",
"i",
"true",
"for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<Math.sqrt(99999999)+1",
"i",
"Math.sqrt(99999999)+1",
"Math.sqrt(99999999)",
"Math.sqrt",
"Math",
"99999999",
"1",
"i++",
"i++",
"i",
"{\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }",
"{\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }",
"if(booleans[i]==false) continue;",
"booleans[i]==false",
"booleans[i]",
"booleans",
"i",
"false",
"continue;",
"for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }",
"int j=(i+2)*2-2;",
"int j=(i+2)*2-2;",
"j",
"(i+2)*2-2",
"(i+2)*2",
"(i+2)",
"i",
"2",
"2",
"2",
"j<99999999",
"j",
"99999999",
"j+=i+2",
"j+=i+2",
"j",
"i+2",
"i",
"2",
"{\n booleans[j]=false;\n }",
"{\n booleans[j]=false;\n }",
"booleans[j]=false",
"booleans[j]",
"booleans",
"j",
"false",
"int result=0;",
"result",
"0",
"for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }",
"{\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }",
"int x=scanner.nextInt();",
"x",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(booleans[x-2]==true) result++;",
"booleans[x-2]==true",
"booleans[x-2]",
"booleans",
"x-2",
"x",
"2",
"true",
"result++",
"result",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int i=0;i<99999999;i++){\n ints[i]=i+2;\n booleans[i]=true;\n }\n for(int i=0;i<Math.sqrt(99999999)+1;i++){\n if(booleans[i]==false) continue;\n for(int j=(i+2)*2-2;j<99999999;j+=i+2){\n booleans[j]=false;\n }\n }\n int result=0;\n for(int i=0;i<n;i++){\n int x=scanner.nextInt();\n if(booleans[x-2]==true) result++;\n }\n System.out.println(result);\n }\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner =new Scanner(System.in);
int n=scanner.nextInt();
int[] ints=new int[99999999];
boolean[] booleans=new boolean[99999999];
for(int i=0;i<99999999;i++){
ints[i]=i+2;
booleans[i]=true;
}
for(int i=0;i<Math.sqrt(99999999)+1;i++){
if(booleans[i]==false) continue;
for(int j=(i+2)*2-2;j<99999999;j+=i+2){
booleans[j]=false;
}
}
int result=0;
for(int i=0;i<n;i++){
int x=scanner.nextInt();
if(booleans[x-2]==true) result++;
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
41,
13,
20,
2,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
0,
13,
13,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
18,
13,
13,
30,
0,
13,
2,
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
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
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
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
8,
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
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
89,
100
],
[
100,
101
],
[
101,
102
],
[
89,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
116,
117
],
[
116,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
109,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
8,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
129,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
8,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
6,
160
],
[
160,
161
]
] | [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] av){\n Scanner sc=new Scanner(System.in);\n int m = 0;\n int a;\n int cnt = 0;\n int n = sc.nextInt();\n int[] d=new int[n];\n for(int i=0; i<n;i++){\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }\n \n boolean[] p=new boolean[m+1];\n\n p[1]=false;\n\n for(int i=2; i<=m ;i++){\n p[i]=true;\n }\n for(int i=2; i<=Math.sqrt(m);i++){\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }\n for(int i=0; i<n ;i++){\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }\n System.out.println(cnt);\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] av){\n Scanner sc=new Scanner(System.in);\n int m = 0;\n int a;\n int cnt = 0;\n int n = sc.nextInt();\n int[] d=new int[n];\n for(int i=0; i<n;i++){\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }\n \n boolean[] p=new boolean[m+1];\n\n p[1]=false;\n\n for(int i=2; i<=m ;i++){\n p[i]=true;\n }\n for(int i=2; i<=Math.sqrt(m);i++){\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }\n for(int i=0; i<n ;i++){\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }\n System.out.println(cnt);\n }\n}",
"Main",
"public static void main(String[] av){\n Scanner sc=new Scanner(System.in);\n int m = 0;\n int a;\n int cnt = 0;\n int n = sc.nextInt();\n int[] d=new int[n];\n for(int i=0; i<n;i++){\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }\n \n boolean[] p=new boolean[m+1];\n\n p[1]=false;\n\n for(int i=2; i<=m ;i++){\n p[i]=true;\n }\n for(int i=2; i<=Math.sqrt(m);i++){\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }\n for(int i=0; i<n ;i++){\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }\n System.out.println(cnt);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int m = 0;\n int a;\n int cnt = 0;\n int n = sc.nextInt();\n int[] d=new int[n];\n for(int i=0; i<n;i++){\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }\n \n boolean[] p=new boolean[m+1];\n\n p[1]=false;\n\n for(int i=2; i<=m ;i++){\n p[i]=true;\n }\n for(int i=2; i<=Math.sqrt(m);i++){\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }\n for(int i=0; i<n ;i++){\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }\n System.out.println(cnt);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int m = 0;",
"m",
"0",
"int a;",
"a",
"int cnt = 0;",
"cnt",
"0",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] d=new int[n];",
"d",
"new int[n]",
"n",
"for(int i=0; i<n;i++){\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }",
"{\n a = sc.nextInt();\n d[i] = a;\n if(m < a){\n m = a;\n }\n }",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d[i] = a",
"d[i]",
"d",
"i",
"a",
"if(m < a){\n m = a;\n }",
"m < a",
"m",
"a",
"{\n m = a;\n }",
"m = a",
"m",
"a",
"boolean[] p=new boolean[m+1];",
"p",
"new boolean[m+1]",
"m+1",
"m",
"1",
"p[1]=false",
"p[1]",
"p",
"1",
"false",
"for(int i=2; i<=m ;i++){\n p[i]=true;\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=m",
"i",
"m",
"i++",
"i++",
"i",
"{\n p[i]=true;\n }",
"{\n p[i]=true;\n }",
"p[i]=true",
"p[i]",
"p",
"i",
"true",
"for(int i=2; i<=Math.sqrt(m);i++){\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(m)",
"i",
"Math.sqrt(m)",
"Math.sqrt",
"Math",
"m",
"i++",
"i++",
"i",
"{\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }",
"{\n if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;\n }",
"if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;",
"p[i]",
"p",
"i",
"for(int j=i*2; j<=m; j+=i) p[j]=false;",
"int j=i*2;",
"int j=i*2;",
"j",
"i*2",
"i",
"2",
"j<=m",
"j",
"m",
"j+=i",
"j+=i",
"j",
"i",
"p[j]=false;",
"p[j]=false",
"p[j]",
"p",
"j",
"false",
"for(int i=0; i<n ;i++){\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }",
"{\n if(p[d[i]]){\n cnt = cnt+1;\n }\n }",
"if(p[d[i]]){\n cnt = cnt+1;\n }",
"p[d[i]]",
"p",
"d[i]",
"d",
"i",
"{\n cnt = cnt+1;\n }",
"cnt = cnt+1",
"cnt",
"cnt+1",
"cnt",
"1",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] av",
"av"
] | import java.util.Scanner;
class Main{
public static void main(String[] av){
Scanner sc=new Scanner(System.in);
int m = 0;
int a;
int cnt = 0;
int n = sc.nextInt();
int[] d=new int[n];
for(int i=0; i<n;i++){
a = sc.nextInt();
d[i] = a;
if(m < a){
m = a;
}
}
boolean[] p=new boolean[m+1];
p[1]=false;
for(int i=2; i<=m ;i++){
p[i]=true;
}
for(int i=2; i<=Math.sqrt(m);i++){
if(p[i]) for(int j=i*2; j<=m; j+=i) p[j]=false;
}
for(int i=0; i<n ;i++){
if(p[d[i]]){
cnt = cnt+1;
}
}
System.out.println(cnt);
}
}
|
[
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,
0,
13,
4,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
4,
18,
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,
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
],
[
114,
5
],
[
114,
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
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
6,
55
],
[
55,
56
],
[
114,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
60,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
67,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
59,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
83,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
83,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
59,
109
],
[
109,
110
],
[
57,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }\n public static int isPrime(int n) {\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\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 = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }\n public static int isPrime(int n) {\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = Integer.valueOf(scan.next());",
"n",
"Integer.valueOf(scan.next())",
"Integer.valueOf",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int cnt = 0;",
"cnt",
"0",
"for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }",
"{\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }",
"cnt+=isPrime(Integer.valueOf(scan.next()))",
"cnt",
"isPrime(Integer.valueOf(scan.next()))",
"isPrime",
"Integer.valueOf(scan.next())",
"Integer.valueOf",
"Integer",
"scan.next()",
"scan.next",
"scan",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public static int isPrime(int n) {\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\n }",
"isPrime",
"{\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\n }",
"if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }",
"n<2",
"n",
"2",
"{\n \treturn 0;\n }",
"return 0;",
"0",
"if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }",
"n==2",
"n",
"2",
"{\n \treturn 1;\n }",
"return 1;",
"1",
"if (n%2==0) {\n \treturn 0;\n }",
"n%2==0",
"n%2",
"n",
"2",
"0",
"{\n \treturn 0;\n }",
"return 0;",
"0",
"for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }",
"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 if (n%i==0){\n return 0;\n }\n }",
"{\n if (n%i==0){\n return 0;\n }\n }",
"if (n%i==0){\n return 0;\n }",
"n%i==0",
"n%i",
"n",
"i",
"0",
"{\n return 0;\n }",
"return 0;",
"0",
"return 1;",
"1",
"int n",
"n",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }\n public static int isPrime(int n) {\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n System.out.println(cnt);\n scan.close();\n }\n public static int isPrime(int n) {\n if (n<2) {\n \treturn 0;\n }\n else if (n==2) {\n \treturn 1;\n }\n else if (n%2==0) {\n \treturn 0;\n }\n for (int i = 3; i <= Math.sqrt(n); i+=2){\n if (n%i==0){\n return 0;\n }\n }\n return 1;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = Integer.valueOf(scan.next());
int cnt = 0;
for(int i=0;i<n;i++) {
cnt+=isPrime(Integer.valueOf(scan.next()));
}
System.out.println(cnt);
scan.close();
}
public static int isPrime(int n) {
if (n<2) {
return 0;
}
else if (n==2) {
return 1;
}
else if (n%2==0) {
return 0;
}
for (int i = 3; i <= Math.sqrt(n); i+=2){
if (n%i==0){
return 0;
}
}
return 1;
}
}
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.