본문 바로가기

Beakjoon&프로그래머스/Java139

[백준/Java] 24086번 Affischutskicket -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] paper = {229 * 324, 297 * 420, 210 * 297}; int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); double answer = ((paper[0] * a + paper[1] * b) * 2 + paper[2] * c) * 1e-6; System.out.println(String.format("%.6f", answer)); } } 2022. 4. 15.
[백준/Java] 24086번 身長 (Height) -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); System.out.println(b - a); } } 2022. 4. 15.
[백준/Java] 24082번立方体 (Cube) -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); System.out.println((int) Math.pow(n, 3)); } } 2022. 4. 15.
[백준/Java] 24078번 余り (Remainder) -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); System.out.println(n % 21); } } 2022. 4. 14.
[백준/Java] 23234번 The World Responds -Code public class Main { public static void main(String[] args) { System.out.println("The world says hello!"); } } 2022. 4. 14.
[백준/Java] 22193번 Multiply -Code import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); BigInteger a = scanner.nextBigInteger(); BigInteger b = scanner.nextBigInteger(); System.out.println(a.multiply(b)); } } 2022. 4. 14.