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
27
28
29
30
31
32
 
public class Main {
    
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        
        int[] list = new int[9];;
        for(int i = 0; i < 9; i++) {
            list[i] = Integer.parseInt(br.readLine());
        }
        
        int max = -100;
        int cnt = 0;
        for(int i = 0; i < 9; i++) {
            if(max < list[i]) {
                max = list[i];
                cnt = i + 1;
            }
        }
        
        bw.write(max + "\n" + cnt);
        bw.flush();
        bw.close();
        
    }
}
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

+ Recent posts