#101Easy
Row sums
Time: 1 s · Memory: 256 MB
- Matrices
Statement
You are given an matrix. Find the sum of the elements of each row.
Input format
The first line contains and (). Each of the next lines contains integers ().
Output format
lines: the -th line contains the sum of row .
Examples
Input
3 3 1 2 3 4 5 6 7 8 9
Output
6 15 24
Input
2 2 -1 1 5 -9
Output
0 -4
Note
You do not have to store the whole matrix: read a row and print its sum right away. The sum reaches — long long / int64.
