node_ids listlengths 4 1.4k | edge_index listlengths 1 2.22k | text listlengths 4 1.4k | source stringlengths 14 427k |
|---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
2,
4,... | [
[
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
],
[
9,
14
],
[... | [
"\nimport java.io.*;\nimport java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tsolve();\n\t}\n\tpublic static void solve(){\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\... |
import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args){
solve();
}
public static void solve(){
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 etc = (int)Math.sqrt(100000000)+3;
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
14,
2,
13,
17,
30,
40,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
137,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\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\tint a = sc.nextInt();\n\t\t\tboolean b = isPrime(a);\t\n\t\t\tif(b == true) {\n\t\t\t\tcount++... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for(int i = 0; i < n; i++) {
int a = sc.nextInt();
boolean b = isPrime(a);
if(b == true) {
count++;
}
}
System.out.println(count);
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.*;\nimport java.math.*;\nclass Main {\n\tstatic boolean isPrime(int N)\n\t{\n\t\tfor (int i = 2; i <= Math.sqrt(N); i++) \n\t\t{\n\t\t\tif(N % i == 0){return false;}\n\t }\n\t\treturn N!=1;\n }\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n =... | import java.util.*;
import java.math.*;
class Main {
static boolean isPrime(int N)
{
for (int i = 2; i <= Math.sqrt(N); i++)
{
if(N % i == 0){return false;}
}
return N!=1;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
4,
18,
13,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
1... | [
[
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
],
[... | [
"import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextInt();\n\t\tboolean[] prime = new boolean[100000000];\n\t\tArrays.fill(prime,true);\n\t\tprime[0] = false;\n\t\tprime[1] = false;\n\n\t\tfor (int i=2; i<100000000; i++... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
boolean[] prime = new boolean[100000000];
Arrays.fill(prime,true);
prime[0] = false;
prime[1] = false;
for (int i=2; i<100000000; i++) {
if (prime[i]) {
for ... |
[
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n\npublic 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\tint num[] = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnum[i] = scan.nextInt();\n\t\t}\n\n\t\tint count = 0;\n\t\t\n\t\tfo... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int num[] = new int[n];
for (int i = 0; i < n; i++) {
num[i] = scan.nextInt();
}
int count = 0;
for (int i = 0; i < n; i++) {
if (num[i] %... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
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
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int[] a = new int[n];\n int count = 0;\n Outer:\n for (int i = 0; i < n; i++) {\n a[i] = stdIn.nextInt();\n if (a[i] ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int[] a = new int[n];
int count = 0;
Outer:
for (int i = 0; i < n; i++) {
a[i] = stdIn.nextInt();
if (a[i] < 2) continue;
... |
[
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,
2,
2,
2,
13,
17,
17,
2,
13,
17,
30,
9,
14,
4,
13,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
101,
5
],
[
101,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int count = 0;\n for(int i = 0; i < x; i++){\n int y = sc.nextInt();\n if(y%2 == 0 && y != 2){\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int count = 0;
for(int i = 0; i < x; i++){
int y = sc.nextInt();
if(y%2 == 0 && y != 2){
continue... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
40,
13,
0,
13,
2,
18,
13,
13,
17... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner number = new Scanner(System.in);\n\t\tint a = number.nextInt();\n\t\tdouble[] b = new double[a];\n\t\tint c = 0;\n\t\tdouble d;\n\n\t\tfor(int i = 0;i < a;i++) {\n\t\t\tb[i] = number.nextInt();\n\t\t\tc++;\n\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner number = new Scanner(System.in);
int a = number.nextInt();
double[] b = new double[a];
int c = 0;
double d;
for(int i = 0;i < a;i++) {
b[i] = number.nextInt();
c++;
d = b[i] / 3;
for(double j = 2;j... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
13,
13,
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,
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
],
[
263,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main {\n private static final int SIZE = 10000000;\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new In... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
private static final int SIZE = 10000000;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReade... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
13,
41,
13,
41,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,... | [
[
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
],
[... | [
"import java.io.*;\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num;\n\t\t\tint cnt = n;\n int i... | import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
int n = Integer.parseInt( kb.readLine() );
int num;
int cnt = n;
int i, j;
f... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
39,
17,
17,
17,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
223,
5
],
[
223,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tboolean is_prime = true;\n\t\tInteger[] prime_10 = {2, 3, 5, 7};\n\t\tArrayList<Integer> prime_100 = new ArrayList<Integer>(Arrays.asList(prime_10))... | import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
boolean is_prime = true;
Integer[] prime_10 = {2, 3, 5, 7};
ArrayList<Integer> prime_100 = new ArrayList<Integer>(Arrays.asList(prime_10));
for(int i = 10; i < 100;... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
41,
13,
17,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,... | [
[
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
],
... | [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint primeNumber=0;\n\t\tint circle=input.nextInt();\n\t\tint[] list=new int[circle];\n\t\tfor(int i=0;i<circle;i++){\n\t\t\tboolean isPrime=true;\n\t\t\tlist[i]=input.nextInt();\n\t\t... | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
int primeNumber=0;
int circle=input.nextInt();
int[] list=new int[circle];
for(int i=0;i<circle;i++){
boolean isPrime=true;
list[i]=input.nextInt();
for(int j=2;j<=Math.sqrt(list[i])... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
4,
18,
13,
30,
41,
13,
17,
11,
1,
41,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
20,
14,
4,
18,
13,
17,
40,
13,
4,
18,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
64,
8
],
[
64,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\nimport java.math.*;\n\npublic class Main{\n Main(){\n\tScanner sc = new Scanner(System.in);\n\tBigInteger bi;\n\n\twhile(sc.hasNext()){\n\t int cnt = 0;\n\t for(int i = sc.nextInt(); i >= 1; --i){\n\t\tbi = new BigInteger(sc.next());\n\t\tif(bi.isProbablePrime(1000)) ++cnt;\n\t ... | import java.util.Scanner;
import java.math.*;
public class Main{
Main(){
Scanner sc = new Scanner(System.in);
BigInteger bi;
while(sc.hasNext()){
int cnt = 0;
for(int i = sc.nextInt(); i >= 1; --i){
bi = new BigInteger(sc.next());
if(bi.isProbablePrime(1000)) ++cnt;
}
System.out.printf(... |
[
7,
15,
13,
17,
6,
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,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30... | [
[
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
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static int Pm(int[] A) {\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tfor(int i=0;i<A.length;i++) {\n\t\t\tboolean NumberF = true;\n\t\t\tfor(int j=2;j<= Math.sqrt(A[i]);j++) {\n\t\t\t\t\n\t\t\t\tif(A[i] < 2) {\n\t\t\t\t\tNumberF = false;\n\t\t\t\t\tbreak;\n\t... | import java.util.Scanner;
public class Main {
public static int Pm(int[] A) {
int count = 0;
for(int i=0;i<A.length;i++) {
boolean NumberF = true;
for(int j=2;j<= Math.sqrt(A[i]);j++) {
if(A[i] < 2) {
NumberF = false;
break;
}else if(A[i] == 2) {
break;
}else if(A[i] ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,... | [
[
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
],... | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint count = 0;\n\t\tint y = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tint z = 0;\n\t\t\tint x = scanner.nextInt();\n\t\t\tif (x == 2) {\n... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int count = 0;
int y = 0;
for (int j = 0; j < n; j++) {
int z = 0;
int x = scanner.nextInt();
if (x == 2) {
count += 1;
} else if (x % 2 ... |
[
7,
15,
13,
17,
6,
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,
... | [
[
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
],
... | [
"import java.io.*;\n\nclass Main{\n static boolean isPrime(int r){\n if(r<2)\n return false;\n else if(r == 2)\n return true;\n else if(r%2 ==0)\n return false;\n for(int i=3; i*i<... | import java.io.*;
class Main{
static boolean isPrime(int r){
if(r<2)
return false;
else if(r == 2)
return true;
else if(r%2 ==0)
return false;
for(int i=3; i*i<=r; i+=2)
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
156,
11
],
[
156,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint[] numArray = new int[Integer.parseInt(br.rea... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] numArray = new int[Integer.parseInt(br.readLine())];
for (... |
[
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... | [
[
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
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint x;\n\t\tint ans = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tx = scan.nextInt();\n\t\t\tif(isprime(x))ans++;\n\t\t}\n\t\tSystem.out.prin... | import java.util.Scanner;
class Main {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int x;
int ans = 0;
for(int i = 0; i < n; i++){
x = scan.nextInt();
if(isprime(x))ans++;
}
System.out.println(ans);
}
public static boolean isprim... |
[
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"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.nextLine());\n \n int count = 0;\n for (int i=0; i<n; i++) {\n int a = Integer.parseInt... | import java.util.Scanner;
public class Main {
public static void main (String... args) {
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
int count = 0;
for (int i=0; i<n; i++) {
int a = Integer.parseInt(scanner.nextLi... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\nimport java.lang.Math;\n\nclass Judge {\n\n\t/**\n\t 素数かどうかを判定します。\n\t @param p 数字\n\t @return 素数ならtrue,違うならfalse\n\t */\n\tboolean isPrime(int p) {\n\t\t// pが2\n\t\tif (p == 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// pが2未満 または 偶数\n\t\tif (p < 2 || (p % 2) == 0) {\n\t\t\treturn fals... | import java.util.Scanner;
import java.lang.Math;
class Judge {
/**
素数かどうかを判定します。
@param p 数字
@return 素数ならtrue,違うならfalse
*/
boolean isPrime(int p) {
// pが2
if (p == 2) {
return true;
}
// pが2未満 または 偶数
if (p < 2 || (p % 2) == 0) {
return false;
}
for (int i = 3; i <= Math.sqrt(p); ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
0,
13,
4,
18,
13,
14,
4,
18,
20,
17,
40,
13,
4,
18,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
59,
8
],
[
59,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.math.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int num = 0;\n for(int i = 0; i < N; ++i) {\n String s;\n s = scan.next();\n ... | import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int num = 0;
for(int i = 0; i < N; ++i) {
String s;
s = scan.next();
if(new BigInte... |
[
7,
15,
13,
17,
6,
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,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
]... | [
"import java.util.Scanner;\n\npublic class Main{\n\n\n\tpublic static boolean isPrime(int num){\n\t\t//?´???°????????¶\n\t\t//????????????????°?????????´??°??§??????????????????\n\t\tif(num==1)return false;\n\t\tif(num==2)return true;\n\t\tif(num%2==0)return false;\n\n\t\tfor(int i=3;i*i<=num;i+=2){\n\t\t\tif(num%i... | import java.util.Scanner;
public class Main{
public static boolean isPrime(int num){
//?´???°????????¶
//????????????????°?????????´??°??§??????????????????
if(num==1)return false;
if(num==2)return true;
if(num%2==0)return false;
for(int i=3;i*i<=num;i+=2){
if(num%i==0)return false;
}
return tr... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
162,
8
],
[
162,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
]... | [
"import static java.lang.Math.*;\n\nimport java.util.Scanner;\n\npublic class Main {\n\t public static void main(String[] args) {\n\t\t int n,i,b,count,kekka=0,j,c;\n\t\t double d;\n\t\t \n\t Scanner sc=new Scanner(System.in);\n\t n=Integer.parseInt(sc.next());\n\t \n\t int a[]=new int[n+1];\n\t f... | import static java.lang.Math.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n,i,b,count,kekka=0,j,c;
double d;
Scanner sc=new Scanner(System.in);
n=Integer.parseInt(sc.next());
int a[]=new int[n+1];
for(i=0;i<n;i++){
a[i]=In... |
[
7,
15,
13,
17,
6,
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,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
78,
5
],
[
78,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main{\n static boolean is_prime(int p){\n for(int i = 2; i * i <= p; i++)\n if(p % i == 0) return false;\n return true;\n }\n\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int ps = scan.... | import java.util.Scanner;
public class Main{
static boolean is_prime(int p){
for(int i = 2; i * i <= p; i++)
if(p % i == 0) return false;
return true;
}
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int ps = scan.nextInt(); int r... |
[
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] arg){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint c = 0;\n\t\t\n\t\tfor(int i=0; i < n; i++){\n\t\t\tif(PNcheck(sc.nextInt())) c++;\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n\t\n\tstatic boolean PNch... | import java.util.Scanner;
public class Main {
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int c = 0;
for(int i=0; i < n; i++){
if(PNcheck(sc.nextInt())) c++;
}
System.out.println(c);
}
static boolean PNcheck(int n){
if(n == 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,
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,
... | [
[
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
],
[
140,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/*Question\n/?´???°??? 1 ??¨????????°??????????????§????????????????????¶??°????´???°??¨?¨?????????????\n/????????°????????????8 ???????´???°???2, 3, 5, 7, 11, 13, 17, 19 ??¨???????????????1 ??... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/*Question
/?´???°??? 1 ??¨????????°??????????????§????????????????????¶??°????´???°??¨?¨?????????????
/????????°????????????8 ???????´???°???2, 3, 5, 7, 11, 13, 17, 19 ??¨???????????????1 ????´???°??§??... |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
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,
14,
2,
2,
13,
17,
2,
13,
17,
30,
40,
13,
9,
41,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
94,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\n public static Scanner sc;\n public static void main(String[] args) throws Exception {\n sc = new Scanner(System.in);\n int n = sc.nextInt();\n int res = 0;\n for (int i = 0; i < n; i++) {\n int num = sc.nextInt();\n ... | import java.util.Scanner;
public class Main {
public static Scanner sc;
public static void main(String[] args) throws Exception {
sc = new Scanner(System.in);
int n = sc.nextInt();
int res = 0;
for (int i = 0; i < n; i++) {
int num = sc.nextInt();
if (num... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
4,
18,
13,
40,
13,
4,
18,... | [
[
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
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
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;... |
[
7,
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,
14,
4,
13,
4,
18,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n int n = sc.nextInt();\n int count = 0;\n for (int i = 0; i < n; i++) {\n if (isPrimeNumber(sc.nextInt())) {\n count++;\n... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
if (isPrimeNumber(sc.nextInt())) {
count++;
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
132,
5
],
[
132,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint i,n,num,count=0;\n\t\tn=scan.nextInt();\n\t\tfor(i=0;i<n;i++) {\n\t\t\tnum=scan.nextInt();\n\t\t\tcount+=checkpm(num);\n\t\t}\n\t\tSystem.out.println(count);\n\t\tscan.clo... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int i,n,num,count=0;
n=scan.nextInt();
for(i=0;i<n;i++) {
num=scan.nextInt();
count+=checkpm(num);
}
System.out.println(count);
scan.close();
}
public static int checkem(int... |
[
7,
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,
41,
13,
17,
28,
13,
13,
30,
30,
14,
4,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
98,
8
],
[
98,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Arrays;\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[] x = new int[n];\n for (int i=0; i<n; i++) {\n x[i] = sc.nextInt();\n }\n int count = 0; //素... | import java.util.Arrays;
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 count = 0; //素数の数
for (int... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
134,
5
],
[
134,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint k,i;\n\t\tint s = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = Integer.parseInt(in.nextLine());\n\t\tint array[] = new int[n];\n\t\tfor(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());\n\t\tfor (... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int k,i;
int s = 0;
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
int array[] = new int[n];
for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());
for (k=0;k<n;k++){
if (isprime(ar... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
20,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
41,
13,
17,
42,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
... | [
"import java.util.*;\n \nclass Main {\n public static void main(String args[]) {\n // new Thread(null, () -> {\n try(Scanner sc = new Scanner(System.in)){\n boolean[] prime = new boolean[100000005];\n prime[0] ... | import java.util.*;
class Main {
public static void main(String args[]) {
// new Thread(null, () -> {
try(Scanner sc = new Scanner(System.in)){
boolean[] prime = new boolean[100000005];
prime[0] = true; prim... |
[
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,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
13,
12,
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
]... | [
"import java.util.*;\n\npublic class Main {\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 += 2;\n }\n return true;\n }\n \n ... | import java.util.*;
public class Main {
static boolean isPrime(int x){
if(x==2) return true;
if(x<2 || x%2==0) return false;
int i = 3;
while(i<=Math.sqrt(x)){
if(x%i == 0) return false;
i += 2;
}
return true;
}
public static void... |
[
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,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
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
],
... | [
"/* ALDS1_1_C */\nimport java.io.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n try{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int count = 0;\n\n for(int i = 0; i < n; i++){\n long x = ... | /* ALDS1_1_C */
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 count = 0;
for(int i = 0; i < n; i++){
long x = Long.parseLong(br.... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
],
... | [
"import java.util.Scanner;\n\nclass Main {\n public static Boolean PrimeCheck(int x){\n\tfor(int i=2; i<=Math.sqrt(x);i++){\n\t if(x%i==0){\n\t\treturn false;\n\t }\n\t}\n\treturn true;\n }\n public static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int n = sc.nextInt();\... | import java.util.Scanner;
class Main {
public static Boolean PrimeCheck(int x){
for(int i=2; i<=Math.sqrt(x);i++){
if(x%i==0){
return false;
}
}
return true;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for(int ... |
[
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,
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,
... | [
[
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
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.Date;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Date;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO ?????????????????????????????????????????????
BufferedReader ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\nimport java.util.*;\nimport java.lang.*;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n Scanner scan=new Scanner(System.in);\n int n=Integer.parseInt(scan.next());\n int[] numbers=new int[n];\n for(int i=0;i<numbers.length;i++){\n numbers[i]=Integ... | import java.io.*;
import java.util.*;
import java.lang.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner scan=new Scanner(System.in);
int n=Integer.parseInt(scan.next());
int[] numbers=new int[n];
for(int i=0;i<numbers.length;i++){
numbers[i]=Integer.parseInt(sca... |
[
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,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
9,
11,
1,
41,
13,
2,
17,
13,
2... | [
[
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
],
[... | [
"import java.util.Scanner;\n\nclass Main { \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int count = 0;\n int borderline = 1000;\n \n boolean primes[] = new boolean [borderline];\n for(int n = 2; n < p... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int count = 0;
int borderline = 1000;
boolean primes[] = new boolean [borderline];
for(int n = 2; n < primes.length; n... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
167,
8
],
[
167,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
]... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tfinal int n = Integer.parseInt(reader.readLine());\n\t\t\tfinal int[] list = ne... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
final int n = Integer.parseInt(reader.readLine());
final int[] list = new int[n];
for (int i =... |
[
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,
11,
1,
41... | [
[
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
],
[... | [
"import java.util.*;\n\nclass Main {\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\tfor (int i=0; i<n; i++) {\n\t\t\tif(isPrime(stdIn.nextInt()))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tstatic... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int count = 0;
for (int i=0; i<n; i++) {
if(isPrime(stdIn.nextInt()))
count++;
}
System.out.println(count);
}
static boolean isPrime(int x){
for (int i=2; ... |
[
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,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint ans=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x=sc.nextInt();\n\t\t\tif(isPrime(x)) ans++;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tstatic boolean... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int ans=0;
for(int i=0;i<n;i++){
int x=sc.nextInt();
if(isPrime(x)) ans++;
}
System.out.println(ans);
}
static boolean isPrime(int x){
for(int j=2;j<=Math.... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
12,
... | [
[
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
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\nimport java.math.BigDecimal;\n\npublic class Main {\n static InputReader in;\n static PrintWriter... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.math.BigDecimal;
public class Main {
static InputReader in;
static PrintWriter out;
static ... |
[
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,... | [
[
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
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n \n for(int i = 0; i < n; i ++) {\n int key = Integer.parseInt(sc.nextLine());\n if(... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int counter = 0;
for(int i = 0; i < n; i ++) {
int key = Integer.parseInt(sc.nextLine());
if(isPrime(key)) {... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
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
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t//prime numbers\n\t\tScanner in = new Scanner(System.in);\n\t int prime =0;\n\t int n = in.nextInt();\n\t int[] array = new int[n];\n\t for(int i =0;i<n;i++){\n\t array[i]= in.nextInt();\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//prime numbers
Scanner in = new Scanner(System.in);
int prime =0;
int n = in.nextInt();
int[] array = new int[n];
for(int i =0;i<n;i++){
array[i]= in.nextInt();
}
for(int j ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
... | [
[
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
],
[... | [
"import java.util.Scanner;\n\nclass Main { \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int count = 0;\n \n while (N != 0) {\n int num = in.nextInt();\n if (isPrime(num)) count++;\n N--;\n }\n \n System.out.print... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int count = 0;
while (N != 0) {
int num = in.nextInt();
if (isPrime(num)) count++;
N--;
}
System.out.println(count);
}
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
42,
17,
30,
14,
2,
13,
13,
30,
3,
0,
13,
4,
18,
13,
4,
18,
13,
11,
1,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
108,
11
],
[
108,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint number;\n\t\tshort numberOfTimes, checkTime = ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int number;
short numberOfTimes, checkTime = 0, count = 0;
numb... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
9,
11,
1,
41,
13,
2,
17,
13,
2,
13,
18,
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
],
[... | [
"import java.util.Scanner;\n\nclass Main { \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int count = 0;\n \n boolean primes[] = new boolean [100000000];\n for(int n = 2; n < primes.length; n++){\n ... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int count = 0;
boolean primes[] = new boolean [100000000];
for(int n = 2; n < primes.length; n++){
if(primes[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,
0,
13,
8,
4,
13,
4,
18,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,... | [
[
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
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int count = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < count; i++) {\n sum += isPrimeNumber(sc.nextLong()) ? 1 : 0;\n }\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = sc.nextInt();
int sum = 0;
for (int i = 0; i < count; i++) {
sum += isPrimeNumber(sc.nextLong()) ? 1 : 0;
}
System.out... |
[
7,
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line1 = sc.nextLine();\n\t\tint n = Integer.parseInt(line1);\n\n\t\tint[] num = new int[n];\n\n\t\tfor (int... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
String line1 = sc.nextLine();
int n = Integer.parseInt(line1);
int[] num = new int[n];
for (int i = 0; i < n; i++) {
Strin... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
4... | [
[
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
],
... | [
"import java.util.*;\nimport java.io.*;\nimport static java.util.Arrays.*;\nimport static java.util.Collections.*;\nimport static java.lang.Math.*;\n\npublic class Main {\n\n public static boolean is_prime(int k) {\n for (int i=2; i*i<=k; i++) \n if (k%i == 0) return false;\n return k != 1;\n }\n\n publ... | import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
public static boolean is_prime(int k) {
for (int i=2; i*i<=k; i++)
if (k%i == 0) return false;
return k != 1;
}
public static void main... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
0,
13,
4,
18,
13,
13,
14,
2,
2,
13,
17,
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,
17,
17,
29,
17,
14,
2,
2,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static boolean check(double a){\n\t\tdouble b;\n\t\tb = Math.sqrt(a);\n\t\tif(b>1.0 && b<2.0) return true;\n\n\t\tfor(int i=2;i<=(int)Math.floor(b);i++){\n\t\t\tif((a%2.0) == 0.0) return false;\n\t\t\tif((a%(double)i) == 0.0) return false;\n\t\t}\n\t\tre... | import java.util.Scanner;
public class Main {
public static boolean check(double a){
double b;
b = Math.sqrt(a);
if(b>1.0 && b<2.0) return true;
for(int i=2;i<=(int)Math.floor(b);i++){
if((a%2.0) == 0.0) return false;
if((a%(double)i) == 0.0) return false;
}
return true;
}
public static void ma... |
[
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,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif (isPrime(num)) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\n\t\tSys... | 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;
for (int i = 0; i < n; i++) {
int num = sc.nextInt();
if (isPrime(num)) {
cnt++;
}
}
System.out.println(cnt);
}
private static boo... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
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,
4,
13,
13,
4,
18,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
115,
11
],
[
115,
12
],
[
12,
13
],
[
115,
14
]... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static int count;
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.pa... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
20,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
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
],
[... | [
"import java.util.Scanner;\n\n/**\n * \n */\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tint n... | import java.util.Scanner;
/**
*
*/
/**
* @author kawakami
*
*/
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder sb = new StringBuilder();
Scanner as = new Scanner(System.in);
int n = 0;
int i = 0;
int j = 0;
int c... |
[
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,
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,
1... | [
[
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
],
... | [
"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\tStringBuilder buider = new StringBuilder();\n\n\t\tBufferedReader br = new BufferedReader(new InputStr... | 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 {
StringBuilder buider = new StringBuilder();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in))... |
[
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... | [
[
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
],... | [
"import java.util.Scanner;\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 ans = 0;\n for (int i = 0; i < n; i++) {\n if (isPrime(sc.nextInt())) {\n ans++;\n }... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 0;
for (int i = 0; i < n; i++) {
if (isPrime(sc.nextInt())) {
ans++;
}
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
13,
4,
13,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
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
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tint max = 100000001;\n\t\tboolean [] x = new boolean[max];\n\t\t\n\t\tPrimeList(x, max);\n\t\t\n\t\tOutput(x);\n\t}\n\t\n\tprivate static void PrimeList (boolean x[], int max){\n\t\tint i;\n\t\tint j;\n\t\tdouble sqrt = Math.... | import java.util.Scanner;
class Main {
public static void main(String[] args){
int max = 100000001;
boolean [] x = new boolean[max];
PrimeList(x, max);
Output(x);
}
private static void PrimeList (boolean x[], int max){
int i;
int j;
double sqrt = Math.sqrt(max);
for (i = 2; i < max; i++){... |
[
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,
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
117,
11
],
[
117,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n private static final int SIZE = 10000000;\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static final int SIZE = 10000000;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
4,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
2... | [
[
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
],
[... | [
"import java.util.*;\n\nclass Main {\n\tpublic static void main(String args[]){\n\t\tArrayList<Integer> ar = new ArrayList<Integer>();\n\t\tint cnt = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = sc.nextInt();\n\t\tfor(int i = 0;i < size;i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tif(hantei(num)){\n\... | import java.util.*;
class Main {
public static void main(String args[]){
ArrayList<Integer> ar = new ArrayList<Integer>();
int cnt = 0;
Scanner sc = new Scanner(System.in);
int size = sc.nextInt();
for(int i = 0;i < size;i++){
int num = sc.nextInt();
if(hantei(num)){
cnt++;
}
}
System.out.p... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\n\nclass Main{\n\nstatic final PrintWriter out=new PrintWriter(System.out);\n\npublic static void main(String[] args) throws IOException{\nBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\nint n=Integer.parseInt(br.readLine());\nint ans=0;\nfor(int i=0;i<n;i++){\nint a=Inte... | import java.io.*;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
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.... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
30,
0,
13,
17,
4,... | [
[
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
],
[... | [
"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\tint num = scan.nextInt();\n\t\tint[] array = new int[num];\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t\tif(isprime(array[i]... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int[] array = new int[num];
int count = 0;
for (int i = 0; i < num; i++) {
array[i] = scan.nextInt();
if(isprime(array[i])) {
count+=1;
}
}
Syst... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
4,
18,
13,
40,
13,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tin... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int primeCnt = 0;
for... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
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,
0,
18,
13,
13,
4,
18,
13,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
7,
13
],
[
13,
14
],
[... | [
"import java.io.*;\nimport java.util.*;\n\n\n\nclass Main{\n //読み込みのテンプレ(stringオブジェクトまで)\n \n static int number;\n static int[] linenumbers;\n \n \n public static void main(String[] args) throws IOException{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\... | import java.io.*;
import java.util.*;
class Main{
//読み込みのテンプレ(stringオブジェクトまで)
static int number;
static int[] linenumbers;
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
//Integer ... |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
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,
11,
1,
41,
13,
17,
2,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
6
],
[
6,
7
],
[
98,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
]... | [
"import java.util.Scanner;\npublic class Main{\n\nprivate static Scanner scanner;\n\npublic static void main(String args[])\n{\n\tscanner = new Scanner(System.in);\n\tint a = scanner.nextInt();\n\tint[] b = new int[a];\n\tint count = 0,pre = 0;\n\n\tfor(int i = 0;i < a;i++) {\n\t\tb[i] = scanner.nextInt();\n\t\tfor... | import java.util.Scanner;
public class Main{
private static Scanner scanner;
public static void main(String args[])
{
scanner = new Scanner(System.in);
int a = scanner.nextInt();
int[] b = new int[a];
int count = 0,pre = 0;
for(int i = 0;i < a;i++) {
b[i] = scanner.nextInt();
for(int j = 2;j <= Math.sqrt(b[... |
[
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,
1... | [
[
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
],
... | [
"import java.util.*;\nimport java.math.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint ct = 0;\n\t\t\tfor(int i = sc.nextInt(); i>=1; --i){\n\t\t\t\tBigInteger b = new BigInteger(sc.next());\n\t\t\t\tif(b.isProbableP... | import java.util.*;
import java.math.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int ct = 0;
for(int i = sc.nextInt(); i>=1; --i){
BigInteger b = new BigInteger(sc.next());
if(b.isProbablePrime(5)) ++ct;
}
System.out.pri... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
0,
13,
4,
18,
13,
14,
2,
2,
2,
13,
17,
17,
2,
13,
17,
... | [
[
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
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint flag, num, cnt = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tflag = 0;\n\t\t\t\n\t\t\tnum = sc.nextInt();\n\t\t\t\n\t\t\tif(num % 2 ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int flag, num, cnt = 0;
for(int i = 0; i < n; i++) {
flag = 0;
num = sc.nextInt();
if(num % 2 == 0 && num != 2) {
flag = 1;
}
for(... |
[
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,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
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
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n static public void main(String[] av){\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint cnt = 0;\n\tfor(int i=0; i<n; i++){\n\t int x = sc.nextInt();\n\t int flag = 0;\n\t int y = (int)Math.sqrt(x);\n\t for(int j=2; j<=y; j++){\n\t\tif... | import java.util.Scanner;
class Main{
static public void main(String[] av){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for(int i=0; i<n; i++){
int x = sc.nextInt();
int flag = 0;
int y = (int)Math.sqrt(x);
for(int j=2; j<=y; j++){
if(x%j == 0){
flag = 1;... |
[
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,... | [
[
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
],... | [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n\tScanner scan = new Scanner(System.in);\n\tint n = Integer.parseInt(scan.nextLine());\n\tint cnt = 0;\n for (int i = 0; i < n; i++) {\n\t int a = Integer.parseInt(scan.nextLine());\n\t if (isPrime(a)) {\n\t\tc... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.nextLine());
int cnt = 0;
for (int i = 0; i < n; i++) {
int a = Integer.parseInt(scan.nextLine());
if (isPrime(a)) {
cnt++;
}
}
Syst... |
[
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,... | [
[
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
],
[... | [
"import java.io.*;\n\nclass Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int prime = 0;\n for (int i = 0; i < n; i++) {\n int elem... | import java.io.*;
class Main {
public static void main (String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int prime = 0;
for (int i = 0; i < n; i++) {
int element = Integer... |
[
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.nextLine());\n \n int cnt = 0;\n for(int i = 0; i < n; i++){\n int x = Integer.parseInt(sca... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
int cnt = 0;
for(int i = 0; i < n; i++){
int x = Integer.parseInt(scanner.nextLine(... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
17,
11,
1,
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,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n//import java.util.Math.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int A[] = new int[n];\n int i;\n int count = 0;\n \n for(i = 0; i < n; i++){\n A[i] = ... | import java.util.*;
//import java.util.Math.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int A[] = new int[n];
int i;
int count = 0;
for(i = 0; i < n; i++){
A[i] = sc.nextInt();
// ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
13,
13,
40,
13,
4,
1... | [
[
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
],
[
353,
14
],
... | [
"import java.util.ArrayDeque;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.NoSuchElementException;\n\npublic class Main {\n public static void main(String[] args) {\n FS fs = new FS();\n int n = fs.nextInt();\n int sum = 0;\n for (int i = 0; i < n; i++) ... | import java.util.ArrayDeque;
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
public class Main {
public static void main(String[] args) {
FS fs = new FS();
int n = fs.nextInt();
int sum = 0;
for (int i = 0; i < n; i++) {
i... |
[
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,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] primeNum = new int[n];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tprimeNum[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint cnt ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] primeNum = new int[n];
for(int i = 0; i < n; i++) {
primeNum[i] = sc.nextInt();
}
int cnt = 0;
for(int i : primeNum) {
if(primeDec(... |
[
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,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
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
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * 入力された数のうち素数の数がいくつかを出力する\n\t * \n\t * @param args\n\t * 入力数、素数判定する数字\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\n\t\tlong check;\n\t\tint count = 0;// 素数の数\... | import java.util.Scanner;
public class Main {
/**
* 入力された数のうち素数の数がいくつかを出力する
*
* @param args
* 入力数、素数判定する数字
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
long check;
int count = 0;// 素数の数
// 入力された数の素数を判定する
for (int i = ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
13,
41,
13,
20,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1... | [
[
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
],
[... | [
"import java.util.Scanner;\n \nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tint max = 100000001;\n\t\tboolean [] sosuu = new boolean [max];\n\t\tint [] n = new int [10000];\n\t\tint count = 0;\n \n\t\tfor (int i = 1; i <= max - 1; i++) {\n\t\t\tsosuu[i] = true;\n\t\t... | import java.util.Scanner;
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
int max = 100000001;
boolean [] sosuu = new boolean [max];
int [] n = new int [10000];
int count = 0;
for (int i = 1; i <= max - 1; i++) {
sosuu[i] = true;
}
sosuu[0] = false;
sosuu[1] = ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
4,
18,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14... | [
[
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
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\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 \tif(isPrime(sc.nextInt())){\n \t\tcnt += 1;\n \t}\n }\n\n System.out.println(cnt);\n }\... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
for(int i = 0; i < n; ++i) {
if(isPrime(sc.nextInt())){
cnt += 1;
}
}
System.out.println(cnt);
}
public static boolean... |
[
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],... | [
"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());... | 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... |
[
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,
41,
13,
17,
14,
2... | [
[
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
],
... | [
"\n\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String args[]) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt( br.readLine() );\n\n int ... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
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;
fo... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
2,
13,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
30,
29,
17,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
2,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
143,
5
],
[
143,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\n\t\n\t/*public static Boolean primenumber(int n) {\n\t\tBoolean result = true;\n\t\tint mid = (int)(n^(1/2));\n\t\tif (n > 2) {\n\t\t\tfor (int i = 2; i < mid; i++) {\n\t\t\t\tif (n%i == 0) {\n\t\t\t\t\tresult = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n... | import java.util.Scanner;
public class Main {
/*public static Boolean primenumber(int n) {
Boolean result = true;
int mid = (int)(n^(1/2));
if (n > 2) {
for (int i = 2; i < mid; i++) {
if (n%i == 0) {
result = false;
break;
}
}
}
return result;
}*/
public static Boolean primenu... |
[
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,
14,
4,
13,
4,
18,
13,
4,
18,
13,
40,
13,
4,
18,
18,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
108,
8
],
[
108,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.*;\nimport java.io.*;\npublic class Main{\n\n public static void main(String[] args){\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+... | import java.util.*;
import java.io.*;
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++;
}
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
2,
13,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
6
],
[
6,
7
],
[
6,
8
],
[
123,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"\n//implement the sieve of eratos\nimport java.util.Scanner;\n\n\n//we will use the filter method to construct the prime table from 1 to n\n\n\npublic class Main {\n\t//we can thus use binary search to check whether i is in the table\n\tstatic final int N = 100000000;\n\t\n\t\n\t\n\t// this is no good for java, so... |
//implement the sieve of eratos
import java.util.Scanner;
//we will use the filter method to construct the prime table from 1 to n
public class Main {
//we can thus use binary search to check whether i is in the table
static final int N = 100000000;
// this is no good for java, so slow
public static bool... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
122,
8
],
[
122,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
]... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tprivate static int prime(int a){\n\t\tif(a==2||a==3)return 1;\n\t\tfor(int i=2;i<Math.sqrt(a)+1;i++){\n\t\t\tif(a%i==0){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\t\n\tpublic static void main(String[] args) t... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
private static int prime(int a){
if(a==2||a==3)return 1;
for(int i=2;i<Math.sqrt(a)+1;i++){
if(a%i==0){
return 0;
}
}
return 1;
}
public static void main(String[] args) throws Exception {
// TODO ???????... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30... | [
[
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
],
[... | [
"import java.io.*;\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n \n int num, cnt = 0;\n int i, j;\n ... | import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
int n = Integer.parseInt( kb.readLine() );
int num, cnt = 0;
int i, j;
boolean is... |
[
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.Scanner;\nimport java.lang.Math;\n\n// ALDS1_1_C\npublic class Main {\n\tpublic static 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... | import java.util.Scanner;
import java.lang.Math;
// ALDS1_1_C
public class Main {
public static 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;
}
... |
[
7,
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
82,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.Scanner;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n int num = sc.nextInt();\n int count = 0;\n for(int i = 0; i < num; i++){\n int n = sc.nextInt();\n boolean flg = true;\n ... |
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int num = sc.nextInt();
int count = 0;
for(int i = 0; i < num; i++){
int n = sc.nextInt();
boolean flg = true;
for(int ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
1... | [
[
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
],
[... | [
"import java.util.Scanner;\n\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[] arr = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tarr[i] = scan.nextInt();\n\t\t}\n\t\tint k = 2;\n\t\tint flag = 1; //0???????´???°??§???????... | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] arr = new int[n];
for(int i=0; i<n; i++) {
arr[i] = scan.nextInt();
}
int k = 2;
int flag = 1; //0???????´???°??§????????????1???????´???°
int cnt = 0; ... |
[
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,
2,
13,
17,
30,
9,
41,
13,
17,
11,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int num = Integer.parseInt(sc.nextLine());\n\n int result = 0;\n\n for (int i = 0; i < num; i++) {\n int target = Integer.parseInt(sc.ne... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = Integer.parseInt(sc.nextLine());
int result = 0;
for (int i = 0; i < num; i++) {
int target = Integer.parseInt(sc.nextLine());
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
13,
18,
13,
13,
30,
40,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint n = scan.nextInt();\n\t\tint[] arr = new int[n];\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tif(isPrime(arr[... | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int n = scan.nextInt();
int[] arr = new int[n];
int count = 0;
for(int i = 0; i < n; i++){
arr[i] = scan.nextInt();
if(isPrime(arr[i])){
count++;
}
}
Sy... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
237,
5
],
[
237,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n \npublic class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ans=0;\n\t\tint n = sc.nextInt();\n\t\tint[] in = new int[n];\n\t\tfor(int i=0;i<n;i++) in[i] = sc.nextInt();\n\t\tfor(int t=0;t<n;t++){\n\t\t\tint num = in[t];\n\t... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int ans=0;
int n = sc.nextInt();
int[] in = new int[n];
for(int i=0;i<n;i++) in[i] = sc.nextInt();
for(int t=0;t<n;t++){
int num = in[t];
if(num==1) continue;
boolean f = t... |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
13,
14,
2,
2,
13,
13,
17,
29,
17,
14,
2,
13,
13,
3,
29,
17,
23,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
6
],
[
6,
7
],
[
123,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\t\n\tstatic Scanner scan;\n\t\n\tpublic static boolean judgePN(int a) {\n\t\tif (a == 1) return false;\n\t\t\n\t\tint quotient = a;\n\t\t\n\t\tfor(int i = 2; i < a; i++) {\n\t\t\tquotient = a / i;\n\t\t\tif(a % i == 0) return false;\n\t\t\tif(i > quotient) break;\... | import java.util.Scanner;
public class Main {
static Scanner scan;
public static boolean judgePN(int a) {
if (a == 1) return false;
int quotient = a;
for(int i = 2; i < a; i++) {
quotient = a / i;
if(a % i == 0) return false;
if(i > quotient) break;
}
return true;
}
public static ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
18,
13,
13,
17,
14,
2,
13,
17,
30,
41,
13,
2,
17,
13,
42,
2,
13,
17,
30,
14,
2,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
13
],
[
13,
14
],
[
14,
15
],... | [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n int[] era = new int[100000001];\n for(int i = 2; i <= 100000000; i++){\n if(era[i] == 0){\n era[i] = 1;\n if(i <= 10000){\n int j = 2*i;\n ... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
int[] era = new int[100000001];
for(int i = 2; i <= 100000000; i++){
if(era[i] == 0){
era[i] = 1;
if(i <= 10000){
int j = 2*i;
whil... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
2,
2,
13,
17,
17,
30,
29,
17,
30,
41,
13,
17,
42,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
13,
17,
29,
17,
0,
13,
17,
29,
17,
23,
... | [
[
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
],
... | [
"import java.util.Scanner;\n\nclass Main{\n\n static boolean isPrime(int n){\n if(n == 2){\n return true;\n }else if(n < 2 || n % 2 == 0){\n return false;\n }else{\n int x = 3;\n while(x <= Math.sqrt((double)n)){\n if(n%x == 0) re... | import java.util.Scanner;
class Main{
static boolean isPrime(int n){
if(n == 2){
return true;
}else if(n < 2 || n % 2 == 0){
return false;
}else{
int x = 3;
while(x <= Math.sqrt((double)n)){
if(n%x == 0) return false;
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11... | [
[
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
],
[... | [
"import java.util.Scanner;\nclass Main {\n\tpublic static void main(String[] args){\n\t\tfinal int Number=100;\n\t\ttry(Scanner sc = new Scanner(System.in)){\n\t\t\tint N = Integer.parseInt(sc.next());\n\t\t\tint[] p=new int[N];\n\t\t\tfor(int i=0;i<N;i++) p[i] = Integer.parseInt(sc.next());\n\t\t\tint cnt=0;\n\t\t... | import java.util.Scanner;
class Main {
public static void main(String[] args){
final int Number=100;
try(Scanner sc = new Scanner(System.in)){
int N = Integer.parseInt(sc.next());
int[] p=new int[N];
for(int i=0;i<N;i++) p[i] = Integer.parseInt(sc.next());
int cnt=0;
for(int i=0;i<N;i++){
if(isP... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
4,
13,
17,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
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
],
... | [
"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\tstatic boolean[] isntPrime;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System... | 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;
static boolean[] isntPrime;
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
makePrimeLis... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
41,
13,
20,
17,
4,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
281,
11
],
[
281,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tArrayList<Integer> prime = new ArrayList<Integer>();\n\t\tprime.add(2);\n\t\tprime.add(3);\n\t\tprime.add(5);\n\t\tprime.add(7);\n\n\t\tboolean sieve2[] = new bool... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
ArrayList<Integer> prime = new ArrayList<Integer>();
prime.add(2);
prime.add(3);
prime.add(5);
prime.add(7);
boolean sieve2[] = new boolean[100];
Arrays.fill(sieve2... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
4,
18,
13,
17,
17,
17,
12,
13,
30,
41,
13,
18,
13,
13,
41,
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
],
... | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.StringTokenizer;
public class Main {
public static void... |
[
7,
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
],
[
31,
5
],
[
31,
6
],
[
6,
7
],
[
31,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\n\t static String a;\n\t public static void main(String[] args) {\n\t Scanner stdIn = new Scanner(System.in);\n\t int n = stdIn.nextInt();\n\t int count = 0;\n\t IN:for(int i = 0; i < n; i++) {\n\t int x = stdIn.nextInt()... | 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(in... |
[
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,
30,
11,
1,
41,
13,
17,
2... | [
[
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
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n\n Scanner stdIn = new Scanner(System.in);\n /*\n10^6から時間がかかりすぎる\n\n int[] a = new int[100000];//javaは0で初期化されてる\n\n a[0] = 1;\n a[1] = 1;//0と1は素数じゃないです\n\n //素数表\n for(int i = 2; i < a.length; i++){\n if(... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
/*
10^6から時間がかかりすぎる
int[] a = new int[100000];//javaは0で初期化されてる
a[0] = 1;
a[1] = 1;//0と1は素数じゃないです
//素数表
for(int i = 2; i < a.length; i++){
if(a[i] == 0){
f... |
[
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,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,... | [
[
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
],... | [
"\nimport java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t Scanner cin=new Scanner(System.in);\n\t\t List<Integer> list=new ArrayList<>();\n\t\t int n=cin.nextInt(),res=0;\n\t\t for(int i=0;i<n;i++)list.add(cin.nextInt());\n\t\t \n\t\t for(int i=0;i<n;i++) {\n\t\t\t int x... |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);
List<Integer> list=new ArrayList<>();
int n=cin.nextInt(),res=0;
for(int i=0;i<n;i++)list.add(cin.nextInt());
for(int i=0;i<n;i++) {
int x=list.get(i),limit=(int)(Math.sq... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.