Max sum column (Contest)
Max sum column easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Max sum column easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
Given a matrix of size M*N, your task is to find the column having the maximum sum and print the sum. Input The first line of input contains two space-separated integers M and N. The following M lines of input contain N space-separated integers each depicting the values of the matrix.
Constraints:- 1 <= M, N <= 100 1 <= Matrix[][] <= 100000 Output Print the maximum sum. Example Sample Input:- 3 3 1 2 3 4 5 6 7 8 9
Sample Output:- 18
Explanation:- 1 + 4 + 7 = 12 2 + 5 + 8 = 15 3 + 6 + 9 = 18 maximum = 18
Sample Input:- 3 2 1 4 9 6 9 1
Sample Output:- 19
link: