You are viewing a single comment's thread. Return to all comments →
#!/bin/python import sys ''' n = int(raw_input().strip()) a = [] for a_i in xrange(n): a_temp = map(int,raw_input().strip().split(' ')) a.append(a_temp) z1,z2 = 0,0 for x1 in range(n): z1 += a[x1][x1] for x1 in range(n): z2 += a[x1][n-x1-1] print z1,z2 ''' n = int(input().strip()) dSumLeft = 0 dSumRight = 0 for i in range(n): matrixRow = input().split() dSumLeft += int(matrixRow[i]) dSumRight += int(matrixRow[-(i + 1)]) print dSumLeft-dSumRight
neither my code , nor yours is printing, please point the error
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 →
neither my code , nor yours is printing, please point the error