qyliang/CodeNanoFix huggingface dataset:
Buggy code:
#! env/bin/local python3
# -*- coding: utf-8 -*-

from itertools import combinations


def is_tri(_a, _b, _c):
    if _a + _b > _c and _b + _c > _a and _c + _a > _b:
        return True
    else:
        return False


n = int(input())
sticks = list(map(int, input().split()))

h = combinations(sticks, 3)

counter = 0
for a, b, c in h:
    if is_tri(a, b, c):
        if a != b and b != c and a != c:
            print(a, b, c)
            counter += 1

print(counter)


Fixed code:
#! env/bin/local python3
# -*- coding: utf-8 -*-

from itertools import combinations


def is_tri(_a, _b, _c):
    if (_a + _b > _c) and (_b + _c > _a) and (_c + _a > _b):
        return True
    else:
        return False


n = int(input())
sticks = list(map(int, input().split()))

h = combinations(sticks, 3)

counter = 0
for a, b, c in h:
    if is_tri(a, b, c):
        a, b, c = sorted([a, b, c])
        if (a != b) and (b != c):
            counter += 1

print(counter)
Buggy code:
import itertools
N = int(input())
L = list(map(int, input().strip().split()))
print(L);
set_L = list(set(L));
print(set_L);
t_count = 0;
three_numbers = list(itertools.combinations(set_L, 3))
print(three_numbers)

for i in range(len(three_numbers)):
    three_number = three_numbers[i];
    print(three_number)
    li = three_number[0]
    lj = three_number[1]
    lk = three_number[2]
    print(li);
    print(lj);
    print(lk);

    if li == lj:
        continue;
    elif li == lk:
        continue;
    elif lj == lk:
        continue;

    if li+lj <= lk:
        continue;
    elif li+lk <= lj:
        continue;
    elif lj+lk <= li:
        continue;
    t_count+=1;
            
print(t_count);

Fixed code:
import itertools
N = int(input())
L = list(map(int, input().strip().split()))
#print(L);
t_count = 0;
three_numbers = list(itertools.combinations(L, 3))
#print(three_numbers)

for i in range(len(three_numbers)):
    three_number = three_numbers[i];
    #print(three_number)
    li = three_number[0]
    lj = three_number[1]
    lk = three_number[2]
    #print(li);
    #print(lj);
    #print(lk);

    if li == lj:
        continue;
    elif li == lk:
        continue;
    elif lj == lk:
        continue;

    if li+lj <= lk:
        continue;
    elif li+lk <= lj:
        continue;
    elif lj+lk <= li:
        continue;
    t_count+=1;
            
print(t_count);
Buggy code:
n = int(input())
lst = list(map(int,input().split()))
ans = 0
for i in range (n - 2):
  for j in range (i + 1, n - 1):
    for k in range (j + 1, n):
      lst2 = [lst[i], lst[j], lst[k]]
      if (lst2[0] < lst2[1] + lst2[2] and lst2[1] < lst2[0] + lst2[2] and lst2[2] < lst2[0] + lst2[1]):
        ans = ans + 1
print(ans)


Fixed code:
n = int(input())
lst = list(map(int,input().split()))
ans = 0
for i in range (n - 2):
  for j in range (i + 1, n - 1):
    for k in range (j + 1, n):
      lst2 = [lst[i], lst[j], lst[k]]
      if (lst2[0] != lst2[1] and lst2[0] != lst2[2] and lst2[1] != lst2[2]):
        if (lst2[0] < lst2[1] + lst2[2] and lst2[1] < lst2[0] + lst2[2] and lst2[2] < lst2[0] + lst2[1]):
          ans = ans + 1
print(ans)
Buggy code:
import itertools
n=int(input())
length=list(map(int,input().split()))
combination=list(itertools.combinations(length,3))
new_list=[]
for com in combination:
    a=com[0]
    b=com[1]
    c=com[2]
    if a!=b and b!=c:
        if com[0]+com[1]>com[2] and com[1]+com[2]>com[0] and com[0]+com[2]>com[1]:
            new_list.append(com)
        else:
            continue
print(len(new_list))

