Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

def combi(n):
    return n*(n-1)//2

"""
for i in range(n):
    count = a.count(i+1)
    count_all += combi(count)
"""
count_all = sum([combi(a.count(i+1)) for i in range(n)])
"""
for k in range(n):
    #aのk番目の要素と同じ要素の数を(k番目の要素も含めて)出し、1を引く
    count = a.count(a[k]) - 1
    ans = count_all - count
    print(ans)
"""
count = [a.count(a[k]) - 1 for k in range(n)]
x = np.array([count_all]*n)
y = np.array(count)
ans = x-y
for s in ans.tolist():
    print(s)


Fixed submission:
n, m = map(int, input().split())

ans = (n * (n-1))//2 + (m * (m-1))//2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
 
def combi(n):
    return n*(n-1)//2
 
count_all = 0
count_cut = 0
 
 
for i in range(n):
    count = a.count(i+1)
    count_all += combi(count)
    
for k in range(n):
    #aのk番目の要素と同じ要素の数を(k番目の要素も含めて)出し、1を引く
    count = a.count(a[k]) - 1
    ans = count_all - count
    print(ans)

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

num_list=[0]*n
for i in range(n):
    num_list[a[i]-1]+=1

sm_all=0
for i in range(n):
    k=num_list[i]
    sm_all+=(k*(k-1))//2

for i in range(n):
    print(sm_all-(num_list[a[i]-1]-1))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

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

def combi(n):
    return n*(n-1)//2

"""
for i in range(n):
    count = a.count(i+1)
    count_all += combi(count)
"""
count_all = sum([combi(a.count(i+1)) for i in range(n)])
"""
for k in range(n):
    #aのk番目の要素と同じ要素の数を(k番目の要素も含めて)出し、1を引く
    count = a.count(a[k]) - 1
    ans = count_all - count
    print(ans)
"""
count = [a.count(a[k]) - 1 for k in range(n)]
x = np.array([count_all]*n)
y = np.array(count)
ans = x-y
for s in ans.tolist():
    print(s)


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

num_list=[0]*n
for i in range(n):
    num_list[a[i]-1]+=1

sm_all=0
for i in range(n):
    k=num_list[i]
    sm_all+=(k*(k-1))//2

for i in range(n):
    print(sm_all-(num_list[a[i]-1]-1))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

def combi(n):
    return n*(n-1)//2

count_all = 0
count_cut = 0


for i in range(n):
    count = a.count(i+1)
    count_all += combi(count)
    
for k in range(n):
    #aのk番目の要素と同じ要素の数を(k番目の要素も含めて)出し、1を引く
    count = a.count(a[k]) - 1
    ans = count_all - count
    print(ans)


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

num_list=[0]*n
for i in range(n):
    num_list[a[i]-1]+=1

sm_all=0
for i in range(n):
    k=num_list[i]
    sm_all+=(k*(k-1))//2

for i in range(n):
    print(sm_all-(num_list[a[i]-1]-1))
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
rev = False

for i in range(q):
    t = input()
    if len(t) == 1:        
        if rev:
            rev = False
        else:
            rev = True
    else:
        q2, f, c = t.split()
        if f == "1":
            if rev:
                s = s + c
            else:
                s = c + s
        if f == "2":
            if rev:
                s = c + s
            else:
                s = s + c

if rev:
    s = s[::-1]
else:
    pass

print(s)
            

Fixed submission:
s = list(input())
q = int(input())
rev = False
fwd =[]

for i in range(q):
    t = input()
    if len(t) == 1:        
        if rev:
            rev = False
        else:
            rev = True
    else:
        q2, f, c = t.split()
        if f == "1":
            if rev:
                s.append(c)
            else:
                fwd.append(c)
        if f == "2":
            if rev:
                fwd.append(c)
            else:
                s.append(c)

s = list(reversed(fwd)) + s

if rev:
    s = "".join(list(reversed(s)))
else:
    s = "".join(s)

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
    t = input()
    if len(t) == 1:        
        s = s[::-1]
    else:
        q2, f, c = t.split()
        if f == "1":
            s = c + s
        if f == "2":
            s = s + c

print(s)
            

