https://www.acmicpc.net/problem/2566
나의 풀이
int[,] array = new int[9, 9];
int max = int.MinValue;
int row = 0;
int col = 0;
for (int i = 0; i < 9; i++)
{
string[] input = Console.ReadLine().Split();
for (int j = 0; j < 9; j++)
{
array[i, j] = int.Parse(input[j]);
if(array[i, j] > max)
{
max = array[i, j];
row = i + 1;
col = j + 1;
}
}
}
Console.WriteLine(max);
Console.WriteLine($"{row} {col}");'알고리즘 문제(백준) > C#' 카테고리의 다른 글
| [백준] 1546번 평균 (0) | 2025.09.02 |
|---|---|
| [백준] 10811번 바구니 뒤집기 (0) | 2025.09.02 |
| [백준] 3052번 나머지 (0) | 2025.09.02 |
| [백준] 10810번 공 바꾸기 (2) | 2025.08.26 |
| [백준] 10810번 공 넣기 (0) | 2025.08.25 |