Buggy python submission (verdict: Runtime Error):
N=int(input())
l=[]
c=0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if (l[j]==l[k] or l[k]==l[m] or l[j]==l[m]):
        continue
      if ((l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k])):
        c += 1

print(c)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)

Buggy python submission (verdict: Runtime Error):
N=int(input())
l=[]
c=0

for i in range(N):
	a = int(input())
	l.append(a)

for j in range(N):
  	for k in range(j+1,N):
    	for m in range(k+1,N):
      		if l[j]==l[k] or l[k]==l[m] or l[j]==l[m]:
        		continue
      		if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        		c += 1

print(c)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if l[j]==l[k] or l[k]==l[m] or l[j]==l[m]:
        continue
      if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        c += 1

print(c)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(N):
  a = int(input())
  l.append(a)

for j in range(N):
  for k in range(j+1,N):
    for m in range(k+1,N):
      if (l[j] + l[k] > l[m]) and (l[k] + l[m] > l[j]) and (l[j] + l[m] > l[k]):
        c += 1

print(c)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
c = 0

for i in range(1,N+1):
  a = int(input())
  l.append(a)

for j in range(1,N+1):
  for k in range(1,N+1):
    if j == k:
      continue
    for m in range(1,N+1):
      if (j == m) or (k == m):
        continue
      if (l[j] + l[k] > l[m]) or (l[j] + k[m] > l[k]) or (l[k] + l[m] > l[j]):
        c += 1

print(c)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))
c = 0
 
for i in range(N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i]:
        if L[i] + L[j] + L[k] > 2 * max(L[i],L[j],L[k]):
          c +=1
 
print(c)