문제 정답 풀이 import java.io.*; 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()); int N = Integer.parseInt(st.nextToken()); int M = Integer.parseInt(st.nextToken()); int[][] A = new int[N][M]; int[][] B = new..
문제 정답 풀이 import java.io.*; 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 count = 0; // 그룹 단어 개수 int[] check = new int[26]; // 알파벳 26개 배열 boolean bad = true; // 그룹 단어 인지 판별 for(int i = 0; i < N; i++){ String str = br.readLine(); // 단어 읽음..
문제 정답 풀이 import java.io.*; 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; int C = Integer.parseInt(br.readLine()); int[] arr; for(int i = 0; i < C; i++){ st = new StringTokenizer(br.readLine(), " "); int N = Integer.parseInt(st.nextToken..
문제 정답 풀이 import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] arr = new int[26]; // 알파벳 개수 총 26개 char st = '?'; int max = -1; String str = br.readLine().toUpperCase(); // 대문자로 전환하여 받음 for(int i = 0; i < str.length(); i++){ // A는 인덱스 0이므로 해..
문제 정답 풀이 import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); // 바구니 개..
문제 정답 풀이 import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int num = Integer.parseInt(br.readLine()); for(int i = 1; i = 0; i--){ for(int j = 0; j < num-i; j++){ bw.w..
문제 정답 풀이 import java.io.BufferedReader; import java.io.IOException; 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 king = 1; int queen = 1; int rook = 2; int bishop = 2; int knight = 2; int pawn = 8; StringTokenizer st ..