본문 바로가기

Java444

[백준/Java] 34802번 강의실 들어가기 -Codeimport java.util.Scanner;public class BOJ34802 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] start = sc.next().split(":"); String[] end = sc.next().split(":"); int t = sc.nextInt(); int k = sc.nextInt(); // 시간을 초로 바꾸어 계산하기 위한 배열 int[] timeRatio = {3600, 60, 1}; int totalStart = 0; in.. 2025. 12. 8.
[백준/Java] 34891번 MT 준비 -Codeimport java.util.Scanner;public class BOJ34891 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double n = sc.nextInt(); double m = sc.nextInt(); System.out.println((int) (Math.ceil(n / m))); }} 2025. 12. 7.
[백준/Java] 34824번 연대 다음 고대 -Codeimport java.util.Scanner;public class BOJ34824 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int koIdx = -1; int yonIdx = -1; for (int i = 0; i 2025. 12. 6.
[백준/Java] 34823번 YCPC 점수 -Codeimport java.util.Scanner;public class BOJ34823 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int res = Integer.MAX_VALUE; for (int i = 0; i 2025. 12. 5.
[백준/Java] 34798번 Missed Alarm -Codeimport java.util.Scanner;public class BOJ34798 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] alarm = sc.next().split(":"); String[] wakeup = sc.next().split(":"); int alarmHour = Integer.parseInt(alarm[0]) * 60; int alarmMin = Integer.parseInt(alarm[1]); int wakeupHour = Integer.parseInt(wakeup[0]) * 60;.. 2025. 12. 4.
[백준/Java] 34813번 공통교육과정 -Codeimport java.util.Scanner;public class BOJ34813 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String subNum = sc.next(); char first = subNum.charAt(0); System.out.println(getSubName(first)); } // 과목 이름 반환 private static String getSubName(char firstChar) { switch (firstChar) { case 'F': return "Foundat.. 2025. 12. 3.