Run ID:86955

提交时间: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()