Fixed submission:
s = list(input())
q = int(input())
rev = False
fwd =[]

for i in range(q):
    t = input()
    if len(t) == 1:        
        if rev:
            rev = False
        else:
            rev = True
    else:
        q2, f, c = t.split()
        if f == "1":
            if rev:
                s.append(c)
            else:
                fwd.append(c)
        if f == "2":
            if rev:
                fwd.append(c)
            else:
                s.append(c)

s = list(reversed(fwd)) + s

if rev:
    s = "".join(list(reversed(s)))
else:
    s = "".join(s)

print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x=list(map(int, input().split()))

ma = max(x)
mi = min(x)
z = 0
a = []
for i in range(mi,ma):
    for j in range(n):
        y = (x[j] - (mi+i))**2
        z += y
    a.append(z)
    z = 0

print(min(a))

Fixed submission:
n = int(input())
x=list(map(int, input().split()))

mn=10**7
for i in range(1,101):
    hp=0
    for k in range(n):
        hp+=(x[k]-i)**2
    if hp<mn:
        mn=hp

print(mn)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))

p_mx=0

for i in range(k):
    p_sm += p[i]

p_mx=p_sm

for i in range(n-k):
    p_sm= p_sm + p[k+i]-p[i]
    if p_sm >p_mx:
        p_mx = p_sm

print((p_mx+k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

p_sm=0

for i in range(k):
    p_sm += p[i]

p_mx=p_sm

for i in range(n-k):
    p_sm= p_sm + p[k+i]-p[i]
    if p_sm >p_mx:
        p_mx = p_sm

print((p_mx+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))

def expected(sm, k):
    return (sm+k)/2

max=0

for i in range(n-k+1):
    slc=p[i:(i+k)]
    sm=sum(slc)
    if max <= sm:
        max=sm

print(expected(max, k))

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

p_sm=0

for i in range(k):
    p_sm += p[i]

p_mx=p_sm

for i in range(n-k):
    p_sm= p_sm + p[k+i]-p[i]
    if p_sm >p_mx:
        p_mx = p_sm

print((p_mx+k)/2)
Buggy python submission (verdict: Time Limit Exceeded):
count = 0

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

for i in range(n):
    if p[i] == min(p[:i+1]):
        count += 1

print(count)

Fixed submission:
count = 0

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

min = 10**7
for i in range(n):
    if p[i] < min:
        count += 1
        min = p[i]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
count = 0

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

for i in range(n):
    if p[i] == min(p[:i+1]):
        count += 1

print(count)

Fixed submission:
count = 0

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

min = 10**7
for i in range(n):
    if p[i] < min:
        count += 1
        min = p[i]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
count = 0

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

q = []

for i in range(n):
    q.append(p[i])
    if q[i] == min(q):
        count += 1

print(count)

Fixed submission:
count = 0

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

min = 10**7
for i in range(n):
    if p[i] < min:
        count += 1
        min = p[i]

print(count)
Buggy python submission (verdict: Runtime Error):
import franctions
a, b = map(int, input().split())

def lcm(a,b):
    return (a*b)//franctions.gcd(a,b)

print(lcm(a,b))

Fixed submission:
import fractions
a, b = map(int, input().split())

def lcm(a,b):
    return (a*b)//fractions.gcd(a,b)

print(lcm(a,b))

Buggy python submission (verdict: Runtime Error):
from fractions import math

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

def lcm(a, b):
    return (a * b) // math.gcd(a, b)

print(lcm(a, b))

Fixed submission:
import fractions
a, b = map(int, input().split())

def lcm(a,b):
    return (a*b)//fractions.gcd(a,b)

print(lcm(a,b))

Buggy python submission (verdict: Runtime Error):
from fractions import math

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

def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)

print(lcm(a, b))

Fixed submission:
import fractions
a, b = map(int, input().split())

def lcm(a,b):
    return (a*b)//fractions.gcd(a,b)

print(lcm(a,b))
Buggy python submission (verdict: Runtime Error):
from math import sqrt

n = int(input())

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

x=[0]*n
y=[0]*n

for i in range(n):
    x[i], y[i] =map(int, input().split())

dis = 0

for i in range(n):
    for j in range(n):
        dis += distance(x[i], y[i], x[j], y[j])

dis = dis/n
print(dis)

Fixed submission:
import math

n = int(input())

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)
distance_sum=0