Fixed code:
import itertools
n=int(input())
length=list(map(int,input().split()))
combination=list(itertools.combinations(length,3))
new_list=[]
for com in combination:
    a=com[0]
    b=com[1]
    c=com[2]
    if a!=b and b!=c and a!=c:
        if com[0]+com[1]>com[2] and com[1]+com[2]>com[0] and com[0]+com[2]>com[1]:
            new_list.append(com)
        else:
            continue
print(len(new_list))
Buggy code:
n = int(input())

l = list(map(int,input().split()))

l.sort()

ans = 0
if n <3:
  print(0)
else:
  for i in range(n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if l[i] + l[j] > l[k]:
          ans += 1
  print(ans)

Fixed code:
n = int(input())

l = list(map(int,input().split()))

l.sort()
ans = 0

if n < 2:
  print(0)
else:
  for i in range(n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if l[i] + l[j] > l[k] and l[i] < l[j] < l[k]:
          ans += 1
  print(ans)
Buggy code:
import itertools

n = int(input())
l = list(map(int, input().split()))
cnt = 0
for a, b, c in itertools.combinations(l, 3) :
    if max([a, b, c]) < (sum([a, b, c]) - max([a, b, c])) :
        if len([a, b, c]) == len(set([a, b, c])) :
            print(a, b, c)
            cnt += 1
print(cnt)

Fixed code:
import itertools

n = int(input())
l = list(map(int, input().split()))
cnt = 0
for a, b, c in itertools.combinations(l, 3) :
    if max([a, b, c]) < (sum([a, b, c]) - max([a, b, c])) :
        if len([a, b, c]) == len(set([a, b, c])) :
            cnt += 1
print(cnt)
Buggy code:
# coding: utf-8
# Your code here!

N = input()
L = input().split(' ')

l = len(L)
L = [int(s) for s in L]
L.sort()
if len(L) < 3:
    print(0)
    exit
  
a = 0
for i in range(l - 2):
    for j in range(i + 1, l - 1):
        for k in range(j + 1, l):
            if (L[i] + L[j]) > L[k]:
                if (L[i] != L[j]) and (L[k] != L[j]) and (L[i] != L[k]):
                    a += 1
print(int(a))

Fixed code:
# coding: utf-8
# Your code here!

N = input()
L = input().split(' ')

l = len(L)
L = [int(s) for s in L]
L.sort()
  
a = 0
for i in range(l - 2):
    for j in range(i + 1, l - 1):
        for k in range(j + 1, l):
            if (L[i] + L[j]) > L[k]:
                if (L[i] != L[j]) and (L[k] != L[j]) and (L[i] != L[k]):
                    a += 1
print(int(a))
Buggy code:
n = int(input())
nums = sorted(list(map(int, input().split())))
res = 0
for i in range(0, n - 2):
	for j in range(i, n - 1):
		for k in range(j, n):
			if arr[i] + arr[j] > arr[k] and arr[i] != arr[j] and arr[j] != arr[k] and arr[i != arr[k]:
 				res += 1
print(res)

Fixed code:
n = int(input())
arr = sorted(list(map(int, input().split())))
res = 0
for i in range(0, n - 2):
	for j in range(i, n - 1):
		for k in range(j, n):
			if arr[i] + arr[j] > arr[k] and arr[i] != arr[j] and arr[j] != arr[k] and arr[i] != arr[k]:
 				res += 1
print(res)
Buggy code:
import itertools
n = int(input())
l = (list(map(int,input().split())))


ans = 0
if len(l) < 3:
    print(0)
else:
    prelst = list(itertools.combinations(l,3))

    for lst in prelst:
        lst = sorted(lst)
        if lst[0] + lst[1] > lst[2] and lst[0] != lst[1] != lst[2]:
            ans += 1

print(ans)

Fixed code:
import itertools
n = int(input())
l = (list(map(int,input().split())))


ans = 0
if len(l) < 3:
    print(0)
else:
    prelst = list(itertools.combinations(l,3))

    for lst in prelst:
        lst = sorted(lst)
        if lst[0] + lst[1] > lst[2] and lst[0] != lst[1] != lst[2]:
            ans += 1
    print(ans)
Buggy code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
a=0
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if A[i]+A[j]>A[k] and A[i]+A[k]>A[j] and A[k]+A[j]>A[i]:
                a+=1
print(a)

Fixed code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
a=0
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if A[i]+A[j]>A[k] and A[i]+A[k]>A[j] and A[k]+A[j]>A[i] and A[i]!=A[j] and A[k]!=A[j] and A[i]!=A[k]:
                a+=1
print(a)
Buggy code:
import sys
n = int(input())
l = list(map(int,input().split()))
counter = 0
if n < 3:
    print(0)
    sys.exit(0)
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            data0 = l[i]
            data1 = l[j]
            data2 = l[k]
            if (data0 != data1) and (data0 != data2) and (data1 != data2):
                if (data0 + data1 + data2 - max(data0,data1,data2)*2) > 0:
                    print(str(i+1) + ' ' + str(j+1) + ' ' + str(k+1))
                    counter += 1    
print(counter)

Fixed code:
import sys
n = int(input())
l = list(map(int,input().split()))
counter = 0
if n < 3:
    print(0)
    sys.exit(0)
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            data0 = l[i]
            data1 = l[j]
            data2 = l[k]
            if (data0 != data1) and (data0 != data2) and (data1 != data2):
                if (data0 + data1 + data2 - max(data0,data1,data2)*2) > 0:
                    counter += 1    
print(counter)
Buggy code:
N = int(input())
LL = list(map(int,input().split()))
cnt = 0
L = list(set(LL))
for i in range(len(L)-2):
    for j in range(1, len(L)-1-i):
        for k in range(1, len(L)-i-j):
#             print(L)
#             print(L[i],L[i+j],L[i+j+k])
            if L[i] + L[i+j] > L[i+j+k]:
#                 print("------------")
#                 print(L[i],L[i+j],L[i+j+k])
#                 print(LL.count(L[i]),LL.count(L[i+j]),LL.count(L[i+j+k]))
                cnt += LL.count(L[i])*LL.count(L[i+j])*LL.count(L[i+j+k])
                
print(cnt) 

Fixed code:
N = int(input())
LL = list(map(int,input().split()))
cnt = 0
L = sorted(list(set(LL)))
for i in range(len(L)-2):
    for j in range(1, len(L)-1-i):
        for k in range(1, len(L)-i-j):
#             print(L)
#             print(L[i],L[i+j],L[i+j+k])
            if L[i] + L[i+j] > L[i+j+k] and L[i+j] - L[i] < L[i+j+k]:
#                 print("------------")
#                 print(L[i],L[i+j],L[i+j+k])
#                 print(LL.count(L[i]),LL.count(L[i+j]),LL.count(L[i+j+k]))
                cnt += LL.count(L[i])*LL.count(L[i+j])*LL.count(L[i+j+k])
                
print(cnt)
Buggy code:
n = int(input())
l = list(map(int,input().split()))
 
ans = 0
 
for i in range(n):
  for j in range(n):
    for k in range(n):
      if l[i] == l[j] and l[j] == l[k] and l[i] == l[k]:
        coutinue
      if (l[i]+l[j]>l[k]) and (l[j]+l[k]>l[i]) and (l[i]+l[k]>l[j]):
        ans += 1
        
print(ans)


Fixed code:
n = int(input())
l = list(map(int,input().split()))
 
ans = 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[i] != l[k]:
        if l[i]+l[j]>l[k] and l[j]+l[k]>l[i] and l[i]+l[k]>l[j]:
          ans += 1
        
print(ans)
Buggy code:
n = int(input())
l = list(map(int, input().split()))
ans = 0
l.sort()
for i in range(0, n-2):
  for j in range(1, n-1):
    for k in range(2, n):
      if l[i] < l[j] and l[j] < l[k]:
        if l[i] + l[j] > l[k]:
          print(l[i], l[j], l[k])
          ans += 1

print(ans)

Fixed code:
n=int(input())
l=list(map(int,input().split()))
l.sort()
n=len(l)
ans=0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            if l[i]!=l[j] and l[j]!=l[k] and l[i]+l[j]>l[k]:
                ans+=1

print(ans)
Buggy code:
n=int(input())
l=list(map(int,input().split())
c=0
for i in range(1,N):
       for j in range(i,N):
       		for k in range(j,N):
       			if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]:
       				if l[i]+l[j]>l[k] and l[j]+l[k]>l[i] and l[i]+l[k]>l[j]:
       							c=c+1
print(c)

Fixed code:
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(0,n):
      for j in range(i,n):
       		for k in range(j,n):
       				if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]:
       						if l[i]+l[j]>l[k] and l[k]+l[j]>l[i] and l[i]+l[k]>l[j]:
       										c=c+1
print(c)
Buggy code:
N = int(input())
h = list(map(int,input().split()))

l = list(set(h))
a = []
for i in range(len(l)):
    a.append(h.count(l[i]))
ans = 0
for i in range(len(l)):
    for j in range(i+1, len(l)):
        for k in range(j +1, len(l)):
            if l[i] + l[j] > l[k]:
                ans += a[i] * a[j] * a[k]
print(ans)

Fixed code:
N = int(input())
h = list(map(int,input().split()))

l = list(set(h))
l.sort()
a = []
for i in range(len(l)):
    a.append(h.count(l[i]))
ans = 0
for i in range(len(l)):
    for j in range(i+1, len(l)):
        for k in range(j +1, len(l)):
            if l[i] + l[j] > l[k]:
                ans += a[i] * a[j] * a[k]
print(ans)
Buggy code:
import collections

n=int(input())
l=list(map(int,input().split()))
c=collections.Counter(l)

c=sorted(c.items(),key=lambda x:x[0])

item=[]
num=[]

for i,n in c:
    item.append(i)
    num.append(n)
    
count=0

if n<3:
    print(0)
else:
    for i in range(len(item)-2):
        for j in range(i+1,len(item)-1):
            k=j+1
            sumij=item[i]+item[j]
            mulij=num[i]*num[j]
            while k<len(item) and item[k]<sumij:
                count+=mulij*num[k]
                k+=1
    print(count)

Fixed code:
import collections

N=int(input())
l=list(map(int,input().split()))
c=collections.Counter(l)

c=sorted(c.items(),key=lambda x:x[0])

item=[]
num=[]

for i,n in c:
    item.append(i)
    num.append(n)
    
count=0

if N<3:
    print(0)
else:
    for i in range(len(item)-2):
        for j in range(i+1,len(item)-1):
            k=j+1
            sumij=item[i]+item[j]
            mulij=num[i]*num[j]
            while k<len(item) and item[k]<sumij:
                count+=mulij*num[k]
                k+=1
    print(count)
Buggy code:
from itertools import combinations

N, *L = map(int, open(0).read().split())

result = 0
for a, b, c in combinations(set(L), 3):
    if a + b > c and b + c > a and c + a > b:
        result += 1
print(result)


Fixed code:
from itertools import combinations

N, *L = map(int, open(0).read().split())

result = 0
for a, b, c in combinations(L, 3):
    if a == b or b == c or c == a:
        continue
    if a + b > c and b + c > a and c + a > b:
        result += 1
print(result)
Buggy code:
import itertools

n = int(input())
l = list(map(int, input().split()))

cnt = 0
for v in itertools.combinations(l, 3):
    t = set(v)
    print(v)
    if len(t) == len(v) and (abs(v[0] - v[1]) < v[2] < v[0] + v[1]):
        cnt += 1
print(cnt)

Fixed code:
import itertools

n = int(input())
l = list(map(int, input().split()))

cnt = 0
for v in itertools.combinations(l, 3):
    t = set(v)
    if len(t) == len(v) and (abs(v[0] - v[1]) < v[2] < v[0] + v[1]):
        cnt += 1
print(cnt)
Buggy code:
import itertools

n=int(input())
a=list(map(int,input().split()))

count=0

for x in itertools.combinations(a, 3):
  if(x[0]+x[1]>x[2] and x[0]+x[2]>x[1] and x[1]+x[2]>x[0]):
    count+=1
  else:
    pass
    
print(count)

Fixed code:
import itertools

n=int(input())
a=list(map(int,input().split()))

count=0
y=[]

for x in itertools.combinations(a, 3):
  if (x[0]==x[1] or x[0]==x[2] or x[1]==x[2]):
    pass
  else:
    if(x[0]+x[1]>x[2] and x[0]+x[2]>x[1] and x[1]+x[2]>x[0]):
      count+=1
    else:
      pass

print(count)
Buggy code:
import sys
input = sys.stdin.readline

n = int(input())
li = list(map(int,input().split()))
li.sort()
print(li)
count = 0
for i in range(n-1):
    for j in range(i+1,n-1):
        if li[i] == li[j]:
            continue
        else:
            count += len([k for k in li[j+1:] if k < (li[i] + li[j]) and k != li[i] and k != li[j]])
print(count)

Fixed code:
import sys
input = sys.stdin.readline

n = int(input())
li = list(map(int,input().split()))
li.sort()
count = 0
for i in range(n-1):
    for j in range(i+1,n-1):
        if li[i] == li[j]:
            continue
        else:
            count += len([k for k in li[j+1:] if k < (li[i] + li[j]) and k != li[i] and k != li[j]])
print(count)
Buggy code:
N = int(input())
hen = list(map(int, input().split()))

kosu = 0

if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

print(kosu)

Fixed code:
N = int(input())
hen = list(map(int, input().split()))

kosu = 0

if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

    print(kosu)
Buggy code:
from itertools import combinations

data1 = input()
data2 = [int(i) for i in input().split(" ")]

count = 0
for d1, d2, d3 in combinations(data2, 3):
  if d1 == d2 or d2 == d3 or d1 == d3:
    continue
  if d1 + d2 <= d3 or d1 + d3 <= d2 or d2 + d3 <= d3:
    continue
  count += 1

print(count)
    

Fixed code:
from itertools import combinations

data1 = input()
data2 = [int(i) for i in input().split(" ")]

count = 0
if len(data2) >= 3:
  for d1, d2, d3 in combinations(data2, 3):
    if d1 == d2 or d2 == d3 or d1 == d3:
      continue
    if d1 + d2 <= d3 or d1 + d3 <= d2 or d2 + d3 <= d1:
      continue
    count += 1

  print(count)
else:
  print(0)
Buggy code:
n = int(input())
if n < 3:
  print(0)
else:
  s = 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):
        m = max(s[i], s[j], s[k])
        su = s[i] + s[j] + s[k]
        if m < su - m:
          c += 1
  print(c)

Fixed code:
n = int(input())
if n < 3:
  print(0)
else:
  s = 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):
        m = max(s[i], s[j], s[k])
        su = s[i] + s[j] + s[k]
        if m < su - m and s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
          c += 1
  print(c)
