Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87577 胡海峰老师 对角线之和 Python3 Wrong Answer 36 MS 3768 KB 260 2024-08-10 19:52:50

Tests(0/10):


Code:

n = int(input()) a = [ list(map(int, input().split() )) for x in range(n) ] res = 0 for x in range(n): for y in range(n): if x==y: res = res + a[x][y] if x+y == n-1: res = res + a[x][y] 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