ZhenlongDai/ACPR huggingface dataset:
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = [int(e) for e in input().split()]
c = 0

if len(set(L)) >= 3:
  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] and L[j] != L[k] + L[i] and L[k] != L[i] + L[j]:
            print(i+1, j+1, k+1)
            c += 1
print(c)

Failing test case input:
6
4 5 8 3 3 5

Expected output:
6


Actual output:
1 2 3
1 2 4
1 2 5
1 3 4
1 3 5
1 3 6
1 4 6
1 5 6
8


Fixed submission (verdict: Accepted):
N = int(input())
L = [int(e) for e in input().split()]
c = 0

if len(set(L)) >= 3:
  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[k] != L[i]:
          if L[i] < L[j] + L[k] and L[j] < L[k] + L[i] and L[k] < L[i] + L[j]:
            c += 1
print(c)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))
ijk = 0
for i in range(N):
    for j in range(i,N):
        for k in range(j,N):
            if L[i] != L[j] and L[j] != L[k]:
                if L[i]+L[j]>L[k] and L[j]+L[k]>L[i] and L[k]+L[i]>L[j]:
                    ijk+=1
print(ijk)

Failing test case input:
10
9 4 8 1 9 6 10 6 6 8

Expected output:
48


Actual output:
59


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int,input().split()))
ijk = 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[k]+L[i]>L[j]:
                    ijk+=1
print(ijk)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

import itertools


n = int(input())


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


if (n<3):
  print(0)


count = 0
for data in itertools.combinations(lods, 3):
  if (data[0] != data[1]
      and data[1] != data[2]
      and data[2] != data[0]
      and (data[0]+data[1]) > data[2]
      and (data[1]+data[2]) > data[0]
      and (data[2]+data[0]) > data[1]):
    count += 1

print(count)

Failing test case input:
2
9 0

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):

import itertools


n = int(input())


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


if (n < 3):
  print(0)
  exit()


count = 0
for data in itertools.combinations(lods, 3):
  if (data[0] != data[1]
      and data[1] != data[2]
      and data[2] != data[0]
      and (data[0]+data[1]) > data[2]
      and (data[1]+data[2]) > data[0]
      and (data[2]+data[0]) > data[1]):
    count += 1

print(count)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = map(int, input().split())
L = list(set(L))
L.sort()
ret = 0
N_ = len(L)
if N_ >= 3:
  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]:
          ret += 1
print(ret)

Failing test case input:
10
16 11 18 2 9 6 7 7 7 8

Expected output:
45


Actual output:
25


Fixed submission (verdict: Accepted):
N = int(input())
 
L = list(map(int, input().split()))
L.sort()
ret = 0
if N >= 3:
  for i in range(N - 2):
    for j in range(i + 1, N - 1):
      if L[i] != L[j]:
        for k in range(j + 1, N):
          if L[i] != L[k] and L[j] != L[k] and L[i] + L[j] > L[k]:
            ret += 1
print(ret)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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 i != j and j != k:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
print(ans)

Failing test case input:
5
1 -9 0 2 0

Expected output:
0


Actual output:
14


Fixed submission (verdict: Accepted):
def factorial_cor(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact
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 j != k and k != i:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
              
          
print(ans

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
5
1 -8 0 1 0

Expected output:
0


Actual output:
[-8, 0, 0, 1, 1]
0


Fixed submission (verdict: Accepted):
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)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)


Failing test case input:
5
4 4 9 7 5

Expected output:
5

Actual output:
7


Fixed submission (verdict: Accepted):
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)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))
L.sort()
count = 0
print(L)
for i in range(N):
    for j in range(i,N):
         for k in range(j,N):
            a = L[i]
            b = L[j]
            c = L[k]
            if(a != b and b != c and c != a):
                if (a + b > c and a + c > b and b + c > a):
                    count += 1
print(count)

Failing test case input:
5
4 -1 3 7 5

Expected output:
3


Actual output:
[-1, 3, 4, 5, 7]
3


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int,input().split()))
L.sort()
count = 0
for i in range(N):
    for j in range(i,N):
         for k in range(j,N):
            a = L[i]
            b = L[j]
            c = L[k]
            if(a != b and b != c and c != a):
                if (a + b > c and a + c > b and b + c > a):
                    count += 1
print(count)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = [0 for x in range(n)]
l = list(map(int,input().split()))
l.sort()
cnt = 0
a = 0
b = 0
c = 0
if n < 3:
    print(0)
else:
    for i in range(n-2):
        a = l[i]
        for j in range(i+1,n-1):
            b = l[j]
            for k in range(j+1,n):
                c = l[k]
                if a+b > c and a != b and b != c:
                    cnt += 1
print(cnt)

Failing test case input:
2
13 0

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):
n = int(input())
l = [0 for x in range(n)]
l = list(map(int,input().split()))
l.sort()
cnt = 0
a = 0
b = 0
c = 0
if n < 3:
    print(0)
