int input int for in input split for in range for in range for in rang

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
a = int(input())
n = 0
c = 0
A = [[int(j) for j in input().split()] for i in range(a)]
for i in range(a):
for j in range(a):
if (A[i][j] != 0):
if (A[i][j]==A[j][i]):
A[j][i]=0
n+=1
else:
c+=1
print(c)
print(n)