eolymp
bolt
Try our new interface for solving problems
Problems

Sum of positive in matrix

Sum of positive in matrix

Matrix of size $n \cdot n$ is given. Find the sum of its positive elements. \InputFile First line contains number $n~(1 \le n \le 100)$. Next lines contains the $n \cdot n$ matrix. All numbers in the matrix are no more than $100$ by absolute value. \OutputFile Print the sum of positive numbers in the matrix.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
4 -2 5
1 -4 -12
0 1 -3
Output example #1
11