| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 86955 | 丁俊杰 | 矩阵对角线 | Python3 | Accepted | 58 MS | 4684 KB | 447 | 2024-07-31 01:35:54 |
n,m=map(int,input().split()) results=[] for x in range(n): a=list(map(int,input().split())) results.append(a) for row in range(n): #把行固定下来 for col in range(n): #把列固定下来 if row==col or row+col==n-1: #如果行号等于列号(主对角线)或者是行号加列号为(副对角线) results[row][col]+=m print("{:5}".format(results[row][col]),end="") print()