else:
    for i in range(n-2):
        a = l[i]
        for j in range(i+1,n-1):
            b = l[j]
            for k in range(j+1,n):
                c = l[k]
                if a+b > c and a != b and b != c:
                    cnt += 1
    print(cnt)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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] != L[k]:
                if L[i] + L[j] > L[k] and L[j] + L[k] > L[i] and L[k] + L[i] > L[j]:
                    ans += 1

print(ans)

Failing test case input:
10
9 11 14 2 9 6 7 6 7 8

Expected output:
65


Actual output:
70


Fixed submission (verdict: Accepted):
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[i] != L[k] and L[j] != L[k]:
                if L[i] + L[j] > L[k] and L[j] + L[k] > L[i] and L[k] + L[i] > L[j]:
                    ans += 1

print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from itertools import permutations
N = int(input())
L = list(map(int, input().split()))
ans = 0
for l in permutations(L, 3):
    if set(l) != 3:
        continue
    a = l[0]
    b = l[1]
    c = l[2]
    if a + b > c and b + c > a and c + a > b:
        ans += 1
print(ans)

Failing test case input:
10
16 4 3 1 2 6 7 1 13 8

Expected output:
17


Actual output:
0


Fixed submission (verdict: Accepted):
from itertools import combinations
N = int(input())
L = list(map(int, input().split()))
ans = 0
for l in combinations(L, 3):
    a = l[0]
    b = l[1]
    c = l[2]
    if a == b or b == c or c == a:
        continue
    if a + b > c and b + c > a and c + a > b:
        ans += 1
print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def main():
    counter = 0
    n = int(input())
    l = list(map(int,input().split()))
    l.sort()
    for i in range(n-2):
        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[k] < (l[i] + l[j]):
                    print(l[i],l[j],l[k])
                    counter += 1

    print(counter)




if __name__ == '__main__':
    main()


Failing test case input:
6
4 5 8 3 5 5

Expected output:
6


Actual output:
3 4 5
3 4 5
3 4 5
4 5 8
4 5 8
4 5 8
6


Fixed submission (verdict: Accepted):

def main():
    counter = 0
    n = int(input())
    l = list(map(int,input().split()))
    l.sort()
    for i in range(n-2):
        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[k] < (l[i] + l[j]):
                    
                    counter += 1

    print(counter)




if __name__ == '__main__':
    main()
Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))

if N<=2:
	print(0)
else:
	L.sort()
	cnt=0
	for i in range(len(L)-2):
		for j in range(i+1,len(L)-1):
			for k in range(j+1,len(L)):
				if L[i]!=L[j] & L[j]!=L[k] & L[i]+L[j]>L[k]:
					cnt+=1
	print(cnt)

Failing test case input:
6
1 5 7 11 12 1

Expected output:
3


Actual output:
0


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

if N<=2:
	print(0)
else:
	L.sort()
	cnt=0
	for i in range(len(L)-2):
		for j in range(i+1,len(L)-1):
			for k in range(j+1,len(L)):
				if L[i]!=L[j] and L[j]!=L[k] and L[i]+L[j]>L[k]:
					cnt+=1
	print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = int(input())
list = list(map(int,input().split()))
sorted(list)
count = 0
print(list)
for i in range(len(list)):
    for j in range(len(list)):
        for k in range(len(list)):
            if ( list[i] < list[j] < list[k] ) and ( list[i] + list[j] >  list[k] ):
                count += 1
print(count)

Failing test case input:
5
1 -9 0 2 0

Expected output:
0


Actual output:
[1, -9, 0, 2, 0]
0


Fixed submission (verdict: Accepted):
num = int(input())
list = list(map(int,input().split()))
sorted(list)
count = 0
for i in range(len(list)):
    for j in range(len(list)):
        for k in range(len(list)):
            if ( list[i] < list[j] < list[k] ) and ( list[i] + list[j] >  list[k] ):
                count += 1
print(count)

Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
count=0
if n<3:
  print("0")
else:
  for i in range(n-2):
    for j in range(n-2-i):
      for k in range(n-2-i-j):
        if l[i]<l[1+j]+l[2+k] and l[i]!=l[1+j]!=l[2+k]:
          count+=1
print(count)


Failing test case input:
10
16 4 3 1 2 6 7 1 13 4

Expected output:
12


Actual output:
44


Fixed submission (verdict: Accepted):
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
count=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]+l[k] and l[i]!=l[j]!=l[k]:
        count+=1
print(count)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = 0
L = input().split()
for i in range(N-2): 
    for j in range(i+1, N-1, 1):
        for k in range(j+1, N, 1):
            if i < j < k:
                a = int(L[i])
                b = int(L[j])
                c = int(L[k])
                if a != b:
                    if b != c:
                        if c != a:
                            s += 1
           
print(s)                

Failing test case input:
5
4 -1 0 7 5

Expected output:
1


Actual output:
10


Fixed submission (verdict: Accepted):
N = int(input())
s = 0
L = map(int, input().split())
L = sorted(L)
for i in range(N-2): 
    a = L[i]
    for j in range(i+1, N-1, 1):
        b = L[j]
        for k in range(j+1, N, 1):
            c = L[k]
            if a != b and b != c and c != a:
                if (a + b) > c and (b +c) > a and (c + a) > b:
                    s += 1
