Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79520 胡海峰老师 求元素在矩阵中的位置 Python3 Accepted 36 MS 3796 KB 307 2024-07-07 14:24:22

Tests(4/4):


Code:

n,x = input().split() n,x = int(n),int(x) a = [ list(map(int,input().split())) for x in range(n)] for i in range(n): f = False for j in range(n): if a[i][j] == x: f = True print(i,j) break if f : break if not f : print(-1)