https://www.acmicpc.net/problem/1152정답import java.io.IOException;import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.StringTokenizer;public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()," "); ..
JAVA/백준
https://www.acmicpc.net/problem/2675정답import java.io.IOException;import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.StringTokenizer;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); //2 for (int i = 0..
https://www.acmicpc.net/problem/10809정답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)); String s = br.readLine(); int[] arr= new int[26]; for(int i = 0;i풀이알파벳 크기 만큼 배..
https://www.acmicpc.net/problem/11720정답import java.io.IOException;import java.io.InputStreamReader;import java.io.BufferedReader;public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br. readLine(); int sum = 0; for(byte value : br.readLine().getBytes()){ ..
https://www.acmicpc.net/problem/11654정답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 ch = br.readLine().charAt(0); System.out.println(ch); }}
https://www.acmicpc.net/problem/9086정답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 t = Integer.parseInt(br.readLine()); for(int i=1;i
https://www.acmicpc.net/problem/2743정답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)); String str = br.readLine(); System.out.println(str.length()); }}
https://www.acmicpc.net/problem/27866 정답import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = br.readLine(); int i = Integer.parseInt(br.readLine())-1; System.out.print..
https://www.acmicpc.net/problem/1546정답import java.util.Arrays;import java.util.StringTokenizer;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double arr[] = new double[Integer.pa..
https://www.acmicpc.net/problem/10811문제 해석 (예제 입력1)배열 크기는 5개 , 4번 바꾸기 실행한다예시로 [1,2,3,4,5]1 2 ⇒ [2,1,3,4,5]3 4 ⇒ [2,1,4,3,5]1 4 ⇒ [3,4,1,2,5]2 2 ⇒ [3,4,1,2,5] 1 4 라면1번째 배열 → 4번째 배열2번째 배열 → 3번째 배열3번째 배열 → 2번째 배열4번째 배열 → 1번째 배열정답import java.io.IOException;import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.StringTokenizer;public class Main{ public stati..