print(s)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
if N <3:
    print(0)

for i in range(0, len(L)):
    for j in range(i+1, len(L)):
        for k in range(j+1, len(L)):
            if L[i] != L[j] and L[j] != L[k] and (L[k] < L[i] + L[j]):
                ans += 1
print(ans)

Failing test case input:
2
9 0

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):

N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0

for i in range(0, len(L)):
    for j in range(i+1, len(L)):
        for k in range(j+1, len(L)):
            if L[i] != L[j] and L[j] != L[k] and (L[k] < L[i] + L[j]):
                ans += 1
print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools


S = input()

l = input().split()

i = 0

for v in itertools.combinations(l, 3):
    print(v)
    if v[0] != v[1] and v[1] != v[2] and v[0] != v[2]:
    
        if int(v[0]) + int(v[1]) > int(v[2]) and int(v[1]) + int(v[2]) > int(v[0]) and int(v[0]) + int(v[2]) > int(v[1]) :
            i = i +1

print(i)

Failing test case input:
5
0 -8 1 1 -1

Expected output:
0


Actual output:
('0', '-8', '1')
('0', '-8', '1')
('0', '-8', '-1')
('0', '1', '1')
('0', '1', '-1')
('0', '1', '-1')
('-8', '1', '1')
('-8', '1', '-1')
('-8', '1', '-1')
('1', '1', '-1')
0


Fixed submission (verdict: Accepted):
import itertools


S = input()

l = input().split()

i = 0
if len(l) < 3:
    print('0')
else:

    for v in itertools.combinations(l, 3):
        
        if v[0] != v[1] and v[1] != v[2] and v[0] != v[2]:
        
            if int(v[0]) + int(v[1]) > int(v[2]) and int(v[1]) + int(v[2]) > int(v[0]) and int(v[0]) + int(v[2]) > int(v[1]) :
                i = i +1

    print(i)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
l.sort()

cnt=0

for i in range(len(l)):
    for j in range(len(l)):
        for k in range(len(l)):
            if i<j<k:
                if l[k]<l[i]+l[j] and l[i]!=l[j]:
                    cnt+=1


print(cnt)

Failing test case input:
10
9 7 16 2 9 6 10 6 6 8

Expected output:
48


Actual output:
57


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
l.sort()

cnt=0

for i in range(len(l)):
    for j in range(len(l)):
        for k in range(len(l)):
            if l[i]<l[j]<l[k]:
                if l[k]<l[i]+l[j]:
                    cnt+=1


print(cnt)

Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)

cnt = 0
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+i,N):
            c = L[i]
            b = L[j]
            a = L[k]
            if c < a+b and c > b-a and a != b and b != c and c != a:
                cnt += 1
print(cnt)


Failing test case input:
10
16 4 3 1 2 6 7 1 7 8

Expected output:
18


Actual output:
13


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)

cnt = 0
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            c = L[i]
            b = L[j]
            a = L[k]
            if c < a+b and c > b-a and a != b and b != c and c != a:
                cnt += 1
print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
L = list(map(int,input().split()))
L = list(set(L))
l = len(L)
ans = 0
for i in range(l):
  for j in range(i+1, l):
    for k in range(j+1, l):
      if L[i] + L[j] > L[k] :
        ans += 1
print(ans) 
      


Failing test case input:
10
16 4 3 2 2 12 13 1 13 0

Expected output:
14


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
L = list(map(int,input().split()))
L.sort()
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] < L[k] and L[i] + L[j] > L[k] :
        ans += 1
print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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]:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
print(ans)


Failing test case input:
5
0 -8 1 1 -1

Expected output:
0


Actual output:
8


