| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72090 | 胡海峰老师 | 矩阵对角线 | Python3 | Presentation Error | 58 MS | 4844 KB | 325 | 2024-04-30 20:44:06 |
#主对角线 i===j ,副对角线 i+j == n-1 (特殊矩阵 :方阵 n行,m列 n==m) n,num = map(int,input().split()) a = [ list(map(int,input().split())) for x in range(n) ] for i in range(n): for j in range(n): if i==j or i+j == n-1: a[i][j] += num for row in a: print(*row)