Buggy code:
import numpy as np
bars = list(map(int, input().split(" ")))

length = len(bars)

def check_triangle(a, b, c):
    if a == b or b == c or c == a:
        return 0
    if ((a + b) > c) and ((b + c) > a) and ((c + a) > b):
        return 1
    else:
        return 0


count = 0
for i, li in enumerate(bars):
    for k in range(i+1, length):
        res = np.sum([check_triangle(bars[i], bars[k], bars[j]) for j in range(k+1, length)])
        count += int(res)
print(count)

Fixed code:
import numpy as np
N = input()
bars = list(map(int, input().split(" ")))

length = len(bars)

def check_triangle(a, b, c):
    if a == b or b == c or c == a:
        return 0
    if ((a + b) > c) and ((b + c) > a) and ((c + a) > b):
        return 1
    else:
        return 0


count = 0
for i, li in enumerate(bars):
    for k in range(i+1, length):
        res = np.sum([check_triangle(bars[i], bars[k], bars[j]) for j in range(k+1, length)])
        count += int(res)
print(count)
Buggy code:
N = int(input())
L = list(map(int,input().split()))
ans = 0



for i in L:
    for j in L:
        for k in L:
            if i != j and i != k and j != k:
                if i + j > k and i + k > j and j + k > i:
                    if i > j > k:
                        ans += 1
                        print(i,j,k)
                    