c=[0]*n
for i in range(n):
    coordinate=list(map(int,input().split()))
    c[i]=coordinate


for i in range(n-1):
    for j in range(i+1,n):
        distance_sum+=distance(c[i][0],c[i][1],c[j][0],c[j][1])
    
distance_sum*=2
distance_sum*=(n-1)
distance_sum=distance_sum/(n*(n-1))

print(distance_sum)
Buggy python submission (verdict: Time Limit Exceeded):

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


def quicksort(a, left: int, right: int):
    #a[left]〜a[right]をクイックソート
    pl=left
    pr=right
    pivot= a[(left +right)//2]

    #print(f'a[{left}]~a[{right}] : ', *a[left : right +1])

    while pl<=pr:
        while a[pl] <pivot: pl+=1
        while a[pr] >pivot: pr-=1
        if pl <= pr:
            a[pl], a[pr]= a[pr], a[pl]
            pl+=1
            pr-=1

    if left < pr: quicksort(a, left, pr)
    if pl < right: quicksort(a, pl, right)

def quick_sort(a):
    quicksort(a, 0, len(a)-1)

quick_sort(l)
count=0
for i in range(n-2):
    for j in range(i+1,n-1):
        x=l[i]+l[j]
        for k in range(j+1,n):
            if x<=l[k]:
                break
            count+=1

print(count)

Fixed submission:

n=int(input())
l=list(map(int,input().split()))
from bisect import bisect_left
l.sort()

count=0
for a in range(n-2):
    for b in range(a+1,n-1):
        idx=bisect_left(l,l[a]+l[b],lo=b)
        count+=idx-(b+1)

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
n,m=map(int,input().split())
a=list(map(int,input().split()))
d=defaultdict(int)
a.sort()

for i in range(m):
    b,c=map(int,input().split())
    d[c]+=b

d_sorted=sorted(d.items(),reverse=True, key=lambda x:x[0])
l=[]

for i,j in d_sorted:
    for k in range(j):
        l.append(i)
    if len(l)>=n:
        break

for i in range(min(n, len(l))):
    a[i]=max(a[i],l[i])

print(sum(a))

Fixed submission:
from collections import defaultdict
n,m=map(int,input().split())
a=list(map(int,input().split()))
d=defaultdict(int)
a.sort()

for i in range(m):
    b,c=map(int,input().split())
    d[c]+=b

d_sorted=sorted(d.items(),reverse=True, key=lambda x:x[0])
l=[]

for i,j in d_sorted:
    for k in range(j):
        l.append(i)
        if len(l)>n:
            break
    else:
        continue
    break
for i in range(min(n, len(l))):
    a[i]=max(a[i],l[i])

print(sum(a))
Buggy python submission (verdict: Runtime Error):
n, k=map(int, input().split())

l=[]
point=k
l.append(k)
while point>1:
    if point%2==0:
        point=point//2
    else:
        point=(point//2) +1
    l.append(point)

m=len(l)

if n>=k:
    ans1=0
    for i in range(m-1):
        count=l[i]-l[i+1]
        prob=0.5**(i+1)
        ans1+=prob*count
    ans=ans1+(n-k+1)
else:
    ans2=0
    for i in range(m-1):
        if n>=l[i]:
            b=i
            break
        else:
            continue
        break
    ans2+=((0.5)**b)*(n-l[b]+1)
    for i in range(b,m-1):
        count=l[i]-l[i+1]
        prob=0.5**(i+1)
        ans2+=prob*count
    ans=ans2



print(ans/n)

Fixed submission:
n, k=map(int, input().split())

l=[]
point=k
l.append(k)
while point>1:
    if point%2==0:
        point=point//2
    else:
        point=(point//2) +1
    l.append(point)

m=len(l)

if n>=k:
    ans1=0
    for i in range(m-1):
        count=l[i]-l[i+1]
        prob=0.5**(i+1)
        ans1+=prob*count
    ans=ans1+(n-k+1)
elif n==1:
    countn=0
    nn=n
    while nn<k:
        nn=nn*2
        countn+=1
    ans=0.5**countn
else:
    ans2=0
    for i in range(m-1):
        if n>=l[i]:
            b=i
            break
        else:
            continue
        break
    ans2+=((0.5)**b)*(n-l[b]+1)
    for i in range(b,m-1):
        count=l[i]-l[i+1]
        prob=0.5**(i+1)
        ans2+=prob*count
    ans=ans2



print(ans/n)
Buggy python submission (verdict: Runtime Error):
n, q=map(int, input().split())
s=input()


z=[0]*n
count=0
for i in range(n):
    z[i]=count
    if s[i]=="A":
        if s[i+1]=="C":
            count+=1
            z[i]+=1

for i in range(q):
    l, r =map(int,input().split())
    #r文字目までのACの数-(l-1)文字目まで
    if l==1:
        ans=z[r-1]
    elif r-l==1:
        if s[l-1]=="A" and s[l]=="C":
            ans=1
        else:
            ans=0
    else:
        ans=z[r-2]-z[l-2]
    print(ans)


Fixed submission:
n, q=map(int, input().split())
s=input()


z=[0]*n
count=0
for i in range(n):
    z[i]=count
    if s[i]=="A" and i<=n-2:
        if s[i+1]=="C":
            count+=1
            z[i]+=1

for i in range(q):
    l, r =map(int,input().split())
    #r文字目までのACの数-(l-1)文字目まで
    if l==1:
        ans=z[r-2]
    elif r-l==1:
        if s[l-1]=="A" and s[l]=="C":
            ans=1
        else:
            ans=0
    else:
        ans=z[r-2]-z[l-2]
    print(ans)

Buggy python submission (verdict: Runtime Error):
n, q=map(int, input().split())
s=input()


z=[0]*n
count=0
for i in range(n):
    z[i]=count
    if s[i]=="A":
        if s[i+1]=="C":
            count+=1
            z[i]+=1

for i in range(q):
    l, r =map(int,input().split())
    #r文字目までのACの数-(l-1)文字目まで
    if l==1:
        ans=z[r-1]
    elif r-l==1:
        if s[l-1]=="A" and s[l]=="C":
            ans=1
        else:
            ans=0
    else:
        ans=z[r-1]-z[l-2]
    print(ans)


Fixed submission:
n, q=map(int, input().split())
s=input()


z=[0]*n
count=0
for i in range(n):
    z[i]=count
    if s[i]=="A" and i<=n-2:
        if s[i+1]=="C":
            count+=1
            z[i]+=1

for i in range(q):
    l, r =map(int,input().split())
    #r文字目までのACの数-(l-1)文字目まで
    if l==1:
        ans=z[r-2]
    elif r-l==1:
        if s[l-1]=="A" and s[l]=="C":
            ans=1
        else:
            ans=0
    else:
        ans=z[r-2]-z[l-2]
    print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())

a=[]
for i in range(1,201,2):
    s=0
    for j in range(1,int(i**0.5)+1):
        if i%j==0:
            s+=1
            if j != i//j:
                s+=1
    a.append(s)

ans=0
for i in range(n//2+1):
    if a[i]==8:
        ans+=1

print(ans)

Fixed submission:
n=int(input())

a=[]
for i in range(1,201):
    s=0
    for j in range(1,int(i**0.5)+1):
        if i%j==0:
            s+=1
            if j != i//j:
                s+=1
    a.append(s)

ans=0
for i in range(n):
    if a[i]==8 and i%2==0:
        ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)

if len(b)<2 and len(c)<1:
    print(0)
elif len(c)==1 and len(b)<2:
    print(c[0]**2)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    print(max(rec,cube))

Fixed submission:
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)

if len(b)<2 and len(c)<1:
    print(0)
elif len(c)==1 and len(b)<2:
    print(c[0]**2)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    else:
        cube=0
    print(max(rec,cube))

Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)

