题解 | #多组_二维数组_T组形式#
多组_二维数组_T组形式
https://www.nowcoder.com/practice/fe1e902e076b46dd82e7d42e12617893
import sys i = 0 nm_line = 1 def sum2dlist(n): return sum(map(sum,n)) for line in sys.stdin: a = line.split() if i == 0: total = int(a[0]) elif i == nm_line: n,m = map(int,a) nm_line += (n+1) case_list = [] elif i == nm_line-1: list_line = list(map(int,a)) case_list.append(list_line) print(sum2dlist(case_list)) else: list_line = list(map(int,a)) case_list.append(list_line) i+=1