You are viewing a single comment's thread. Return to all comments →
Simple Python, using the array a and size n given.
primSum = 0 secSum = 0 #go through the rows for row in xrange(n): primSum += a[row][row] secSum += a[row][n - 1 - row] print abs(primSum - secSum)
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 →
Simple Python, using the array a and size n given.