CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #748 #750 →

#749. Matrix: Sum of the lower triangle (with the diagonal)

You are given a matrix of integers. **Sum of the lower triangle (with the diagonal)**. ### Input The first line has n n, each of the next n lines has n integers (a square matrix). ### Output The answer.

Examples

Input
4 4
3 -7 -9 6
-8 -7 6 1
-6 6 -1 -7
-9 6 -7 7
Output
-16
Input
3 3
9 7 7
-9 7 0
-5 6 1
Output
9

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!