You are viewing a single comment's thread. Return to all comments →
The beauty of python:
d1 = sum([a[x][x] for x in range(n)]) d2 = sum([a[x][n-1-x] for x in range (n)]) print(abs(d1-d2))
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 →
The beauty of python: