Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128480 潘允晨 对角线之和 Python3 Wrong Answer 57 MS 3776 KB 251 2025-08-17 09:52:54

Tests(0/10):


Code:

n=int(input()) a=[] for i in range(n): b=input().split() a.append(b) res=0 for i in range(n): for j in range(n): if i==j: res=res+int(a[i][j]) if i+j==n-1: res=res+int(a[i][j]) print(res)


Run Info:

------Input------
5 289 405 453 530 261 553 893 500 893 724 873 313 343 885 933 268 495 115 355 340 729 833 962 654 886
------Answer-----
5144
------Your output-----
5487