You are viewing a single comment's thread. Return to all comments →
a = 0 b = 0 for i in range(n): for j in range(n): if i == j : a += c[i][j] if i+j == n-1 : b += c[i][j] return abs(a-b)
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 →