자바137 [백준/Java] 2742번 기찍 N -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 = n; i > 0; i--){ System.out.println(i); } } } 2022. 4. 18. [백준/Java] 2741번 N 찍기 -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++){ System.out.println(i + 1); } } } 2022. 4. 18. [백준/Java] 10162번 전자레인지 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int s = sc.nextInt(); int[] time = new int[3]; time[0] = s / 300; time[1] = s % 300 / 60; time[2] = s % 60 / 10; if (s % 10 > 0){ System.out.println(-1); } else { for (int t : time){ System.out.print(t + " "); } System.out.println(); } } } 2022. 4. 18. [백준/Java] 15973번 공백 없는 A+B -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int ab = sc.nextInt(); int a = ab / 10; int b = ab % 10; if (a > 10){ a = ab / 100; b = ab % 100; } System.out.println(a + b); } } 2022. 4. 17. [백준/Java] 15963번 CASIO -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long m = sc.nextLong(); if (n == m) { System.out.println(1); } else { System.out.println(0); } } } 2022. 4. 17. [백준/Java] 15680번 연세대학교 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n == 0) { System.out.println("YONSEI"); } else { System.out.println("Leading the Way to the Future"); } } } 2022. 4. 17. 이전 1 ··· 3 4 5 6 7 8 9 ··· 23 다음