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

#736. Matrix: Sum of the other diagonal

You are given a matrix of integers. **Sum of the other 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
7 6 7 6
-7 -9 -3 -4
0 5 0 -8
-2 -5 9 -9
Output
6
Input
3 3
-4 -1 -2
3 0 7
5 -2 -5
Output
3

💡 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!