Skip to content

Commit ecee7b5

Browse files
committed
[D1] Title: 중간값 찾기, Time: 75 ms, Memory: 25,216 KB -BaekjoonHub
1 parent 007ed91 commit ecee7b5

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# [D1] 중간값 찾기 - 2063
2+
3+
[문제 링크](https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QPsXKA2UDFAUq)
4+
5+
### 성능 요약
6+
7+
메모리: 25,216 KB, 시간: 75 ms, 코드길이: 543 Bytes
8+
9+
### 제출 일자
10+
11+
2025-09-25 16:32
12+
13+
14+
15+
> 출처: SW Expert Academy, https://swexpertacademy.com/main/code/problem/problemList.do
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import java.io.*;
2+
import java.util.*;
3+
4+
class Solution
5+
{
6+
public static void main(String args[]) throws Exception
7+
{
8+
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
9+
int N = Integer.parseInt(br.readLine());
10+
int[] arr = new int[N];
11+
12+
StringTokenizer st = new StringTokenizer(br.readLine());
13+
for(int i=0; i<N; i++){
14+
int score = Integer.parseInt(st.nextToken());
15+
arr[i] = score;
16+
}
17+
Arrays.sort(arr);
18+
System.out.println(arr[N/2]);
19+
}
20+
}

0 commit comments

Comments
 (0)