Solve problem "Maximum" online - Learn Python 3 - Snakify

Problem «Maximum» (Easy)


Statement

Given two integers representing the rows and columns \( \left ( m \times n \right ) \), and subsequent \( m \) rows of \( n \) elements, find the index position of the maximum element and print two numbers representing the index \( \left ( i \times j \right ) \) or the row number and the column number. If there exist multiple such elements in different rows, print the one with smaller row number. If there multiple such elements occur on the same row, output the smallest column number.

In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
3 4
0 3 2 4
2 3 5 5
5 1 2 3
1 2
1 1
1
0 0
3 5
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
2 4
6 1
1
2
3
2
1
2
2 0
1 6
1 2 3 3 2 1
0 2
3 5
1 4 5 2 7
3 4 8 0 8
8 8 8 8 8
1 2
2 2
-3 -2
-2 -1
1 1
2 2
-1000000003 -1000000002
-1000000002 -1000000001
1 1