-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboj_2693.java
More file actions
26 lines (23 loc) · 815 Bytes
/
boj_2693.java
File metadata and controls
26 lines (23 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package sorting;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class boj_2693 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < t; i++) {
int[] arr = new int[10];
StringTokenizer st = new StringTokenizer(br.readLine());
for (int j = 0; j < 10; j++) {
arr[j] = Integer.parseInt(st.nextToken());
}
Arrays.sort(arr);
sb.append(arr[7] + "\n");
}
System.out.print(sb);
}
}