Fixed submission (verdict: Accepted):
def factorial_cor(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact
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 j != k and k != i:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
              
          
print(ans
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
cnt=0
for i in range(0,N-2,1):
  for j in range(1,N-1,1):
    for k in range(2,N,1):
      if L[i]!=L[j] and L[j]!=L[k] and L[k]!=L[i] and \
      L[i]+L[j]>L[k] and L[j]+L[k]>L[i] and L[k]+L[i]>L[j]:
        cnt=cnt+1
print(cnt)


Failing test case input:
10
9 11 14 2 9 11 7 6 7 8

Expected output:
66


Actual output:
182


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

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n=int(input())
if n<3:
  print(0)
else:
  cnt=0
  l_list=list(map(int,input().split()))
  sl_list=list(set(l_list))
  k=len(sl_list)
  for i in range(k):
    for j in range(i+1,k):
      for g in range(j+1,k):
        m=sl_list[i]+sl_list[j]
        if sl_list[g]<m:
          cnt+=1
  print(cnt)

Failing test case input:
5
4 -3 0 0 2

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):

n=int(input())
if n<3:
  print(0)
else:
  cnt=0
  l_list=list(map(int,input().split()))
  sl_list=sorted(l_list)
  for i in range(n):
    for j in range(i+1,n):
      for g in range(j+1,n):
        m=sl_list[i]
        f=sl_list[j]
        d=sl_list[g]
        if m!=f and f!=d and d!=m:
          if d<m+f:
            cnt+=1
  print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools
N = input()
t = map(int,input().split())
cnt = 0
list = itertools.combinations(t,3)
for i in list:
    if i[0]+i[1]>i[2] and i[1]+i[2]>i[0] and i[2]+i[0]>i[1]:
        cnt += 1

print(cnt)

Failing test case input:
10
16 11 26 1 9 6 7 7 7 8

Expected output:
30


Actual output:
46


Fixed submission (verdict: Accepted):

import itertools
N = input()
t = map(int,input().split())
cnt = 0
list = itertools.combinations(t,3)
for i in list:
    if i[0]+i[1]>i[2] and i[1]+i[2]>i[0] and i[2]+i[0]>i[1] and i[0]!=i[1] and i[1]!=i[2] and i[2]!=i[0]:
        cnt += 1
     

print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
count=0
for a in range(N):
    for b in range(N):
        for c in range(N):
            if L[a]<(L[b]+L[c]) and L[b]<(L[a]+L[c]) and L[c]<(L[b]+L[a]) and a!=b and b!=c and c!=a and L[a]!=L[b] and L[a]!=L[c] and L[c]!=L[b]:
                count=count+1
            else:
                continue
print(count)

Failing test case input:
10
9 11 14 2 9 6 7 6 7 8

Expected output:
65


Actual output:
390


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))
count=0
for a in range(N):
    for b in range(N):
        for c in range(N):
            if L[a]<(L[b]+L[c]) and L[b]<(L[a]+L[c]) and L[c]<(L[b]+L[a]) and L[a]!=L[b] and L[a]!=L[c] and L[c]!=L[b] and a<b<c:
                count=count+1
            else:
                continue
print(count)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
L.sort()
count=0

for i in range(N):
    for j in range(i,N):
        for k in range(j,N):
            if (L[i] != L[j] and L[j] != L[k]):
                    if (L[i] + L[j] < L[k]):
                            count += 1
                        
print(count)

Failing test case input:
5
4 4 9 7 5

Expected output:
5

Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))
L.sort()
count=0

for i in range(N):
    for j in range(i,N):
        for k in range(j,N):
            if (L[i] != L[j] and L[j] != L[k]):
                    if (L[i] + L[j] > L[k]):
                            count += 1
                        
print(count)

Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())

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

cnt = 0

for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            if a[i] == a[j] or a[j] == a[k] or a[i] == a[k]:
                continue
            if a[i] + a[j] >= a[k] or a[i] + a[k] >= a[j] or a[k] + a[j] >= a[i]:
                continue
            cnt += 1
print(cnt)

Failing test case input:
10
9 11 18 2 9 11 7 7 7 8

Expected output:
39


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())

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

cnt = 0

for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            if a[i] == a[j] or a[j] == a[k] or a[i] == a[k]:
                continue
            if a[i] + a[j] <= a[k] or a[i] + a[k] <= a[j] or a[k] + a[j] <= a[i]:
                continue
            cnt += 1

print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0

if n >= 3:
    for i in range(0, 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] and l[i]!=l[k] and l[j]!=l[k]:
                    ans += 1
                    print(i,j,k)
print(ans)


Failing test case input:
10
9 7 22 2 9 6 10 6 6 8

Expected output:
42


Actual output:
0 1 4
0 2 4
0 3 4
0 4 5
0 5 6
0 5 7
0 6 8
0 7 8
1 4 5
1 4 6
1 4 7
1 4 8
1 5 6
1 5 7
1 5 8
1 6 8
1 7 8
2 4 5
2 4 6
2 4 7
2 4 8
2 5 6
2 5 7
2 5 8
2 6 8
2 7 8
3 4 5
3 4 6
3 4 7
3 4 8
3 5 6
3 5 7
3 5 8
3 6 8
3 7 8
4 5 6
4 5 7
4 5 8
4 6 8
4 7 8
5 6 8
5 7 8
42


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0

if n >= 3:
    for i in range(0, 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] and l[i]!=l[k] and l[j]!=l[k]:
                    ans += 1
print(ans)
Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
count = 0
L = list(map(int, input().split()))
for i,li in enumerate(L[:-2]):
  for j,lj in enumerate(L[i+1:-1]):
    for k,lk in enumerate(L[i+j+1:]):
      if (li != lj) and (lj != lk):

        if li + lj > lk and lj + lk > li and lk + li > lj:

          count += 1
print(count)

Failing test case input:
6
1 5 7 3 7 5

Expected output:
4


Actual output:
8


Fixed submission (verdict: Accepted):
N = int(input())
count = 0
L = list(map(int, input().split()))
for i,li in enumerate(L[:-2]):
  for j,lj in enumerate(L[i+1:-1]):
    for k,lk in enumerate(L[i+j+1:]):
      if (li != lj) and (lj != lk) and (li != lk):

        if li + lj > lk and lj + lk > li and lk + li > lj:

          count += 1
print(count)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools

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

ans=0
lis = sorted(lis)
print(lis)

