私の解答
n, k = map(int, input().split())
a = [[int(i) for i in input().split()] for _ in range(n)]
for i in range(n):
ans = sum(a[i])
print(ans)
解答例
n, k = map(int, input().split())
a = [[int(i) for i in input().split()] for _ in range(n)]
for i in range(n):
s = 0
for j in range(k):
s += a[i][j]
print(s)