목록배열 (7)
hara
https://www.acmicpc.net/problem/1932 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class a1932 { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int arr[][] = n..
https://www.acmicpc.net/problem/2839 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a2839 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] a=new int[num+1]; a[0]=0; a[1]=-1; a[2]=-1; f..
https://www.acmicpc.net/problem/11726 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a11726 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int []a=new int[num]; a[0]=1; if(num>=2){ a[1]=2;..
https://www.acmicpc.net/problem/1463 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a1463 { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] a=new int[num]; a[0]=0; for(int i=1;ia[i/2]+1){ a[i]=a[i/2]+1; } if(..
https://www.acmicpc.net/problem/9095 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a9095 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] tl=new int[11]; tl[0]=1; tl[1]=2; tl[2]=4; fo..
https://www.acmicpc.net/problem/3040 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class a3040 { public static void main(String[] args) throws NumberFormatException, IOException { int[] a=new int[9]; int sum=0; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); //Scanner sc=new Scanner(System.in)..