전체 글 (271) 썸네일형 리스트형 [백준_JAVA] 14215 세 막대 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (true) { int max = scan.nextInt(); int mid = scan.nextInt(); int min = scan.nextInt(); if (max < mid) { int tmp = max; max = mid; mid = tmp; } if (max < min) { int tmp = max; max = min; min = tmp; } if (mid < min) { int tmp = mid; mid = min; min = tmp; } if (max min.. [백준_JAVA] 9506 약수들의 합 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(true) { int index = 0; int sum = 0; int num = scan.nextInt(); int[] numArray = new int[num/2]; if(num == -1) break; for(int i = 1; i [백준_JAVA] 1193 분수찾기 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)); int input = Integer.parseInt(br.readLine()); // 입력 값 int col = 0; // 칸의 수 int countNum = 1; // 몇 번째 숫자 int numerator = 0; // 분자 int denominator = 0; // .. [백준_JAVA] 2566 최댓값 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String[][] arrList = new String[9][9]; String[] arr; String str = null; int max = 0; int row = 0; int col = 0; for(int i = 0; i < arrList.length; i++) { str = scan.nextLine(); arr = str.split(" "); for(int j = 0; j < arr.length; j++) { arrList[i][j] = arr[j]; int currentN.. [백준_JAVA] 10798 세로읽기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); char[][] arr = new char[5][15]; String str = null; for(int i = 0; i < arr.length; i++) { str = scan.next(); for(int j = 0; j < str.length(); j++) { arr[i][j] = str.charAt(j); } } for(int i = 0; i < arr.length; i++) { for(int j = 0; j < str.length(); j++) { if(arr[i][j] ==.. [백준_JAVA] 15894 수학은 체육과목 입니다 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long num = scan.nextInt(); System.out.println(num*4); scan.close(); } } (1 ≤ n ≤ 10^9) 범위 때문에 int형이 아닌 long형이 되어야 한다. [백준_JAVA] 3009 네 번째 점 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x1, x2, x3, y1, y2, y3; int x4=0; int y4=0; x1 = scan.nextInt(); y1 = scan.nextInt(); x2 = scan.nextInt(); y2 = scan.nextInt(); x3 = scan.nextInt(); y3 = scan.nextInt(); if(x1 == x2) x4 = x3; if(x1 == x3) x4 = x2; if(x2 == x3) x4 = x1; if(y1 == y2) y4 = y3; if(y1 == y.. [백준_JAVA] 1316 그룹 단어 체커 import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int group = 0; for (int i = 0; i < num; i++) { String S = sc.next(); boolean check[] = new boolean[26]; boolean tmp = true; for (int j = 0; j < S.length(); j++) { int index = S.charAt(j)-'a'; if(check[index]) { if(S.charAt(j) != S.charAt(j-1)) { tmp = false.. 이전 1 ··· 9 10 11 12 13 14 15 ··· 34 다음