第4章-20 求矩阵各行元素之和 n, m = input().split() n, m = int(n), int(m) a = [] for i in range(n): s = input() a.append([int(n) for n in s.split()]) for j in range(n): tot = 0 for k in range(m): tot += a[j][k] print(tot)