LearnPy Hub
← Input problems
Hard

Grid Input

Read r and c, then r lines of c integers each. Print the sum of every row on one line, separated by spaces.

Input

r c, then r lines.

Output

r sums.

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
Grid Input · Python practice problem · LearnPy Hub