본문 바로가기

자바137

[백준/Java] 5554번 심부름 가는 길 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sum = 0; for(int i = 0; i < 4; i++) { sum += sc.nextInt(); } System.out.println(sum / 60); System.out.println(sum % 60); } } 2022. 4. 11.
[백준/Java] 5522번 카드 게임 -Code import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] arr = new int[5]; for (int i = 0; i < arr.length; i++) { arr[i] = sc.nextInt(); } System.out.println(Arrays.stream(arr).sum()); } } 2022. 4. 11.
[백준/Java] 5339번 콜센터 -Code public class Main { public static void main(String[] args) { System.out.println(" /~\\"); System.out.println(" ( oo|"); System.out.println(" _\\=/_"); System.out.println(" / _ \\"); System.out.println(" //|/.\\|\\\\"); System.out.println(" || \\ / ||"); System.out.println("============"); System.out.println("| |"); System.out.println("| |"); System.out.println("| |"); } } 2022. 4. 11.
[백준/Java] 5338번 마이크로소프트 로고 -Code public class Main { public static void main(String[] args) { System.out.println(" _.-;;-._"); System.out.println("'-..-'| || |"); System.out.println("'-..-'|_.-;;-._|"); System.out.println("'-..-'| || |"); System.out.println("'-..-'|_.-''-._|"); } } 2022. 4. 10.
[백준/Java] 5537번 웰컴 -코드 public class Main { public static void main(String[] args) { System.out.println(". . ."); System.out.println("| | _ | _. _ ._ _ _"); System.out.println("|/\\|(/.|(_.(_)[ | )(/."); } } 2022. 4. 10.
[백준/Java] 3046번 R2 -코드 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int r1 = sc.nextInt(); int s = sc.nextInt(); System.out.println(s * 2 - r1); } } 2022. 4. 10.