if len(b)<2 and len(c)<1:
    print(0)
elif len(c)==1:
    print(c[0]**2)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    print(max(rec,cube))

Fixed submission:
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)

if len(b)<2 and len(c)<1:
    print(0)
elif len(c)==1 and len(b)<2:
    print(c[0]**2)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    else:
        cube=0
    print(max(rec,cube))

Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)
if len(b)<2:
    print(0)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    print(max(rec,cube))

Fixed submission:
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
d=defaultdict(int)
for i in range(n):
    d[a[i]]+=1

for i,j in d.items():
    if j>=2:
        b.append(i)
    if j>=4:
        c.append(i)

if len(b)<2 and len(c)<1:
    print(0)
elif len(c)==1 and len(b)<2:
    print(c[0]**2)
else:
    b.sort(reverse=True)
    rec=b[0]*b[1]
    if len(c)>=1:
        c.sort(reverse=True)
        cube=c[0]**2
    else:
        cube=0
    print(max(rec,cube))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n=int(input())
a=(map(int,input().split()))
ans=0
for a,b in itertools.combinations(a,2):
    ans+=(a*b)%(10**9+7)
    ans%=(10**9+7)
print(ans%(10**9+7))


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=0
cum=[0]
for i in range(n):
    cum.append((cum[i]+a[i])%(10**9+7))
