Problem Description

Read r c and then r lines of matrix. Some lines may have less than c numbers. Treat missing cells as 0. Output sum of each column.

Input Format

First line r c. Next r lines (can be short).

Output Format

One line of c sums.

Sample Test Case

Input:
3 4 1 2 3 4 5 6 7
Output:
11 6 5 6

Constraints

r*c

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next