Олимпиадный тренинг

Задача 6025. Processing a column in a matrix - 2


Given a two-dimensional array A[N][M] ( 2<=N<=20; M 2<=M<=20).
In the first line, enter the number of rows separated by a space - a number from 0 to N-1, and the number of columns - a number from 0 to M-1.
The second line contains the number s (0<=s<=20)
Next comes the input of array elements line by line
Determine the sum of all elements of the s-th column of the array.

Examples
# Input Output
1 2 2
1
5 5
1 2
7
2 2 3
0
1 5 2
3 4 0
4