int input ost 80 ost50 80 kpar for in range int input 80 y1 80 80 if 5

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
N = int(input())
ost = [0]*80
ost50 = [0]*80
kpar = 0
for i in range(N):
x = int(input())
y = x%80; y1 = (80 - y)%80
if x > 50:
kpar += ost[y1] + ost50[y1]
ost50[y] += 1
else:
kpar += ost50[y1]
ost[y] += 1
print(kpar)