자바137 [백준/Java] 2530번 인공지능 시계 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int m = sc.nextInt(); int s = sc.nextInt(); int time = sc.nextInt(); int answer = h * 3600 + m * 60 + s + time; h = answer / 3600 % 24; m = answer % 3600 / 60; s = answer % 60; System.out.println(h + " " + m + " " + s); } } 2022. 4. 16. [백준/Java] 2739번 구구단 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 1; i 2022. 4. 16. [백준/Java] 2439번 별 찍기 - 2 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i i; j--) { System.out.print(" "); } for (int j = 0; j < i + 1; j++) { System.out.print("*"); } System.out.println(); } } } 2022. 4. 16. [백준/Java] 2438번 별 찍기 - 1 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i < n; i++) { for (int j = 0; j < i + 1; j++) { System.out.print("*"); } System.out.println(); } } } 2022. 4. 16. [백준/Java] 9498번 시험 성적 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int score = sc.nextInt(); if (score >= 90){ System.out.println('A'); } else if (score >= 80){ System.out.println('B'); } else if (score >= 70) { System.out.println('C'); } else if (score >= 60) { System.out.println('D'); } else { System.out.println('F'); } } } 2022. 4. 16. [백준/Java] 2753번 윤년 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int year = sc.nextInt(); if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0){ System.out.println(1); } else { System.out.println(0); } } } 2022. 4. 16. 이전 1 ··· 7 8 9 10 11 12 13 ··· 23 다음