File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Author: Minho Kim (ISKU)
3
+ * Date: December 3, 2019
4
+ * E-mail: minho.kim093@gmail.com
5
+ *
6
+ * https://github.com/ISKU/Algorithm
7
+ * https://www.acmicpc.net/problem/18110
8
+ */
9
+
10
+ import java .io .*;
11
+ import java .util .*;
12
+
13
+ public class Main {
14
+ public static void main (String [] args ) throws Exception {
15
+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
16
+ int N = Integer .parseInt (br .readLine ());
17
+ int limit = (int ) Math .round ((N * 15 ) / 100.0 );
18
+
19
+ int [] array = new int [N ];
20
+ for (int i = 0 ; i < N ; i ++)
21
+ array [i ] = Integer .parseInt (br .readLine ());
22
+ Arrays .sort (array );
23
+
24
+ int sum = 0 ;
25
+ for (int i = limit ; i < N - limit ; i ++)
26
+ sum += array [i ];
27
+
28
+ System .out .println ((int ) Math .round (sum / (N - (limit * 2.0 ))));
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments