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, 6, 13, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 12, 13, 30, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 12, 13, 30, 14, 2, 13, 17,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 149, 5 ], [ 149, 6 ], [ 6, 7 ], [ 6, 8 ], [ 149, 9 ], [ 9, 10 ], [ 149, 11 ], [ 11, 12 ], [ 11, 13 ], [ 149, 1...
[ "import java.util.Scanner;\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tint n;\n\tint count=0;\t//素数カウント変数\n\tint[] A;\n\t\n\tpublic void input() {\n\t\tn = sc.nextInt();\n\t\tA = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t}\n\t\n\t//0で素数を返す\n\tpublic int conp...
import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); int n; int count=0; //素数カウント変数 int[] A; public void input() { n = sc.nextInt(); A = new int[n]; for(int i=0; i<n; i++) { A[i] = sc.nextInt(); } } //0で素数を返す public int conpute(int number) { if(number<2) return 0; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 13, 13, 30, 40, 13, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 99, 8 ], [ 99, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main{\n \n public static void main(String args[]) throws IOException{\n\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\n\tint n=Integer.parseInt(br.readLine());\n\tint ans=0;\n\t\n\tfor(int i=0;i<n;i++){\n\t int a=Integer...
import java.io.*; import java.util.*; public class Main{ public static void main(String args[]) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); int ans=0; for(int i=0;i<n;i++){ int a=Integer.parseInt(br.readLine())...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 30, 40, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23,...
[ [ 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.Scanner;\n\n/**\n * A3\n */\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int len = Integer.parseInt(sc.nextLine());\n int result = 0;\n for(int i=0; i<len; i++){\n if(check(sc.nextInt())){\n ...
import java.util.Scanner; /** * A3 */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int len = Integer.parseInt(sc.nextLine()); int result = 0; for(int i=0; i<len; i++){ if(check(sc.nextInt())){ result...
[ 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 ], [ 58, 8 ], [ 58, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\nimport java.math.*;\npublic class Main{\n public static void main(String[] args){\n\tScanner s = new Scanner(System.in);\n\twhile(s.hasNext()){\n\t int c = 0;\n\t for(int i=s.nextInt();i>0;--i){\n\t\tBigInteger b = new BigInteger(s.next());\n\t\tif(b.isProbablePrime(5))++c;\n\t }\n...
import java.util.*; import java.math.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); while(s.hasNext()){ int c = 0; for(int i=s.nextInt();i>0;--i){ BigInteger b = new BigInteger(s.next()); if(b.isProbablePrime(5))++c; } System.out.printf("%...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 0, 13, 17, 4, 18, 18, 13, 13, 13, 12, 13, 30, 14...
[ [ 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\n\npublic class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint prime = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint p = scan.nextInt();\n\t\t\tif(is_prime(p)) prime += 1;\n\t\t}\n\t\tSystem.out.println(prime);\n\t}\n\tboolean...
import java.util.Scanner; public class Main { void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int prime = 0; for (int i = 0; i < n; i++) { int p = scan.nextInt(); if(is_prime(p)) prime += 1; } System.out.println(prime); } boolean is_prime(int p) { if (p == 2) return ...
[ 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 ], [ 120, 11 ], [ 120, 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, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 40, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 99, 11 ], [ 99, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\nimport java.io.*;\nimport java.lang.*;\n\npublic class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int res = ...
import java.util.*; import java.io.*; import java.lang.*; public class Main { static final int INF = 1000000000; public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int n = input.nextInt(); int res = 0; for ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 17, 30, 40, 13, 9, 14, 2, 2, 13, 17, 17,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 98, 5 ], [ 98, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint v = scn.nextInt();\n\t\t\tboolean bol = true;\n\t\t\tif (v == 2) {\n\t\t\t\tcount++...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int v = scn.nextInt(); boolean bol = true; if (v == 2) { count++; continue; } else if (v % 2 == ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 8, 4, 13, 4, 18, 13, 2, 13, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, ...
[ [ 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.*;\n\npublic class Main {\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt;\n }\n Sys...
import java.util.*; public class Main { public static void main(String[] args) { @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int cnt = 0; for (int i = 0; i < n; i++) { cnt = isPrime(sc.nextInt()) ? cnt + 1 : cnt; } System.out.println(cnt...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2,...
[ [ 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\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(judge(sc.nextInt())) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\tstatic boolean judge(int ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int cnt = 0; for(int i = 0; i < n; i++){ if(judge(sc.nextInt())) cnt++; } System.out.println(cnt); } static boolean judge(int tmp){ if(tmp==2 || tmp==3 || tmp=...
[ 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 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\nclass Main{\n static public void main(String[] av){\n\n Scanner sc =new Scanner(System.in);\n int n =sc.nextInt();\n int a[]= new int[n];\n for(int i=0;i<n;i++){\n a[i] =sc.nextInt();\n }\nint sum=0;\n for (int j=0;j<n;j++)...
import java.util.Scanner; class Main{ static public void main(String[] av){ Scanner sc =new Scanner(System.in); int n =sc.nextInt(); int a[]= new int[n]; for(int i=0;i<n;i++){ a[i] =sc.nextInt(); } int sum=0; for (int j=0;j<n;j++){ dou...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 17, 14, 2, 2, 13, 17, 2, 2, 13, 17, 17, 29, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 14, 2, 2, 13, 13, 17, 29, 17, 29, 17, 23, 13, 12, 13, ...
[ [ 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;\nclass Main\n{\n\tstatic boolean isPrime( int x )\n\t{\n\t\tif( x == 2 )return true;\n\t\tif( x<2 || x%2==0 )return false;\n\t\tfor( int i = 3 ; i*i <= x ; i++ )\n\t\t\tif( x%i==0 )return false;\n\t\treturn true;\n\t}\n\tpublic static void main( String[] args )\n\t{\n\t\tScanner sc = new ...
import java.util.Scanner; class Main { static boolean isPrime( int x ) { if( x == 2 )return true; if( x<2 || x%2==0 )return false; for( int i = 3 ; i*i <= x ; i++ ) if( x%i==0 )return false; return true; } public static void main( String[] args ) { Scanner sc = new java.util.Scanner( System.in ); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 40, 13, 9, 14, 2, 2, 13, 17, 17, 9, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for (int k = 0; k < n; k++) {\n int a = sc.nextInt();\n\n // 2は素数。後続処理を簡素化するために個別に処理をする\...
import java.util.Scanner; public class Main { public static void main(String[] args) { int count = 0; Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int k = 0; k < n; k++) { int a = sc.nextInt(); // 2は素数。後続処理を簡素化するために個別に処理をする if ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 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 public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n int num = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n }\n class Inner{\n boolean inner(int x){\n ...
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a[] = new int[n]; int num = 0; for(int i = 0; i < n; i++){ a[i] = sc.nextInt(); } class Inner{ boolean inner(int x){ if(x == 2){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 136, 5 ], [ 136, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.util.*;\n \npublic class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int x = 0;\n \n\n int a[] = new int[N];\n for(int i = 0; i < N; i++){\n a[i] = sc.nextInt();\n ...
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int x = 0; int a[] = new int[N]; for(int i = 0; i < N; i++){ a[i] = sc.nextInt(); } for(int w ...
[ 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 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic final class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n= scan.nextInt();\n\t\t\n\t\tint count=0;\n\t\tfor (int i=0;i<n;i++) {\n\t\t\tif (isPrime(scan.nextInt()))count++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}...
import java.util.Scanner; public final class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n= scan.nextInt(); int count=0; for (int i=0;i<n;i++) { if (isPrime(scan.nextInt()))count++; } System.out.println(count); } static boolean isPrime(int n) { if...
[ 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 ], [ 100, 5 ], [ 100, 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) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint primeNum = 0;\n\n\t\tfor(int i = 0; i < n; i++) {\n\n\t\t\tint num = sc.nextInt();\n\n\t\t\tif(isPrime(num)) {\n\t\t\t\tpri...
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int primeNum = 0; for(int i = 0; i < n; i++) { int num = sc.nextInt(); if(isPrime(num)) { primeNum++; } } System.out.println(...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 12, 13, 30, 0, 13, 20, 2, 13, 17, 0, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 0, 13, 17, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 147, 5 ], [ 147, 6 ], [ 6, 7 ], [ 6, 8 ], [ 147, 9 ], [ 9, 10 ], [ 147, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14...
[ "import java.util.Scanner;\n\npublic class Main {\n\tfinal int MAX_N = 100000000;\n\tboolean[] primes;\n\tvoid eratosthenes() {\n\t\tprimes = new boolean[MAX_N + 1];\n\n\t\tprimes[2] = true;\n\t\tfor (int i = 3; i <= MAX_N; i += 2)\n\t\t\tprimes[i] = true;\n\n\t\tfor (int i = 3; i <= Math.sqrt(MAX_N); i += 2) {\n\t...
import java.util.Scanner; public class Main { final int MAX_N = 100000000; boolean[] primes; void eratosthenes() { primes = new boolean[MAX_N + 1]; primes[2] = true; for (int i = 3; i <= MAX_N; i += 2) primes[i] = true; for (int i = 3; i <= Math.sqrt(MAX_N); i += 2) { if (!primes[i]) continue; fo...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 20, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 18, 13, 13, 9, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 0, 13, 13, 30, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 103, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tprime = new boolean[100000001];\n\t\tint count = 0;\n\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tif (prime[i]) continue;\n\t\t\tfor (int j=i*2...
import java.util.Scanner; public class Main { static boolean[] prime; public static void main(String[] args) { Scanner sc = new Scanner(System.in); prime = new boolean[100000001]; int count = 0; for (int i=2; i<=10000; i++) { if (prime[i]) continue; for (int j=i*2; j<=100000000; j+=i) { prime[j...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 13, 13, 40...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 118, 5 ], [ 118, 6 ], [ 6, 7 ], [ 6, 8 ], [ 118, 9 ], [ 9, 10 ], [ 9, 11 ], [ 118, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\n\npublic class Main{\n\tfinal int MOD = 1000000007;\n\tfinal int INF = 1000000000;\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint cnt = 0;\n\t\tfor(int i = 0; i < n; ++i){\n\t\t\tint a = Integer.parseInt(s...
import java.util.*; public class Main{ final int MOD = 1000000007; final int INF = 1000000000; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int cnt = 0; for(int i = 0; i < n; ++i){ int a = Integer.parseInt(sc.next()); if(isPrime(a)) ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 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.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tContestScanner scan = new ContestScanner();\n\n\t\tin...
import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { ContestScanner scan = new ContestScanner(); int N = scan.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 2, 4, 18, 13, 17, 17, 17, 0, 18, 13, 17, 0, 18, 13, 17, 17, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 4, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 147, 5 ], [ 147, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tboolean[] prime=new boolean[(int)Math.pow(10,8)+1];\n\t\tprime[0]=prime[1]=true;\n\t\tint limit=(int)Math.pow(10,8);\n\t\tint limit2=(int)Math.sqrt(Math.pow(10,8));\n\t\tfor(int ...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan=new Scanner(System.in); boolean[] prime=new boolean[(int)Math.pow(10,8)+1]; prime[0]=prime[1]=true; int limit=(int)Math.pow(10,8); int limit2=(int)Math.sqrt(Math.pow(10,8)); for(int i=2;i<limit2;){ for(int...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 149, 14 ], ...
[ "import java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Sca...
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); // Scanner sc = new Scanner(new File("test_1.txt")); // Scanner sc = new Scanner(new File("test_2.t...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.Scanner;\npublic class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextIn...
import java.io.*; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { static String a; public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int count = 0;...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 14, 4, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 120, 11 ], [ 120, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main{\n\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int ...
[ 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 ], [ 119, 5 ], [ 119, 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.next());\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n int p = Integer.parseInt(scanner.next(...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.next()); int count = 0; for (int i = 0; i < n; i++) { int p = Integer.parseInt(scanner.next()); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 41, 13, 4, 18, 13, 13, ...
[ [ 0, 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.io.*;\n\npublic class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String count = new String(in.readLine());\n int lineCount = Integer.parseInt(count);\n int pFlag = 0;\n int result =...
import java.io.*; public class Main { public static void main(String[] args) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String count = new String(in.readLine()); int lineCount = Integer.parseInt(count); int pFlag = 0; int result = 0; for(...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 94, 11 ], [ 94, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader(System.in));\n\n\t\tint countResult = 0;\n...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); int countResult = 0; int inputNumTimes...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13,...
[ [ 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 ], [...
[ "// ALDS1_1_C Prime Numbers\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int cnt = 0;\n int n = Integer.parseInt(br.readLine());\n int[] x = new int[n];\n ...
// ALDS1_1_C Prime Numbers import java.io.*; class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { int cnt = 0; int n = Integer.parseInt(br.readLine()); int[] x = new int[n]; for (int i =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 8, 4, 13, 4, 18, 13, 17, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 11,...
[ [ 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;\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tcount += (isPrime(scan.nextInt()) ? 1 : 0);\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\tpublic st...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int count = 0; for(int i = 0; i < N; i++){ count += (isPrime(scan.nextInt()) ? 1 : 0); } System.out.println(count); } public static boolean isPrime(int a){ for...
[ 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\n\tpublic static void main(String[] args){\n\n\t\tScanner sc =new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint x,count=0;\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tx=sc.nextInt();\n\n\t\t\tif(judge_prime(x)) count++;\n\n\t\t}\n\n\t\tSystem.out.println(count);\n\n\...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); int n=sc.nextInt(); int x,count=0; for(int i=0;i<n;i++) { x=sc.nextInt(); if(judge_prime(x)) count++; } System.out.println(count); } private static boolean judge_prime(int ...
[ 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 ], [ 95, 5 ], [ 95, 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\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor(int x:nums){\n\t\t\tif(isPrime(...
import java.util.*; public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] nums = new int[n]; for(int i=0;i<n;i++){ nums[i] = sc.nextInt(); } int count = 0; for(int x:nums){ if(isPrime(x)){ count++; } } System.out....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2...
[ [ 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 ],...
[ "import java.util.Scanner;\n\n/**\n * ?´???°????????°?????????????????????\n * @author moritahokuto\n *\n */\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint size = scanner.nextInt();\n\t\tfor (int i = 0; i < size; i++) {\...
import java.util.Scanner; /** * ?´???°????????°????????????????????? * @author moritahokuto * */ public class Main { public static void main(String[] args) { int count = 0; Scanner scanner = new Scanner(System.in); int size = scanner.nextInt(); for (int i = 0; i < size; i++) { if (isPrime(scanner.next...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n StringBuilder bd = new StringBuilder();\n\n int n = sc.nextInt();\n int sum = 0;\n for (int i=0; i<n; i++) {\n sum += Prime(sc.nextInt());\n ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuilder bd = new StringBuilder(); int n = sc.nextInt(); int sum = 0; for (int i=0; i<n; i++) { sum += Prime(sc.nextInt()); } ...
[ 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 ], [ 117, 5 ], [ 117, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < x; i++) {\n\t\t\tif (isPrime(scanner.nextInt())) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t\tSystem.out...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int sum = 0; for (int i = 0; i < x; i++) { if (isPrime(scanner.nextInt())) { sum++; } } System.out.println(sum); } public static boolean...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 14, 2, 13, 17, 30, 4, 18, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 124, 5 ], [ 124, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t//??´??°????????°???????????????\n\t\t\tint loop = sc.nextInt();\n\n\t\t\t//??????????????¨?????°\n\t\t\tint count = 0;\n\n\t\t\t//??\\??????...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = null; try { sc = new Scanner(System.in); //??´??°????????°??????????????? int loop = sc.nextInt(); //??????????????¨?????° int count = 0; //??\??????????????????(?????????) for (int i = 0; i...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 14...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 123, 11 ], [ 123, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.rea...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { int n = Integer.parseInt( br.readLine() ); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 14, 2, 2, 13, 17, 17, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 0, 13, 17, 30, 30, 14, 2, 2, 13, 13, 17, 30, 0, 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 ], [ 13, 14 ], [...
[ "import java.io.*;\n\nclass Main{\n \n public static int prime(int x){\n int k = 0;\n if(x == 1){\n k = 1;\n }else if(x % 2 == 0){\n k = 1;\n }\n for(int i = 3; i <= Math.sqrt(x); i += 2){\n if (x % i == 0)...
import java.io.*; class Main{ public static int prime(int x){ int k = 0; if(x == 1){ k = 1; }else if(x % 2 == 0){ k = 1; } for(int i = 3; i <= Math.sqrt(x); i += 2){ if (x % i == 0){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13...
[ [ 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 nyuryoku = new Scanner(System.in);\n int n = nyuryoku.nextInt();\n int[] num = new int[n];\n for (int i = 0; i < n; i++){\n num[i] = nyuryoku.nextInt();\n }\n int ans = prime(n, num);\n System.o...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner nyuryoku = new Scanner(System.in); int n = nyuryoku.nextInt(); int[] num = new int[n]; for (int i = 0; i < n; i++){ num[i] = nyuryoku.nextInt(); } int ans = prime(n, num); System.out.println(ans);...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], ...
[ "import java.util.Scanner;\n\nclass Main {\n\tint count;\n\tpublic static void main(String[] args) {\n\t\tMain pmClass = new Main();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t\tpmClass....
import java.util.Scanner; class Main { int count; public static void main(String[] args) { Main pmClass = new Main(); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for(int i = 0; i < n; i++) { array[i] = sc.nextInt(); pmClass.calc(array[i]); } System.out.pr...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 17, 30, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 29, 17, 29, 17, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 91, 5 ], [ 91, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static boolean isPrime(int x) {\n\t\tif(x <= 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfor (int i = 2; i <= Math.sqrt(x); i++) {\n\t\t\t\tif (x % i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic static...
import java.util.Scanner; public class Main { public static boolean isPrime(int x) { if(x <= 1) { return false; } else { for (int i = 2; i <= Math.sqrt(x); i++) { if (x % i == 0) { return false; } } return true; } } public static void main(String[] args) { Scanner sc = new Scanner(...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 168, 8 ], [ 168, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.text.ParseException;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] arges) throws ParseException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\n\t\tint v1 = Integer.parseInt(line);\n\t\tint[] vs = new int[v1];\n\t\tfor (int i = ...
import java.text.ParseException; import java.util.Scanner; public class Main { public static void main(String[] arges) throws ParseException { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); int v1 = Integer.parseInt(line); int[] vs = new int[v1]; for (int i = 0; i < v1; i++) { String...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 17, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n int N = in.nextInt();\n boolean[] FURUI = new boolean[100_000_000 + 1];\n for (int i = 2; i < FURUI.length; i++) {\n ...
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { int N = in.nextInt(); boolean[] FURUI = new boolean[100_000_000 + 1]; for (int i = 2; i < FURUI.length; i++) { FURUI[i] = tr...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 17, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 100, 11 ], [ 100, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.lang.*;\nimport java.io.*;\nimport java.math.*;\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\tBufferedReader br=new BufferedReader(isr);\n\tString nst = br.readLine();\n\tint n = Integer.parseInt(nst)...
import java.lang.*; import java.io.*; import java.math.*; public class Main{ public static void main(String[] args)throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); String nst = br.readLine(); int n = Integer.parseInt(nst); int x,cnt=0; f...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 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\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++...
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int num[]= new int[n]; for (int i=0;i<n;++i){ num[i]=sc.nextInt(); } int div; int counter=0; for (int i=0;i<n;++i){ div =0; for (int j=2;j<=(double...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args)\n {\n Scanner scan=new Scanner(System.in);\n int Count=0;\n int count_num=scan.nextInt();\n\n for(int j=0;j<count_num;j++){\n if(Check(scan.nextInt()))\n {\n ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int Count=0; int count_num=scan.nextInt(); for(int j=0;j<count_num;j++){ if(Check(scan.nextInt())) { Count++; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 275, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n \npublic class Main {\n\tpublic void exec() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWrite...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public void exec() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out);...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 13, 4, 18, 13, 23, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 148, 5 ], [ 148, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnumbers[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(count(numbers, n))...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] numbers = new int[n]; for (int i = 0; i < n; i++) { numbers[i] = sc.nextInt(); } System.out.println(count(numbers, n)); sc.close(); } public stat...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 0, 13, 20, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 0, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 154, 5 ], [ 154, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> str = new ArrayList<String>();\n\t\twhile(in.hasNext()) {\n\t\t\tString buf = in.nextLine();\n\t\t\tstr.add(buf);\n\t\t}\n\t\t\n\t\tint facter[];\n\t\tfacter = new...
import java.util.*; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); ArrayList<String> str = new ArrayList<String>(); while(in.hasNext()) { String buf = in.nextLine(); str.add(buf); } int facter[]; facter = new int[str.size()]; for (int i = 0; i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 41, 13...
[ [ 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\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count=0;\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s=sc.nextLine();\n\t\t\tint num=Integer.parseInt(s);\n\t\t\tdouble numDoubl...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count=0; int n = Integer.parseInt(sc.nextLine()); for(int i=0;i<n;i++){ String s=sc.nextLine(); int num=Integer.parseInt(s); double numDouble=Double.parseDouble(s); int di...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 0, 13, 4, 13, 13, 14, 13, 30, 40, 13, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, ...
[ [ 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 scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint count = 0;\n\t\tint prime_num = 0;\n\t\tboolean prime = false;\n\t\t\n\t\twhile( count < num ) {\n\t\t\tprime = isPrime(scanner);\n\t...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt();//要素数 int count = 0; int prime_num = 0; boolean prime = false; while( count < num ) { prime = isPrime(scanner); if( prime ) { prime_num ++; ...
[ 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\n\npublic static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int answer = 0;\n for(int i = 0;i < n; i++){\n int number = Integer.parseInt(b...
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int answer = 0; for(int i = 0;i < n; i++){ int number = Integer.parseInt(br.readLine()); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 42, 17, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 4, 18, 13, 13, 1...
[ [ 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 ], ...
[ "import java.io.*;\n\nclass Main\n{\n \n public static void main(String[] args)\n {\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n int[] array = new i...
import java.io.*; class Main { public static void main(String[] args) { try{ // ??\??????????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // ????????°??????????????? int n = Integer.parseInt(br.readLine()); int[] array = new int[n]; int pu...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 42, 4, 18, 13, 30, 14, 4, 13, 4, 18, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 29, 17, 14, 2, 2, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main (String [] args) {\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNextInt()) {\n\t\t\tif(isPrime(in.nextInt())) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}\n\t\tpublic st...
import java.util.Scanner; public class Main { public static void main (String [] args) { int count = 0; Scanner in = new Scanner(System.in); while(in.hasNextInt()) { if(isPrime(in.nextInt())) { count++; } } System.out.println(count); } public static boolean isPrime(int i) { if(i ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 17, 28, 13, 13, 30, 30, 0, 13, 8, 4, 13, 4, 18, 13, 13, 17, 17, 4, 13, 13, 23, 13, 12, 13, 30, 14, 2, 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.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\n/**\n * Greatest Common Divisor\n *\n */\npublic class Main {\n \n public static void main(String[] args) {\n // input data\n List<String> input = inputLines...
import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; /** * Greatest Common Divisor * */ public class Main { public static void main(String[] args) { // input data List<String> input = inputLines(); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 40, 13, 4, 18, 13, 13, 2...
[ [ 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.io.*;\nclass Main{\n\tpublic static void main(String[]args){\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tint n=in.nextInt();\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint a=in.nextInt();\n\t\t\tif(check_prime(a))\n\...
import java.util.*; import java.io.*; class Main{ public static void main(String[]args){ Scanner in=new Scanner(System.in); PrintWriter out=new PrintWriter(System.out, true); int n=in.nextInt(); int count=0; for(int i=0;i<n;i++){ int a=in.nextInt(); if(check_prime(a)) count++; } out.println(cou...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, ...
[ [ 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.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\n\n \npublic class Main {\n public static void main(String[] args) {\n InputReader sc = new In...
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.LinkedList; import java.util.PriorityQueue; public class Main { public static void main(String[] args) { InputReader sc = new InputReader(System...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 29, 17, 30, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 0, 13, 17, 30, 30, 14, 2, 2, 13, 13, 17, 30, 29, 17, 29, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 123, 11 ], [ 123, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n\tpublic static boolean quo(int n) {\n\t\tif((n == 0)||(n == 1)) {\n\t\t\treturn false;\n\t\t}else{\n\t\t\tfor(int i = 2; i<= Math.sqrt(n); i+=1) {\n\t\t\t\tif(n%i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\...
import java.util.ArrayList; import java.util.Scanner; import java.lang.Math; public class Main { public static boolean quo(int n) { if((n == 0)||(n == 1)) { return false; }else{ for(int i = 2; i<= Math.sqrt(n); i+=1) { if(n%i == 0) { return false; } } } return true; } public static...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23...
[ [ 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\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n \tfor (int i = 0; i < n; i++) {\n \t\tint data = sc.nextInt();\n \t\tif (checkPrimeNum(data)) {\n \t\t\tcount++;...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int data = sc.nextInt(); if (checkPrimeNum(data)) { count++; } } System.out....
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 14, 2, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 162, 5 ], [ 162, 6 ], [ 6, 7 ], [ 162, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.*;\n\npublic class Main {\n\t\n\tstatic boolean A[];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(),D[]=new int[n],max=0,cnt=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tD[i]=Integer.parseInt(in.next());\n\t\t\tif(D[i]>max)max=D[i];\n...
import java.util.*; public class Main { static boolean A[]; public static void main(String[] args) { Scanner in=new Scanner(System.in); int n=in.nextInt(),D[]=new int[n],max=0,cnt=0; for(int i=0;i<n;i++) { D[i]=Integer.parseInt(in.next()); if(D[i]>max)max=D[i]; } sieve(max); for(int i=0;i<D....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 4, 18, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int count = 0;\n for(int i = 0; i < n; i++){\n if(isprime(Integer.parseInt(sc.n...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int count = 0; for(int i = 0; i < n; i++){ if(isprime(Integer.parseInt(sc.next()))) count++...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint cnt=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint m=s.nextInt();\n\t\t\tint c=0;\n\t\t\tfor(int j=2;j<=Math.sqrt(m);j++){\n\t\t\t\tif(m%j==0) c=1;\n\t\t\t}\n\t...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); int n=s.nextInt(); int cnt=0; for(int i=0;i<n;i++){ int m=s.nextInt(); int c=0; for(int j=2;j<=Math.sqrt(m);j++){ if(m%j==0) c=1; } if(c==0) cnt++; } System.out.println(...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 18, 13, 4, 18, 13, 4, 18, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 109, 11 ], [ 109, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { // TODO 自動生成されたメソッド・スタブ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int primaryRange...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 2, ...
[ [ 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 IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int i, j;\n int count = 0;\n \n for(i=0; i<n; i++){\n ...
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int i, j; int count = 0; for(i=0; i<n; i++){ int a...
[ 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 ], [ 99, 5 ], [ 99, 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\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlong num = sc.nextLong();\n\t\t\tif(isPrime(num)) count++;\n\t\t}\n\n\t\tSystem.out...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { long num = sc.nextLong(); if(isPrime(num)) count++; } System.out.println(count); } private static bo...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 4, 13, 18, 13, 13, 17, 40, 13, 4,...
[ [ 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.*;\nclass Main{\n public static void main(String args[]){\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\n for(int i = 0; i<n; i++){\n a[i] = sc.nextInt();\n if(Judge_Prime(a[i])==1)count++;\n }\n System.ou...
import java.util.*; class Main{ public static void main(String args[]){ int count = 0; Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a[] = new int[n]; for(int i = 0; i<n; i++){ a[i] = sc.nextInt(); if(Judge_Prime(a[i])==1)count++; } System.out.println(count);...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 40, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 194, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\t\n\t\tfor(in...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { private static FastScanner sc = new FastScanner(); public static void main(String[] args) { int n = sc.nextInt(); int cnt = 0; for(int i=1; i<=n; i++){ int x...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13...
[ [ 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\t\n\t\tint[] n = new int[10000];\n\t\t\n\t\tint N = scan.nextInt();\n\t\t\n\t\tint kai = N;\n\t\tint x = 0;\n\t\t\n\t\tfor(int i=0; i<N; i++){\n\t\t\tn[i] = scan.nextInt();\n\t\t}\n...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int[] n = new int[10000]; int N = scan.nextInt(); int kai = N; int x = 0; for(int i=0; i<N; i++){ n[i] = scan.nextInt(); } for(int i=0; i<N; i++){ if(n[i]%2==0 && ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 28, 13, 13, 30, 30, 14, 4, 13, 13, 40, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 100, 5 ], [ 100, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] arr = new int[N]; for(int i = 0; i < N; i++) { arr[i] = sc.nextInt(); } int count = 0; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 396, 5 ], [ 396, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n/**\n * @author saiyo\n *\n */\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int x = scan.nextInt();\n\t\t//int y = scan.nextInt();\n\t\t\n\t\t//Seisu s = ...
import java.util.Scanner; /** * @author saiyo * */ public class Main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); //int x = scan.nextInt(); //int y = scan.nextInt(); //Seisu s = new Seisu(x, y); //s.kouyaku(); ...
[ 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 ], [ 116, 8 ], [ 116, 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\tboolean primeJudge(int a) {\n\t\tdouble sqrt = Math.sqrt(a) + 1;\n\t\tif (a < 2) return false;\n\t\tif (a == 2) return true;\n\t\tif (a % 2 == 0) return false;\n\t\tfor (int i = 3; i < sqrt; i+=2) {\n\t\t\tif (a % i == 0) ret...
import java.util.Scanner; import java.lang.Math; // ALDS1_1_C public class Main { boolean primeJudge(int a) { double sqrt = Math.sqrt(a) + 1; if (a < 2) return false; if (a == 2) return true; if (a % 2 == 0) return false; for (int i = 3; i < sqrt; i+=2) { if (a % i == 0) return false; } return true; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18...
[ [ 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.InputStreamReader;\nimport java.io.IOException;\n\nclass Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] x ...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] x = new int[n]; int co...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 33, 5 ], [ 33, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n prime: for(int i=0; i<n; i++){\n p=scan.nextInt();\n //System.out.println((int)Math.sqrt(p));\n ...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int n,p,q=0; n=scan.nextInt(); prime: for(int i=0; i<n; i++){ p=scan.nextInt(); //System.out.println((int)Math.sqrt(p)); for(int j=...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 96, 5 ], [ 96, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint n = input.nextInt();\n\t\tint b, count = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif( isPrime( input.nextInt() ) )\n\t\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSyste...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner input = new Scanner(System.in); int n = input.nextInt(); int b, count = 0; for(int i = 0; i < n; i++) { if( isPrime( input.nextInt() ) ) count++; } System.out.println(count); } private static boo...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 14, 4, 18, 13, 17, 30, 40, 13, 4, 18, 18, 13, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 58, 8 ], [ 58, 9 ], [ 9, 10 ], [ 9, 11 ], [ 58, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n static int primeCounter = 0;\n\n public static void main(String args[]) {\n // input\n\n int numEl;\n\n Scanner inp = new Scanner(System.in);\n\n numEl = inp.nextInt();\n\n for (int i = 0; i < numEl;...
import java.math.BigInteger; import java.util.*; public class Main { static int primeCounter = 0; public static void main(String args[]) { // input int numEl; Scanner inp = new Scanner(System.in); numEl = inp.nextInt(); for (int i = 0; i < numEl; i++) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 13, 13, 14, 13, 30, 0, 13, 17, 4, 18, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = sc.nextInt();\n\t\tint sosu=0;\n\t\tboolean it;\n\n\t\tfor(int i=0; i<count; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tit=isprime(y);\n\t\t\tif(i...
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int sosu=0; boolean it; for(int i=0; i<count; i++) { int y = sc.nextInt(); it=isprime(y); if(it) { sosu += 1; } } System...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 17, 0, 13, 17, 42, 2, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 87, 5 ], [ 87, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int num,cnt=0,j,a=0;\n for(int i=0;i<n;i++){\n num=sc.nextInt();\n j=2;\n a=0;\n while(j<...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int num,cnt=0,j,a=0; for(int i=0;i<n;i++){ num=sc.nextInt(); j=2; a=0; while(j<=Math.sqrt(num))...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 133, 11 ], [ 133, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n//import java.util.Collections;\n\npublic class Main{\n public static void main(String[] args) throws Exception{\n int number;\n ArrayList<Integer> prime = new ArrayList<>();\n ArrayList<Integer>...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; //import java.util.Collections; public class Main{ public static void main(String[] args) throws Exception{ int number; ArrayList<Integer> prime = new ArrayList<>(); ArrayList<Integer> exist = new A...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 4, 18, 13, 4, 18, 13, 30...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 122, 11 ], [ 122, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br....
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 4, 13, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 118, 5 ], [ 118, 6 ], [ 6, 7 ], [ 6, 8 ], [ 118, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t\tif(prime...
import java.util.Scanner; public class Main { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int i, j, k; int n = sc.nextInt(); int a[] = new int[n]; int count = 0; for(i = 0; i < n; i++){ a[i] = sc.nextInt(); if(prime(a[i]) == 1) count++; } System.o...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 0, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 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.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args) throws Exception{\n\tint i=0;\n\tint Prime_COUNT = 0;\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\n\tString str_A = br.readLine();\n\t\n\tint n = Integer.parseInt(str_A);\n\t\n\tin...
import java.io.*; import java.util.*; class Main{ public static void main(String[] args) throws Exception{ int i=0; int Prime_COUNT = 0; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str_A = br.readLine(); int n = Integer.parseInt(str_A); int A[]; A = new int[n]; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 18, 13, 2, 13, 17, 30, 40, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 145, 5 ], [ 145, 6 ], [ 6, 7 ], [ 6, 8 ], [ 145, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic int MAX_COUNT= 100000000;\n\tpublic static void main(String[] args){\n\n\t\tboolean[] isPrimeNumber = createIsPrimeNumber();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i <N; i++){\n\t\t\tint...
import java.util.Scanner; public class Main { static int MAX_COUNT= 100000000; public static void main(String[] args){ boolean[] isPrimeNumber = createIsPrimeNumber(); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int count = 0; for(int i = 0; i <N; i++){ int temp= sc.nextInt(); if(isPr...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 103, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static int count;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0;i < n; i++){\n\t\t\tint num = sc.nextInt();\n\t\t\tsolve(num);\n\t\t}\n\n\t\tSystem.out.println(count);\n...
import java.util.Scanner; public class Main{ public static int count; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = 0;i < n; i++){ int num = sc.nextInt(); solve(num); } System.out.println(count); } public static void solve(int nu...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13...
[ [ 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 scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int[] getNum = new int[a];\n int count = 0; //素数の個数\n\n //標準入力を配列に格納\n for(int i = 0; i < getNum.length; i++) {\n getNum[i] = scan.nextInt(...
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int[] getNum = new int[a]; int count = 0; //素数の個数 //標準入力を配列に格納 for(int i = 0; i < getNum.length; i++) { getNum[i] = scan.nextInt(); } for(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 17, 14, 2, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = 0;\n\t\tint count = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\tx = sc.nextInt();\n\t\t\tif (isPrime(x))\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n\tp...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = 0; int count = 0; while (sc.hasNext()) { x = sc.nextInt(); if (isPrime(x)) count++; } System.out.println(count); } public static boolean isPrime(int x) { if (x...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 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 ], [ 78, 14 ], ...
[ "import java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"test_1.txt\"));\n\t\t// Scanner sc = new Sca...
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); // Scanner sc = new Scanner(new File("test_1.txt")); // Scanner sc = new Scanner(new File("test_2.t...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\twhile(n-->0) {\n\t\t\tint num = sc.nextInt();\n\t\t\tif(isPrime(num)) cnt++;\n\t\t}\n\t\tSystem.out.println(cnt);\n\t}\n\t\n\tpublic...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int cnt = 0; while(n-->0) { int num = sc.nextInt(); if(isPrime(num)) cnt++; } System.out.println(cnt); } public static boolean isPrime(int num){ for(...
[ 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 ], [ 111, 5 ], [ 111, 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\n int n = sc.nextInt();\n\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = sc.nextInt();\n }\n\n int cnt = 0;\n for (int i = 0; i < n; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] x = new int[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextInt(); } int cnt = 0; for (int i = 0; i < n; i++) { if (i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 17, 14, 2, 2, 13, 17, 2, 2, 13, 17, 17, 30, 29, 17, 41, 13, 17, 42, 2, 13, 4, 18, 13, 13, 30, 14, 2, 2, 13, 13, 17, 30, 29, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 122, 5 ], [ 122, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 6, 11 ], [ 11, 12 ], [ 122, 13 ], [ 13, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\n\tstatic boolean isPrime(int x){\n\t\tif(x == 2){\n\t\t\treturn true;\n\t\t}else if(x < 2 || x % 2 == 0){\n\t\t\treturn false;\n\t\t}\n\t\tint i = 3;\n\t\twhile(i <= Math.sqrt(x)){\n\t\t\tif(x % i == 0){...
import java.util.Scanner; public class Main { public static void main(String args[]){ run(); } static boolean isPrime(int x){ if(x == 2){ return true; }else if(x < 2 || x % 2 == 0){ return false; } int i = 3; while(i <= Math.sqrt(x)){ if(x % i == 0){ return false; } i= i + 2; } r...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, ...
[ [ 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.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSet<BigInteger> set=new HashSet<BigInteger>();\n\t\tint c=0;\n\t\tint...
import java.math.BigInteger; import java.util.ArrayList; import java.util.HashSet; import java.util.Scanner; import java.util.Set; class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); Set<BigInteger> set=new HashSet<BigInteger>(); int c=0; int n=scan.nextInt(); for(in...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 42, 4, 18, 13, 30, 0, 13, 17, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 0, 13, 17, 3, 34, 17, 1, 0, 13, 17, 3, 34, 1, 14, 2, 2, 13, 17, 17, 30, ...
[ [ 0, 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.*;\nclass Main {\n public static void main(String...args) {\n Scanner scan = new Scanner(System.in);\n int count = 0;\n boolean isPrime;\n while(scan.hasNext() ) {\n isPrime = true;\n int primeNum = scan.nextInt();\n \n switch(...
import java.util.*; class Main { public static void main(String...args) { Scanner scan = new Scanner(System.in); int count = 0; boolean isPrime; while(scan.hasNext() ) { isPrime = true; int primeNum = scan.nextInt(); switch(primeNum) { ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 4, 18...
[ [ 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\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString n = br.readLin...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String n = br.readLine(); String nums; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 11, 1, 0, 13, 17, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 91, 5 ], [ 91, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int i, j, n = scanner.nextInt();\n int count = 0;\n \n for(i = 0; i < n; ++i){\n int input = scanner.nextInt();\n int ...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int i, j, n = scanner.nextInt(); int count = 0; for(i = 0; i < n; ++i){ int input = scanner.nextInt(); int root = (int)Mat...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 14...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 104, 5 ], [ 104, 6 ], [ 6, 7 ], [ 6, 8 ], [ 104, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\n\npublic class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int c = 0, n = scn.nextInt();\n for(int i = 0; i < n; i++) {\n c += primeCheck(scn.nextInt());\n }\n System.out.pri...
import java.util.*; public class Main { private static final Scanner scn = new Scanner(System.in); public static void main(String[] args) { int c = 0, n = scn.nextInt(); for(int i = 0; i < n; i++) { c += primeCheck(scn.nextInt()); } System.out.println(c); } ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 20, 23, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 152, 8 ], [ 8, 9 ], [ 152, 10 ], [ 10, 11 ], [ 152, 12 ], [ 12, 13 ], [ 12, ...
[ "import java.util.Scanner;\npublic class Main {\n\tint n;\n\tint list[];\n\tboolean sieve[];\n\tpublic static void main(String main[]) {\n\t\tnew Main();\n\t}\n\tMain() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tn = scan.nextInt();\n\t\tlist = new int[n];\n\t\tint max = 0;\n\t\tfor (int i = 0; i < n; i++) {...
import java.util.Scanner; public class Main { int n; int list[]; boolean sieve[]; public static void main(String main[]) { new Main(); } Main() { Scanner scan = new Scanner(System.in); n = scan.nextInt(); list = new int[n]; int max = 0; for (int i = 0; i < n; i++) { list [i] = scan.nextInt(); ma...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 18, 36, 13, 4, 18, 13, 0, 18, 36, 13, 20, 18, 36, 13, 11, 1, 41, 13, 17, 2, 13, 18, 36, 13, 1, 40, 13, 30, 30, 0, 18, 18, 36, 13, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 253, 5 ], [ 253, 6 ], [ 6, 7 ], [ 253, 8 ], [ 8, 9 ], [ 253, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 1...
[ "import java.util.Scanner;\n\n/**\n * Prime\n */\npublic class Main {\n\n public int size;\n public int[] mx;\n\n public void scan() {\n Scanner sc = new Scanner(System.in);\n this.size = sc.nextInt();\n this.mx = new int[this.size];\n for (int i = 0; i < this.size; i++) {\n ...
import java.util.Scanner; /** * Prime */ public class Main { public int size; public int[] mx; public void scan() { Scanner sc = new Scanner(System.in); this.size = sc.nextInt(); this.mx = new int[this.size]; for (int i = 0; i < this.size; i++) { this.mx[i] =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\n\n\tpublic static void main(String args[]){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint num[]= new int[n];\n\t\tfor (int i=0;i<n;++i){\n\t\t\tnum[i]=sc.nextInt();\n\t\t}\n\t\tint div;\n\t\tint counter=0;\n\n\t\tfor (int i=0;i<n;++...
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int num[]= new int[n]; for (int i=0;i<n;++i){ num[i]=sc.nextInt(); } int div; int counter=0; for (int i=0;i<n;++i){ div =0; if (num[i]==2) ++counte...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 142, 5 ], [ 142, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner =new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[99999999];\n boolean[] booleans=new boolean[99999999];\n for(int ...
import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner scanner =new Scanner(System.in); int n=scanner.nextInt(); int[] ints=new int[99999999]; boolean[] booleans=new boolean[99999999]; for(int i=0;i<99999999;i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 18, 13, 13, 13, 14, 2, 13...
[ [ 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;\nclass Main{\n public static void main(String[] av){\n Scanner sc=new Scanner(System.in);\n int m = 0;\n int a;\n int cnt = 0;\n int n = sc.nextInt();\n int[] d=new int[n];\n for(int i=0; i<n;i++){\n a = sc.nextInt();\n ...
import java.util.Scanner; class Main{ public static void main(String[] av){ Scanner sc=new Scanner(System.in); int m = 0; int a; int cnt = 0; int n = sc.nextInt(); int[] d=new int[n]; for(int i=0; i<n;i++){ a = sc.nextInt(); d[i] = a; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, ...
[ [ 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.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.next());\n int cnt = 0;\n for(int i=0;i<n;i++) {\n \tcnt+=isPrime(Integer.valueOf(scan.next()));\n }\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = Integer.valueOf(scan.next()); int cnt = 0; for(int i=0;i<n;i++) { cnt+=isPrime(Integer.valueOf(scan.next())); } System.out.pri...