Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109622 展博 外围元素之和 Python3 Wrong Answer 33 MS 3780 KB 389 2025-02-09 21:36:52

Tests(0/10):


Code:

def main(): r, c = map(int, input().split()) mat = [] for i in range(r): row = list(map(int, input().split())) mat.append(row) s = 0 for num in mat[0]: s += num for num in mat[-1]: s += num for i in range(1, r-1): s += mat[i][0] s += mat[i][-1] print(s) if __name__ == "__main__": main()


Run Info:

------Input------
1 10 9 0 4 4 7 7 9 4 6 4
------Answer-----
54
------Your output-----
108