-
[브론즈 Ⅴ] 6840번 :: Who is in the middle? / Java백준/브론즈 2023. 2. 21. 18:46
문제
https://www.acmicpc.net/problem/6840
6840번: Who is in the middle?
In the story Goldilocks and the Three Bears, each bear had a bowl of porridge to eat while sitting at his/her favourite chair. What the story didn’t tell us is that Goldilocks moved the bowls around on the table, so the bowls were not at the right seats
www.acmicpc.net
코드
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] arr = {scan.nextInt(), scan.nextInt(), scan.nextInt()}; scan.close(); Arrays.sort(arr); System.out.println(arr[1]); } }
'백준 > 브론즈' 카테고리의 다른 글
[브론즈 Ⅴ] 7891번 :: Can you add this? / Java (0) 2023.02.21 [브론즈 Ⅴ] 5597번 :: 과제 안 내신 분..? / Java (0) 2023.02.21 [브론즈 Ⅴ] 5341번 :: Pyramids / Java (0) 2023.02.21 [브론즈 Ⅴ] 4999번 :: 아! / Java (0) 2023.02.21 [브론즈 Ⅴ] 4101번 :: 크냐? / Java (0) 2023.02.21