for i in range(n):
    # print(a[i],cum[-1]-cum[i+1])
    ans+=a[i]*(cum[-1]-cum[i+1])%(10**9+7)
    ans%=(10**9+7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n=int(input())
a=list(map(int,input().split()))
ans=0
for a,b in itertools.combinations(a,2):
    ans+=(a*b)%(10**9+7)
    ans%=(10**9+7)
print(ans%(10**9+7))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=0
cum=[0]
for i in range(n):
    cum.append((cum[i]+a[i])%(10**9+7))
for i in range(n):
    # print(a[i],cum[-1]-cum[i+1])
    ans+=a[i]*(cum[-1]-cum[i+1])%(10**9+7)
    ans%=(10**9+7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n=int(input())
a=list(map(int,input().split()))
ans=0
for a,b in itertools.combinations(a,2):
    ans+=(a*b)%(10**9+7)
print(ans%(10**9+7))


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=0
cum=[0]
for i in range(n):
    cum.append((cum[i]+a[i])%(10**9+7))
for i in range(n):
    # print(a[i],cum[-1]-cum[i+1])
    ans+=a[i]*(cum[-1]-cum[i+1])%(10**9+7)
    ans%=(10**9+7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n=int(input())
a=list(map(int,input().split()))
ans=0
for a,b in itertools.combinations(a,2):
    ans+=(a*b)%(10**9+7)
print(ans%(10**9+7))


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=0
cum=[0]
for i in range(n):
    cum.append((cum[i]+a[i])%(10**9+7))
for i in range(n):
    # print(a[i],cum[-1]-cum[i+1])
    ans+=a[i]*(cum[-1]-cum[i+1])%(10**9+7)
    ans%=(10**9+7)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            if i != n // i:
                divisors.append([i,n//i])
            else:
                divisors.append([i,i])
    return divisors
l=make_divisors(x)
for x,y in l:
    for i in range(10**5):
        p=i-x
        if i**4+(i**3)*p+(i**2)*(p**2)+i*(p**3)+p**4==y:
            print(i,p)
            break

Fixed submission:
x=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            if i != n // i:
                divisors.append([i,n//i])
            else:
                divisors.append([i,i])
    return divisors
l=make_divisors(x)
for x,y in l:
    for i in range(10**4):
        p=i-x
        if i**4+(i**3)*p+(i**2)*(p**2)+i*(p**3)+p**4==y:
            print(i,p)
            break
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
    print(a.count(i))

Fixed submission:
import collections
n=int(input())
a=list(map(int,input().split()))
dic=collections.Counter(a)
for i in range(1,n+1):
    if i in dic.keys():
        print(dic[i])
    else:
        print(0)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

ans=0
k=int(input())
for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            ans+=gcd(a,b,c)
print(ans)

Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

ans=0
k=int(input())
for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            ans+=gcd(a,b,c)*6
for a in range(1,k+1):
        for c in range(a+1,k+1):
            b=a
            ans+=gcd(a,b,c)*3
for a in range(1,k+1):
        for c in range(a+1,k+1):
            b=c
            ans+=gcd(a,b,c)*3
print(ans+sum([i for i in range(1,k+1)]))