Beakjoon&프로그래머스/Java139 [백준/Java] 21300번 Bottle Return -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int sum = 0; for(int i = 0; i < 6; i++){ sum += scanner.nextInt() * 5; } System.out.println(sum); } } 2022. 4. 14. [백준/Java] 20492번 세금 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int money = scanner.nextInt(); int r1 = (int) (money - (money * 0.22)); int r2 = (int) (money * 0.8 + ((money * 0.2) - (money * 0.2) * 0.22)); System.out.println(String.format("%d %d", r1, r2)); } } 2022. 4. 14. [백준/Java] 20254번 Site Score -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] score = {56, 24, 14, 6}; int answer = 0; for (int i = 0; i < 4; i++){ int cnt = scanner.nextInt(); answer += cnt * score[i]; } System.out.println(answer); } } 2022. 4. 14. [백준/Java] 18301번 Rats -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n1 = scanner.nextInt(); int n2 = scanner.nextInt(); int n3 = scanner.nextInt(); System.out.println((n1 + 1) * (n2 + 1) / (n3 + 1) - 1); } } 2022. 4. 14. [백준/Java] 18108번 1998년생인 내가 태국에서는 2541년생?! -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int year = scanner.nextInt(); System.out.println(year - 543); } } 2022. 4. 14. [백준/Java] 18096번 Арифметическая магия -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(1); } } 2022. 4. 14. 이전 1 ··· 11 12 13 14 15 16 17 ··· 24 다음