for v in itertools.combinations(lis, 3):
    if (not(v[0]==v[1] or v[1]==v[2] or v[0]==v[2])) and (v[0]+v[1]>v[2]):
        
        ans+=1

print(ans)

Failing test case input:
10
9 11 14 2 9 6 7 6 7 8

Expected output:
65


Actual output:
[2, 6, 6, 7, 7, 8, 9, 9, 11, 14]
65


Fixed submission (verdict: Accepted):
import itertools

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

ans=0
lis = sorted(lis)


for v in itertools.combinations(lis, 3):
    if (not(v[0]==v[1] or v[1]==v[2] or v[0]==v[2])) and (v[0]+v[1]>v[2]):
        
        ans+=1

print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))
 
ans = 0
if(N >= 3):
  t = []
  for i in range(N):
    for j in range(i+1, N):
      for k in range(j+1, N):
        if((L[i] != L[j]) & (L[i] != L[k]) & (L[j] != L[k]) & (abs(L[j]-L[k]) < L[i]) & (L[i] < L[j]+L[k])): t.append((L[i], L[j], L[k]))
  ans = len(set(t))

print(ans)

Failing test case input:
10
16 11 3 1 2 6 7 7 7 8

Expected output:
28


Actual output:
12


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))
 
ans = 0
if(N >= 3):
  t = []
  for i in range(N):
    for j in range(i+1, N):
      for k in range(j+1, N):
        if((L[i] != L[j]) & (L[i] != L[k]) & (L[j] != L[k]) & (abs(L[j]-L[k]) < L[i]) & (L[i] < L[j]+L[k])): t.append((L[i], L[j], L[k]))
  ans = len(t)

print(ans)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools

n = int(input())

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

li = list(itertools.combinations(li, 3))


count = 0

for i in li:
    print(i)
    amari = sum(i) - max(i)
    if amari > max(i):
        if len(set(i)) == 3:
            count += 1

print(count)




Failing test case input:
5
0 -4 1 1 2

Expected output:
0


Actual output:
(0, -4, 1)
(0, -4, 1)
(0, -4, 2)
(0, 1, 1)
(0, 1, 2)
(0, 1, 2)
(-4, 1, 1)
(-4, 1, 2)
(-4, 1, 2)
(1, 1, 2)
0


Fixed submission (verdict: Accepted):
import itertools

n = int(input())

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

li = list(itertools.combinations(li, 3))

count = 0

for i in li:
    amari = sum(i) - max(i)
    if amari > max(i):
        if len(set(i)) == 3:
            count += 1

print(count)

Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import collections
import itertools
def resolve():
    n = int(input())
    l = list(map(int, input().split()))
    c = collections.Counter(l)
    keys = c.keys()
    key_combinations = set(itertools.combinations(keys, 3))

    result = 0
    for combination in key_combinations:
        max_key = max(combination)
        if sum(combination) - max_key > max_key:
            
            one_combination_result = 1
            for key in combination:
                one_combination_result = one_combination_result * c[key]
            result += one_combination_result
    print(result)

Failing test case input:
5
1 -8 0 1 0

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
import collections
import itertools
def resolve():
    n = int(input())
    l = list(map(int, input().split()))
    c = collections.Counter(l)
    keys = c.keys()
    key_combinations = set(itertools.combinations(keys, 3))

    result = 0
    for combination in key_combinations:
        max_key = max(combination)
        if sum(combination) - max_key > max_key:
            
            one_combination_result = 1
            for key in combination:
                one_combination_result = one_combination_result * c[key]
            result += one_combination_result
    print(result)
resolve()

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=eval(input())
num=list(map(int,input().split()))
res=0
for i in num:
    for j in num:
        for k in num[::-1]:
            if i==j or i==k or j==k:
                continue
            else:
                if j-k<i and j+k>i:
                    res+=1
print(res/6)

Failing test case input:
10
16 11 18 2 9 6 7 7 7 8

Expected output:
45


Actual output:
62.666666666666664


Fixed submission (verdict: Accepted):
x=eval(input())
num=sorted(list(map(int,input().split())))
res=0
for i in range(x):
    for j in range(i):
        for k in range(x-1,i,-1):
            if num[i]==num[j] or num[i]==num[k] or num[j]==num[k]:
                continue
            else:
                if num[j]-num[k]<num[i] and num[j]+num[i]>num[k]:
                    res+=1
print(res)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
dic = {}
L = list(map(int, input().split()))
L.sort()
s = 0
for i in range(0, len (L)):
    for j in range(i+1 , len (L)):
        for k in range ( j+1 ,len(L)):
            if L[i] > k:
                s+=1
print (s)
                        



Failing test case input:
10
9 11 18 2 9 11 7 6 7 8

Expected output:
50


Actual output:
23


Fixed submission (verdict: Accepted):
N = int(input())
dic = {}
L = list(map(int, input().split()))
L.sort()
s = 0
for i in range(0, 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] and L[i] != L[j] and L[j] != L[k] and L[i] != L[k] :
                s+=1
print (s)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))

FF= []

