You are viewing a single comment's thread. Return to all comments →
try this
#!/bin/python import sys n = int(raw_input().strip()) dSumLeft = 0 dSumRight = 0 for i in range(n): matrixRow = map(int,raw_input().strip().split(' ')) dSumLeft += int(matrixRow[i]) dSumRight += int(matrixRow[n-i-1]) print abs(dSumLeft - dSumRight)
Seems like cookies are disabled on this browser, please enable them to open this website
Diagonal Difference
You are viewing a single comment's thread. Return to all comments →
try this