An $n \times m$ matrix of integers is given. Print the sum of all values, the maximum, and the minimum, one per line.
Input
Line 1: $n$ $m$. Next $n$ lines: the matrix ($1 \le n, m \le 10$).
Output
Print the total sum, the max, then the min.
Example 1
Input
2 3 3 1 4 1 5 9
Output
23 9 1
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.