Buggy python submission (verdict: Runtime Error):
from math import factorial
from collections import Counter
 
def conb(n):
    if n == 1:
        return 0
    else:
        return factorial(n) / factorial(2) / factorial(n - 2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Runtime Error):
from math import factorial
from collections import Counter
 
def conb(n):
    if n == 1:
        return 0
    else:
        return factorial(n) / factorial(2) / factorial(n - 2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Runtime Error):
from math import factorial
def conb(n):
    if n == 1:
        return 0
    else:
        return factorial(n) / factorial(2) / factorial(n - 2)


n = int(input())
l = [input() for _ in range(n)]
mst = set((list("".join(l))))
l = ["".join(map(str, [x.count(a) for a in mst])) for x in l]
l_s = set(l)
result = 0
for s in l_s:
    result += int(conb(l.count(s)))
print(result)

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [input() for _ in range(n)]
mst = set((list("".join(l))))
l = [[x.count(a) for a in mst] for x in l]
result = 0
for i in range(n-1):
    result += l[i+1:].count(l[i])
print(result)

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Time Limit Exceeded):
mst_l = [chr(i) for i in range(97,97+26)]

n = int(input())
l = [input() for _ in range(n)]
l = ["".join(map(str, [x.count(a) for a in mst_l])) for x in l]
result = 0
for i in range(n-1):
    result += l[i+1:].count(l[i])
print(result)

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Runtime Error):
mst_l = [chr(i) for i in range(97,97+26)]

n = int(input())
l = ["".join(map(str, [input().count(a) for a in mst_l])) for _ in range(n)]
result = 0
for i in range(n-1):
    result += l[i+1:].count(l[i])
print(result)

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))

Buggy python submission (verdict: Time Limit Exceeded):
mst_l = [chr(i) for i in range(97,97+26)]

n = int(input())
l = [input() for _ in range(n)]
l = ["".join(map(str, [x.count(a) for a in mst_l])) for x in l]
result = 0
for i in range(n-1):
    result += len([x for x in l[i+1:] if x == l[i]])
print(result)

Fixed submission:
from math import factorial
from collections import Counter
 
def conb(n):
    if n <= 1:
        return 0
    else:
        return factorial(n) // factorial(n-2) // factorial(2) 

n = int(input())
S = [''.join(sorted(list(input()))) for i in range(n)]

print(int(sum([conb(i) for i in Counter(S).values()])))