SWEA_2068) 최대수 구하기
SWEA
# D1
2068) 최대수 구하기 (19.10.02)
문제 링크 (SW Expert Academy)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import java.util.*;
import java.io.*;
public class Solution {
public static void main(String args[]) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer tk;
int t = Integer.parseInt(br.readLine());
for(int i=1;i<=t;i++) {
tk = new StringTokenizer(br.readLine());
int max = 0;
for(int j=0;j<10;j++) {
max = Math.max(max, Integer.parseInt(tk.nextToken()));
}
bw.write("#" + i + " " + max+ "\n");
}
bw.flush();
bw.close();
}
}
| cs |
* pre -> nowrap -> normal
댓글
댓글 쓰기