count =0
for i in range(N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            print(i,j,k)
            a = L[i]
            b = L[j]
            c = L[k]
            if a != b and b != c and a != c and a + b > c and b + c > a and c + a > b:
                    FF.append(str(a) + str(b) + str(c))
print(len(FF))

Failing test case input:
10
16 11 3 1 2 6 7 7 7 8

Expected output:
28


Actual output:
0 1 2
0 1 3
0 1 4
0 1 5
0 1 6
0 1 7
0 1 8
0 1 9
0 2 3
0 2 4
0 2 5
0 2 6
0 2 7
0 2 8
0 2 9
0 3 4
0 3 5
0 3 6
0 3 7
0 3 8
0 3 9
0 4 5
0 4 6
0 4 7
0 4 8
0 4 9
0 5 6
0 5 7
0 5 8
0 5 9
0 6 7
0 6 8
0 6 9
0 7 8
0 7 9
0 8 9
1 2 3
1 2 4
1 2 5
1 2 6
1 2 7
1 2 8
1 2 9
1 3 4
1 3 5
1 3 6
1 3 7
1 3 8
1 3 9
1 4 5
1 4 6
1 4 7
1 4 8
1 4 9
1 5 6
1 5 7
1 5 8
1 5 9
1 6 7
1 6 8
1 6 9
1 7 8
1 7 9
1 8 9
2 3 4
2 3 5
2 3 6
2 3 7
2 3 8
2 3 9
2 4 5
2 4 6
2 4 7
2 4 8
2 4 9
2 5 6
2 5 7
2 5 8
2 5 9
2 6 7
2 6 8
2 6 9
2 7 8
2 7 9
2 8 9
3 4 5
3 4 6
3 4 7
3 4 8
3 4 9
3 5 6
3 5 7
3 5 8
3 5 9
3 6 7
3 6 8
3 6 9
3 7 8
3 7 9
3 8 9
4 5 6
4 5 7
4 5 8
4 5 9
4 6 7
4 6 8
4 6 9
4 7 8
4 7 9
4 8 9
5 6 7
5 6 8
5 6 9
5 7 8
5 7 9
5 8 9
6 7 8
6 7 9
6 8 9
7 8 9
28


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

FF= []

count =0
for i in range(N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            a = L[i]
            b = L[j]
            c = L[k]
            if a != b and b != c and a != c and a + b > c and b + c > a and c + a > b:
                    FF.append(str(a) + str(b) + str(c))
print(len(FF))
Problem: p02583
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))

c = 0

for i in range(n-2):
    for j in range(i,n-1):
        for k in range(j,n):
            if l[i] != l[j] and l[j] != l[k] and l[i] != l[k] and l[i]+l[j]>l[k] and l[i]+l[k]>l[j] and l[j]+l[k]>l[i]:
                c+=1
                print(i,j,k,c)


print(c)


Failing test case input:
6
1 5 7 3 7 5

Expected output:
4


Actual output:
1 2 3 1
1 3 4 2
2 3 5 3
3 4 5 4
4


Fixed submission (verdict: Accepted):

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

c = 0

for i in range(n-2):
    for j in range(i,n-1):
        for k in range(j,n):
            if l[i] != l[j] and l[j] != l[k] and l[i] != l[k] and l[i]+l[j]>l[k] and l[i]+l[k]>l[j] and l[j]+l[k]>l[i]:
                c+=1


print(c)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=int(input())
a=list(map(int, input().split()))
a=list(set(a))
s=len(a)
count=0
a.sort()

for i in range(s):
  for j in range(i+1,s):
    for k in range(j+1,s):
      
      ij = a[i]+a[j]
      jk = a[j]+a[k]
      ki = a[k]+a[i]
      
      
      if (ij > a[k]) and (jk > a[i])and (ki > a[j]):
        count +=1
print(count)

Failing test case input:
10
9 7 13 2 9 6 10 6 6 8

Expected output:
63


Actual output:
23


Fixed submission (verdict: Accepted):
s=int(input())
a=list(map(int, input().split()))
count=0
a.sort()

for i in range(s):
  for j in range(i+1,s):
    for k in range(j+1,s):
      
      if a[i]==a[j]: continue
      if a[j]==a[k]: continue
      if a[k]==a[i]: continue

     
      ij = a[i]+a[j]
      jk = a[j]+a[k]
      ki = a[k]+a[i]
      
      
      if (ij > a[k]) and (jk > a[i])and (ki > a[j]):
        
        count +=1
print(count)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = (int(x) for x in input().split())

b = list(a)
cnt = []

for i in range(len(list(b))) :
        for j in range(len(list(b))) :
                for k in range(len(list(b))):
                        if i != j and j != k and k != i :
                                d = [b[i],b[j],b[k]]
                                m = max(d) 
                                if m < sum(d) - m :
                                        cnt.append(1)
                                else :
                                        None
                        else :
                                None
                                
print(sum(cnt))

Failing test case input:
10
9 4 8 1 9 6 10 6 6 8

Expected output:
48


Actual output:
516


Fixed submission (verdict: Accepted):
n = int(input())
a = (int(x) for x in input().split())

b = list(a)

cnt = 0

