#K45592. Minimum Matrix Sum
Minimum Matrix Sum
Minimum Matrix Sum
Given a matrix of dimensions (n) (\times) (m), compute the minimum possible sum of the matrix after performing the specified operations. In this problem, the allowed operations have no effect on the overall sum, so the answer is simply the sum of all the matrix elements.
Note that the input contains (n) rows and (m) columns, with each row containing (m) space-separated integers.
inputFormat
The input is provided via standard input (stdin). The first line contains two integers (n) and (m), representing the number of rows and columns respectively. The following (n) lines each contain (m) space-separated integers representing the elements of the matrix.
outputFormat
Output a single integer representing the sum of all the elements in the matrix to the standard output (stdout).## sample
3 3
1 2 3
4 5 6
7 8 9
45
</p>