题解 | #最高身高#
最高身高
https://www.nowcoder.com/practice/258fe0c567ac493f9b7bc9d3669d158d
#include <stdio.h> #define N 10 #define M 10 int main() { int n = 0; int m = 0; while (2 == scanf("%d %d", &n, &m)) { int max = -1; int arr[N][M] = {0}; // 记录最大数的行号 int k = 0; // 记录最大数的列号 int l = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { scanf("%d", *(arr + i) + j); if (max < arr[i][j]) { max = arr[i][j]; k = i; l = j; } } } printf("%d %d\n", k + 1, l + 1); } return 0; }