for i in range(len(b)) :
        for j in range(len(b)) :
                for k in range(len(b)):
                        c = [i,j,k]
                        if len(c) == len(set(c)) :
                                d = [b[i],b[j],b[k]]
                                m = max(d) 
                                if m < sum(d) - m and b[i] != b[j] and b[j] != b[k] and b[k] !=b[i]:
                                        cnt += 1
                                else :
                                        None
                        else :
                                None
                                
print(int(cnt/6))

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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 j != k and k != i:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
print(ans)


Failing test case input:
10
16 13 4 2 1 12 10 0 33 1

Expected output:
9


Actual output:
54


Fixed submission (verdict: Accepted):
def factorial_cor(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact
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 j != k and k != i:
        if i + j > k:
          if j + k > i:
            if k + i > j:
              ans += 1
              
              
          
print(ans
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
nums = list(map(int, input().split()))
cnt = 0
for i in range(N):
    for j in range(N):
        for k in range(N):
            tmp_list = [nums[i], nums[j], nums[k]]
            if i == j or j == k or k == i:
                continue
            if tmp_list != list(set(tmp_list)):
                continue
            else:
                tmp_list.sort()
                if tmp_list[-1] >= sum(tmp_list[:-1]):
                    continue
                else:
                    cnt += 1
print(cnt)


Failing test case input:
10
16 4 3 2 2 12 13 1 13 0

Expected output:
14


Actual output:
12


Fixed submission (verdict: Accepted):
N = int(input())
nums = list(map(int, input().split()))
cnt = 0

for i in range(N):
    for j in range(N):
        for k in range(N):
            tmp_list = [nums[i], nums[j], nums[k]]
            if i >= j or j >= k:
                continue
            if len(tmp_list) != len(set(tmp_list)):
                continue
            else:
                tmp_list.sort()
                if tmp_list[-1] >= sum(tmp_list[:-1]):
                    continue
                else:
                    cnt += 1
print(cnt)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import bisect

N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
if N < 3:
    print(0)

ans = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        if L[i] == L[j]:
            continue
        for k in range(j+1, N):
            if L[i] == L[k] or L[j] == L[k]:
                continue
            if L[i] < L[j] + L[k]:
                ans += 1

print(ans)


Failing test case input:
2
13 0

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):
import bisect

N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
if N < 3:
    print(0)
    exit()

ans = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        if L[i] == L[j]:
            continue
        for k in range(j+1, N):
            if L[i] == L[k] or L[j] == L[k]:
                continue
            if L[i] < L[j] + L[k]:
                ans += 1

print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
5
4 -1 0 7 5

Expected output:
1


Actual output:
7


Fixed submission (verdict: Accepted):
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)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = sorted(map(int,input().split()))

print(l)
ans = 0

for a in range(n):
    for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1
print(ans)

Failing test case input:
6
4 5 8 3 3 5

Expected output:
6


Actual output:
[3, 3, 4, 5, 5, 8]
6


Fixed submission (verdict: Accepted):
n = int(input())
l = sorted(map(int,input().split()))

ans = 0

for a in range(n):
    for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1
print(ans)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

result=0
n=int(input())

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

for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            if li[i]+li[j]<=li[k]:
                break
            if li[j]+li[k]<=li[i]:
                break
            if li[k]+li[i]<=li[j]:
                break
            
            result+=1
print(result)

Failing test case input:
10
9 11 14 2 9 11 7 6 7 8

Expected output:
66


Actual output:
67


Fixed submission (verdict: Accepted):
import math

result=0
n=int(input())
rml=[]

li=list(map(int,input().split()))
for i in range(len(li)-1):
    for j in range(i+len(li)):
        rml.append(j)

for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            if li[i]+li[j]<=li[k] or li[i]==li[j]:
                continue
            if li[j]+li[k]<=li[i] or li[j]==li[k]:
                continue
            if li[k]+li[i]<=li[j] or li[k]==li[i]:
                continue
            
            result+=1
print(result)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
count = 0
x = []
for i in range(len(l)-2):
    for j in range(i+1,len(l)-1):
        if l[i]!=l[j]:
            for k in range(j+1,len(l)):
                if l[i]!=l[k] and l[j]!=l[k]:
                    x.append([i+1,j+1,k+1])
                    
print(len(x))


Failing test case input:
5
1 -8 1 1 -1

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int,input().split()))
count = 0
x = []
e = []
for i in range(len(l)-2):
    for j in range(i+1,len(l)-1):
        if l[i]!=l[j]:
            for k in range(j+1,len(l)):
                if l[i]!=l[k] and l[j]!=l[k]:
                    x.append([i+1,j+1,k+1])
                    e.append([l[i],l[j],l[k]])
count = 0           
for i in range(len(x)):
    e[i].sort()
    if e[i][0] + e[i][1] > e[i][2]:
        count +=1
print(count)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
count = 0
N = int(input())
L = list(map(int, input().split())) 
L.sort(reverse=True) 
A = len(L)
for i in range(0, A-2):
    for j in range(1, A-1):
        for k in range(2, A):
            if L[i] == L[j] or L[j] == L[k] or L[i] == L[k]:
                count += 0
            elif L[i] < L[j] + L[k]:
                print(L[i])
                count += 1