print(ans)

Fixed code:
N = int(input())
L = list(map(int,input().split()))
ans = 0



for i in L:
    for j in L:
        for k in L:
            if i != j and i != k and j != k:
                if i + j > k and i + k > j and j + k > i:
                    if i > j > k:
                        ans += 1
                        
                    
print(ans)
Buggy code:
n = int(input())
len = list(map(int, input().split()))

if n == 1 or n == 2:
    print(0)
else:
    ans = 0
    for i in range(n):
        for j in range(i + 1,n):
            for k in range(j+1,n):
                
                if len[i] == len[j] or len[j] == len[k]:
                    continue
                if len[j] - len[i] < len[k] and len[j]  + len[i] > len[k]:
                    ans = ans + 1
                else :
                    continue
    print(ans)


Fixed code:
n = int(input())
len = list(map(int, input().split()))

if n == 1 or n == 2:
    print(0)
else:
    ans = 0
    for i in range(n):
        for j in range(i + 1,n):
            for k in range(j+1,n):
                len.sort()
                if len[i] == len[j] or len[j] == len[k]:
                    continue
                if len[j] - len[i] < len[k] and len[j]  + len[i] > len[k]:
                    ans = ans + 1
                else :
                    continue
    print(ans)
Buggy code:

N = int(input())
nums = list(map(int, input().split()))

