Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86954 丁俊杰 矩阵对角线 Python3 Presentation Error 60 MS 4584 KB 317 2024-07-31 01:33:41

Tests(0/10):


Code:

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()