Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().strip().split()))
L_sort = L.sort()
count = 0
for i in range(N-2):
	for j in range(i+1 , N):
		for k in range(j+1 , N):
        		if L_sort[i] + L_sort[j] > L_sort[k]:
            			count += 1
                	else:
                		k += 1
print(count)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))

L.sort()
count = 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] or L[j] == L[k] or L[k] == L[i]:
                continue
            if L[i] + L[j] > L[k]:
                count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().strip().split()))
L_sort = L.sort()
count = 0
for i in range(N-2):
	for j in range(i+1 , N):
		for k in range(j+1 , N):
        		if L_sort[i] + L_sort[j] > L_sort[k]:
            			count += 1
                else:
                	k += 1
print(count)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))

L.sort()
count = 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] or L[j] == L[k] or L[k] == L[i]:
                continue
            if L[i] + L[j] > L[k]:
                count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().strip().split()))
L_sort = L.sort()
count = 0
for i in range(N-2):
	for j in range(i+1 , N):
		for k in range(j+1 , N):
        		if L_sort[i] + L_sort[j] > L_sort[k]:
            			count += 1
print(count)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))

L.sort()
count = 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] or L[j] == L[k] or L[k] == L[i]:
                continue
            if L[i] + L[j] > L[k]:
                count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().strip().split()))
L_sort = L.sort()
count = 0
for i in range(N-2):
	for j in range(i+1 , N):
		for k in range(j+1 , N):
        	if L_sort(i) + L_sort(j) > L_sort(k):
            	count += 1
print(count)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))

L.sort()
count = 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] or L[j] == L[k] or L[k] == L[i]:
                continue
            if L[i] + L[j] > L[k]:
                count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().strip().split()))
L_sort = L.sort()
count = 0
for i in range(N-2):
	for j in range(i+1 , N):
    	for k in range(j+1 , N):
        	if L_sort(i) + L_sort(j) > L_sort(k):
            	count += 1
print(count)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))

L.sort()
count = 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] or L[j] == L[k] or L[k] == L[i]:
                continue
            if L[i] + L[j] > L[k]:
                count += 1

print(count)