Column sum - MarisaOJ: Marisa Online Judge

Column sum

Time limit: 1000 ms
Memory limit: 256 MB
You are given a 2D array $A$ with $n$ rows and $m$ columns. For each column, calculate its sum. ### Input - The first line contains 2 integers $n, m$. - Next $n$ lines, each line contains $m$ integers of $A$. ### Output - Print $m$ integers, $i^{th}$ integers is the sum of $i^{th}$ column. ### Constraints - $1 \le n, m \le 100$. - $|A_{i,j}| \le 100$. ### Example Input: ``` 3 4 1 -2 3 2 4 -5 9 0 3 3 2 -2 ``` Output: ``` 8 -4 14 0 ```