print(count)

Failing test case input:
6
4 5 4 3 3 5

Expected output:
8

Actual output:
5
5
5
5
5
5
5
5
5
5
5
5
4
4
4
4
16


Fixed submission (verdict: Accepted):
count = 0
N = int(input())
L = list(map(int, input().split())) 
L.sort(reverse=True) 
for i in range(0, N-2): 
    for j in range(i, N-1):
        for k in range(j, N):
            if L[i] == L[j] or L[j] == L[k] or L[i] == L[k]:
                count += 0
            elif L[i] < L[j] + L[k]:
                
                count += 1
print(count)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

if n < 3:
    exit()

L = sorted([int(x) for x in input().split()])

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] and L[j] != L[k] and L[i] != L[k] and L[i] + L[j] > L[k]:
                count += 1

print(count)


Failing test case input:
2
13 0

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())

if n < 3:
    print(0)
    exit()

L = sorted([int(x) for x in input().split()])

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] and L[j] != L[k] and L[i] != L[k] and L[i] + L[j] > L[k]:
                count += 1

print(count)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools

N = int(input())
L = list(map(int,input().split()))
 
l_list = list(itertools.combinations(L, 3))

res = 0
 
for tri in l_list:
  l = list(tri)
  l.sort()
  if (l[0] + l[1] > l[2]):
  	res += 1
    
print(res)

Failing test case input:
6
0 5 7 5 7 5

Expected output:
0


Actual output:
10


Fixed submission (verdict: Accepted):
import itertools

N = int(input())
L = list(map(int,input().split()))
 
l_list = list(itertools.combinations(L, 3))

res = 0
 
for tri in l_list:
  l = list(tri)
  l.sort()
  if (len(l) != len(set(l))):
    continue
  if (l[0] + l[1] > l[2]):
  	res += 1
    
print(res)
Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())
A = list(map(int, input().split()))


count = 0
for i in range(len(A)):
    for j in range(i+1,len(A)):
        for k in range(j+1,len(A)):
            
            tmp = sorted([A[i],A[j],A[k]])
            if (tmp[2]<tmp[0]+tmp[1])and (tmp[0]<tmp[1])and(tmp[1]<A[2]) :
                
                
                count+=1


print(count)
                

Failing test case input:
6
1 5 6 3 5 5

Expected output:
3


Actual output:
9


Fixed submission (verdict: Accepted):
X = int(input())
A = list(map(int, input().split()))


count = 0
for i in range(len(A)):
    for j in range(i+1,len(A)):
        for k in range(j+1,len(A)):
            
            tmp = sorted([A[i],A[j],A[k]])
            if (tmp[2]<tmp[0]+tmp[1])and (tmp[0]<tmp[1]<tmp[2]) :
                count+=1


print(count)

Problem: p02583
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    N = int(input())
    L = list(map(int, input().split()))
    L = sorted(L)
    print(L)
    count = 0

    for i in range(N-2):
        for j in range(i+1, N):
            for k in range(j+1, N):
                if L[i] + L[j] > L[k] and L[i] != L[j] != L[k]:
                    print(i,j,k)
                    count += 1
                    print(count)

    print(count)

if __name__ == '__main__':
    main()

Failing test case input:
10
9 11 14 2 9 6 7 6 7 8

Expected output:
65


Actual output:
[2, 6, 6, 7, 7, 8, 9, 9, 11, 14]
0 1 3
1
0 1 4
2
0 2 3
3
0 2 4
4
0 3 5
5
0 4 5
6
0 5 6
7
0 5 7
8
1 3 5
9
1 3 6
10
1 3 7
11
1 3 8
12
1 4 5
13
1 4 6
14
1 4 7
15
1 4 8
16
1 5 6
17
1 5 7
18
1 5 8
19
1 6 8
20
1 6 9
21
1 7 8
22
1 7 9
23
1 8 9
24
2 3 5
25
2 3 6
26
2 3 7
27
2 3 8
28
2 4 5
29
2 4 6
30
2 4 7
31
2 4 8
32
2 5 6
33
2 5 7
34
2 5 8
35
2 6 8
36
2 6 9
37
2 7 8
38
2 7 9
39
2 8 9
40
3 5 6
41
3 5 7
42
3 5 8
43
3 5 9
44
3 6 8
45
3 6 9
46
3 7 8
47
3 7 9
48
3 8 9
49
4 5 6
50
4 5 7
51
4 5 8
52
4 5 9
53
4 6 8
54
4 6 9
55
4 7 8
56
4 7 9
57
4 8 9
58
5 6 8
59
5 6 9
60
5 7 8
61
5 7 9
62
5 8 9
63
6 8 9
64
7 8 9
65
65


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    L = list(map(int, input().split()))
    L = sorted(L)
    count = 0

    for i in range(N-2):
        for j in range(i+1, N):
            for k in range(j+1, N):
                if L[i] + L[j] > L[k] and L[i] != L[j] != L[k]:
                    count += 1

    print(count)


if __name__ == '__main__':
    main()