LearnPy Hub
← Input problems
Medium

Read a Grid and Sum Rows

Read r and c, then r lines of c integers. Print the sum of each row on its own line.

Input

r and c on one line, then the grid.

Output

r lines.

Sample 1

Input
2 3
1 2 3
4 5 6
Output
6
15

Sample 2

Input
1 1
7
Output
7
solution.py
Output appears here
Read a Grid and Sum Rows · Python practice problem · LearnPy Hub