목록알고리즘 (52)
hara
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/2010 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a2010 { 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]; int sum=0; for(int i=0;i
https://www.acmicpc.net/problem/4344 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class a4344 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); for(int i=0;i
https://www.acmicpc.net/problem/5789 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a5789 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); for(int i=0;i
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/11399 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class a11399 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.rea..