set_nums = sorted(list(set(nums)))
set_dup = set_nums.copy()

if N <= 2:
    print(0)
else:
    for i, d in enumerate(set_dup):
        count = 0
        for n in nums:
            if n == d:
                count += 1
        set_dup[i] = count

    count = 0
    for a in range(len(set_nums)):
        for b in range(a+1, len(set_nums)):
            for c in range(b+1, len(set_nums)):
                if set_nums[a] + set_nums[b] > set_nums[c]:
                    print(set_nums[a], set_nums[b], set_nums[c])
                    count += set_dup[a] * set_dup[b] * set_dup[c]
    print(count)


Fixed code:
N = int(input())
nums = list(map(int, input().split()))
 
set_nums = sorted(list(set(nums)))
set_dup = set_nums.copy()
 
if N <= 2:
    print(0)
else:
    for i, d in enumerate(set_dup):
        count = 0
        for n in nums:
            if n == d:
                count += 1
        set_dup[i] = count
 
    count = 0
    for a in range(len(set_nums)):
        for b in range(a+1, len(set_nums)):
            for c in range(b+1, len(set_nums)):
                if set_nums[a] + set_nums[b] > set_nums[c]:
                    count += set_dup[a] * set_dup[b] * set_dup[c]
    print(count)
Buggy code:
n = int(input())
l_list = list(map(int,input().split()))
l_list.sort()
count = 0
for i in range(0, n-2):
    for j in range(i+1, n-1):
        for k in range(j+1, n):
            a = list[i]
            b = list[j]
            c = list[k]
            if a == b or b == c or c == b:
                continue
            if a + b > c:
                count += 1
            else:
                break
print(count)


Fixed code:
n = int(input())
l_list = list(map(int,input().split()))
l_list.sort()
count = 0
for i in range(0, n-2):
    for j in range(i+1, n-1):
        for k in range(j+1, n):
            a = l_list[i]
            b = l_list[j]
            c = l_list[k]
            if a == b or b == c or c == b:
                continue
            if a + b > c:
                count += 1
            else:
                break
print(count)
Buggy code:
import itertools
N = int(input())
L = list(map(int,input().split()))

ans = 0
if len(L) <= 2 :
    print(ans)
else:
    for lists in itertools.combinations(L,3):
        if sum(lists) - max(lists) > max(lists):
            if len(lists) != len(set(lists)):
                continue
            else:
                ans += 1


        else:
            continue

print(ans)

Fixed code:
import itertools
N = int(input())
L = list(map(int,input().split()))

ans = 0
if len(L) <= 2 :
    print(ans)
else:
    for lists in itertools.combinations(L,3):
        if sum(lists) - max(lists) > max(lists):
            if len(lists) != len(set(lists)):
                continue
            else:
                ans += 1


        else:
            continue
    print(ans)