728x90
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
int[][] a = new int[9][9];
int max = -1;
int x = 0;
int y = 0;
for(int i=0; i<9; i++) {
st = new StringTokenizer(br.readLine());
for(int j=0; j<9; j++) {
a[i][j] += Integer.parseInt(st.nextToken());
if(max < a[i][j]) {
max = a[i][j];
x = i+1;
y = j+1;
}
}
}
System.out.println(max);
System.out.println(x + " " + y);
}
}
728x90
반응형
'Algorithm > 백준' 카테고리의 다른 글
[알고리즘] 백준 10798 Java (0) | 2023.03.29 |
---|---|
[알고리즘] 백준 2738 JAVA (0) | 2023.03.28 |
[알고리즘] 백준 10808 JAVA (0) | 2022.12.21 |
[알고리즘] 백준 1267 JAVA (0) | 2022.12.20 |
[알고리즘] 백준 10093 JAVA (1) | 2022.12.19 |