Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
ans = 0
for i in range(1000):
    c = [i // 100, (i // 10) % 10, i % 10]
    digit = 0
    for j in s:
        if c[digit] == int(j):
            digit+=1
        if digit == 3:
            break
    if digit == 3:
        ans += 1
print(ans)

Fixed submission:
m1,d1 = map(int,input().split())
m2,d2= map(int,input().split())
print(1) if d2 == 1 else print(0)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
ans = 0
for i in range(1000):
    c = [i // 100, (i // 10) % 10, i % 10]
    digit = 0
    for j in s:
        if c[digit] == int(j):
            digit+=1
        if digit == 3:
            break
    if digit == 3:
        ans += 1
print(ans)

Fixed submission:
m1,d1 = map(int,input().split())
m2,d2= map(int,input().split())
print(1) if d2 == 1 else print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
ans = 0
length = len(l)
l.sort()

for i in range(length-2):
    for j in range(i+1,length-1):
        for k in reversed(range(j+1,length)):
            if(l[k]<l[i]+l[j]):
                ans += k-j
                break
print(ans)

Fixed submission:
import bisect

n = int(input())
l = list(map(int, input().split()))
ans = 0
length = len(l)
l.sort()
 
for i in range(n):
    for j in range(i+1,n):
        k = bisect.bisect_left(l,l[i]+l[j])
        ans += max(k - (j+1),0)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
n = int(input())
ans = 0
for i in range(1,n):
    ans += i
print(ans)

Fixed submission:
# coding: utf-8
n = int(input())
ans = (n*(n-1))//2
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
lis_a = list(map(int, input().split()))
mod = 1000000007
ans = 0
temp = 0
for i in range(len(lis_a)-1):
    for j in range(len(lis_a)):
        if(lis_a[i] > lis_a[j]):
            temp += 1
ans = (k*(temp+temp*k)//2) % mod
    
print(ans)

Fixed submission:
m,d = map(int,input().split(" "))
ans = 0
for i in range(2,m+1):
    for j in range(2,d+1):
        if((j//10) * (j%10) == i and j//10 != 1 and j%10 != 1):
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

x = input()

if x == 'A':
	print('T')
elif x == 'T'
	print('A')
elif x == 'G'
	print('C')
elif x == 'C'
	print('G')

Fixed submission:
# coding: utf-8

x = input()

if x == 'A':
	print('T')
elif x == 'T':
	print('A')
elif x == 'G':
	print('C')
elif x == 'C':
	print('G')
Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())
ans = 0
for i in range(k+1):
	for j in range(k+1):
		z = s-x-y
		if(0 <= z and z <= k):
			ans += 1
print(ans)

Fixed submission:
k,s = map(int,input().split())
ans = 0
for i in range(k+1):
	for j in range(k+1):
		z = s-i-j
		if(0 <= z and z <= k):
			ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
def yesno(S):
  if S==AAA or S==BBB:
    return No
  else:
    return Yes
  
print(yesno(S))

Fixed submission:
def yesno(S):
  if S=="AAA" or S=="BBB":
    return "No"
  else:
    return "Yes"
  
S=input()
print(yesno(S))
Buggy python submission (verdict: Runtime Error):
import numpy as np

D, T, S = map(int, input().split())

if S*T >= D:
    print(Yes)
elif:
    print(No)

Fixed submission:
import numpy as np

D, T, S = map(int, input().split())

if S*T >= D:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
MOD = 1000000007

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

answer = 0
comb_list = list(itertools.combinations(A, 2))
for c in comb_list :
    answer += int(c[0]) * int(c[1]) 
print (answer % MOD)

Fixed submission:
MOD = 1000000007

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

answer = 0
s = sum(A)

for a in A:
    s -=a
    answer += (a * s)
print(answer%MOD)
Buggy python submission (verdict: Runtime Error):
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[1] + x[2] > x[0] and x[2] + x[0] >x[1]):
    if(x[0]!=x[1] and x[0]!=x[1] and x[2] != x[3]):
    	count +=1
print(count)

Fixed submission:
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]:
                if l[i] + l[j] > l[k]:
                    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
x = input()

if x >= 30:
  print('Yes')
elif x < 30:
  print('No')
else:
  print('No')

Fixed submission:
x = int(input())

if x >= 30:
  print('Yes')
elif x < 30:
  print('No')

Buggy python submission (verdict: Runtime Error):
x = input()

if x >= 30:
  print('Yes')
elif x < 30:
  print('No')

Fixed submission:
x = int(input())

if x >= 30:
  print('Yes')
elif x < 30:
  print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(input())
print(C[:C.count('R')].count("W"))


Fixed submission:
n = int(input())
C = input()
print(C[:C.count('R')].count("W"))
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n%10**3 != 0:
  return 1000 - n%10**3
else:
  return 0

Fixed submission:
n = int(input())
if n%1000 != 0:
    print(1000 - n%1000)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import math
N, X, T = map(int,input().zsplit())

a = math.ceil(N / X)
b = T * a

print(b)

Fixed submission:
import math
N, X, T = map(int, input().split())

a = math.ceil(N / X)
b = T * a

print(b)
Buggy python submission (verdict: Time Limit Exceeded):
def digits_of (n):
  digits = []
  while n != 0:
    r = n % 10
    digits.append(r)
    n = n // 10
  return digits

N = int(input())
S = 0
for i in digits_of(N):
  S += i

if S % 9 == 0:
  print('Yes')
else:
  print('No')

Fixed submission:
N = list(input())
S = 0
for i in N:
  S += int(i)

if S % 9 == 0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

M, D = map(int, input().split())
count = 0

for i in range(1, M+1):
    for j in range(1, D+1):
        d_1 = int(str(j).zfill(len(str(M)))[-1])
        d_10 = int(str(j).zfill(len(str(M)))[-2])
        if d_10 > 1 and d_1 >1 and d_10 * d_1 == i:
            count += 1

print(count)

Fixed submission:
# -*- coding: utf-8 -*-

M, D = map(int, input().split())
count = 0

for i in range(1, M+1):
    di = len(str(i))
    for j in range(1, D+1):
        d_10 = j // 10
        d_1 = j % 10
        if d_10 >= 2 and d_1 >= 2 and d_10 * d_1 == i:
            count += 1

print(count)
Buggy python submission (verdict: Runtime Error):

r=[]
import sys

n = int(sys.stdin.readline())
sn = sys.stdin.read().split()

d={}
for i in l:
    if i in d:
        d[i]+=1
    else:
        d[i]=1

m = max(d.values())
for key,value in d.items():
    if value==m:
        r.append(key)
sorted_r = sorted(r)
print(*sorted_r,sep='\n')

Fixed submission:
l =[]
r=[]
n = int(input())
for i in range(n):
    l.append(input())
d={}
for i in l:
    if i in d:
        d[i]+=1
    else:
        d[i]=1
print()
m = max(d.values())
for key,value in d.items():
    if value==m:
        r.append(key)
sorted_r = sorted(r)
print(*sorted_r,sep='\n')

Buggy python submission (verdict: Runtime Error):

r=[]
import sys

n = int(sys.stdin.readline())
sn = sys.stdin.read().split()

d={}
for i in l:
    if i in d:
        d[i]+=1
    else:
        d[i]=1

m = max(d.values())
for key,value in d.items():
    if value==m:
        r.append(key)
sorted_r = sorted(r)
print(*sorted_r,sep='\n')

Fixed submission:
l =[]
r=[]
n = int(input())
for i in range(n):
    l.append(input())
d={}
for i in l:
    if i in d:
        d[i]+=1
    else:
        d[i]=1
print()
m = max(d.values())
for key,value in d.items():
    if value==m:
        r.append(key)
sorted_r = sorted(r)
print(*sorted_r,sep='\n')
Buggy python submission (verdict: Runtime Error):
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = counter(l)
m = max(c.values())

if(m==1):
    print("YES")
else:
    print("NO")

Fixed submission:
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = Counter(l)
m = max(c.values())

if(m==1):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = counter(l)
m = max(c.value())

if(m==1):
    print("YES")
else:
    print("NO")

Fixed submission:
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = Counter(l)
m = max(c.values())

if(m==1):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input())
flag = 1
l = []
for i in range(n):
    a = int(input())
    if a in l:
        flag = 0
        break
    else:
        l.append(a)
if(flag==1):
    print("YES")
else:
    print("NO")

Fixed submission:
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = Counter(l)
m = max(c.values())

if(m==1):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(x, y):
    x = x % y
    if x == 0:
        return y
    return gcd(y, x)

def lcm(x, y):
    return x // gcd(x, y) * y
n = int(input())
a = list(map(int, input().split(' ')))
l = 1
for ai in a:
    l = lcm(l, ai)
mod = 1000000007
ans = 0
for ai in a:
    ans += l // ai
ans %= mod
print(ans)


Fixed submission:
def gcd(x, y):
    x = x % y
    if x == 0:
        return y
    return gcd(y, x)

def lcm(x, y):
    return x // gcd(x, y) * y
n = int(input())
a = list(map(int, input().split(' ')))
l = 1
for ai in a:
    l = lcm(l, ai)
mod = 1000000007
ans = 0
for ai in a:
    ans += l // ai
ans %= mod
print(ans)

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

def lcm(x, y):
    return x // math.gcd(x, y) * y
n = int(input())
a = list(map(int, input().split(' ')))
l = 1
for ai in a:
    l = lcm(l, ai)
mod = 1000000007
ans = 0
for ai in a:
    ans += l // ai
ans %= mod
print(ans)


Fixed submission:
def gcd(x, y):
    x = x % y
    if x == 0:
        return y
    return gcd(y, x)

def lcm(x, y):
    return x // gcd(x, y) * y
n = int(input())
a = list(map(int, input().split(' ')))
l = 1
for ai in a:
    l = lcm(l, ai)
mod = 1000000007
ans = 0
for ai in a:
    ans += l // ai
ans %= mod
print(ans)
Buggy python submission (verdict: Runtime Error):
def main():
    s = input()
    c = 0
    if s[0] == s[1] == s[2] == "R":
            print(3)
        return
    if s[0] == s[1] == "R" or s[1] == s[2] == "R":
        print(2)
        return
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return

    print(1)
    return

main()



Fixed submission:
def main():
    s = input()
    c = 0
    if s[0] == s[1] == s[2] == "R":
        print(3)
        return
    if s[0] == s[1] == "R" or s[1] == s[2] == "R":
        print(2)
        return
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return

    print(1)
    return

main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().strip().split()))

r = 1
for tt in t:
    r *= tt

rr = r - 10**18
if rr > 0:
    print(-1)
else:
    print(r)

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

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

r = 1
for tt in t:
    r *= tt

if r > 10**18:
    print(-1)
else:
    print(r)

Fixed submission:
def main():
    n = int(input())
    t = list(map(int, input().strip().split()))

    r = 1
    if 0 in t:
        print(0)
        return

    for tt in t:
        r *= tt
        if r > 10**18:
            print(-1)
            return

    print(r)

main()
Buggy python submission (verdict: Runtime Error):
def main():
    s = input()
    s1 = s[:int((len(s)-1)/2)]
    s2 = s[int((len(s)+3)/2-1):]
    rs1 = s1[::-1]
    rs2 = s2[::-1]

    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
    
    return
    
main()
a

Fixed submission:
def main():
    s = input()
    s1 = s[:int((len(s)-1)/2)]
    s2 = s[int((len(s)+3)/2-1):]
    rs = s[::-1]
    rs1 = s1[::-1]
    rs2 = s2[::-1]


    if s1 == rs1 and s2 == rs2 and s == rs:
        print("Yes")
    else:
        print("No")
    
    return
    
main()
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
j = -1
for t in range(1009):
    if int(t*0.08) == a and int(t*0.1) == b:
        j = t
        break

print(j)


Fixed submission:
while True:
    sta = input()
    if len(sta) == 3:
        break

judge = ""
count = 0
result = ""
station = [sta[0], sta[1], sta[2]]
for ss in station:
    if count == 0:
        judge = ss
    else:
        if ss == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
        flag = False
    else:
        for y in range(b):
            l += "r"
        flag = True

    if len(l) >= n:
        break
         
for c in l:
    if c == "b":
        count += 1

print(count)


Fixed submission:
while True:
    sta = input()
    if len(sta) == 3:
        break

judge = ""
count = 0
result = ""
station = [sta[0], sta[1], sta[2]]
for ss in station:
    if count == 0:
        judge = ss
    else:
        if ss == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
            if len(l) == n:
                break
        flag = False
    else:
        for y in range(b):
            l += "r"
            if len(l) == n:
                break
        flag = True

    if len(l) >= n:
        break
         
for c in l:
    if c == "b":
        count += 1

print(count)


Fixed submission:
while True:
    sta = input()
    if len(sta) == 3:
        break

judge = ""
count = 0
result = ""
station = [sta[0], sta[1], sta[2]]
for ss in station:
    if count == 0:
        judge = ss
    else:
        if ss == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
sta = input("station:")

while len(sta) == 3:
    judge = ""
    count = 0
    result = ""
    for s in sta:
        if count == 0:
            judge = s
            count += 1
        else:
            if s == judge:
                result = "No"
            else:
                result = "Yes"

Fixed submission:
while True:
    sta = input()
    if len(sta) == 3:
        break

judge = ""
count = 0
result = ""
station = [sta[0], sta[1], sta[2]]
for ss in station:
    if count == 0:
        judge = ss
    else:
        if ss == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split())
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
            if len(l) == n:
                break
        flag = False
    else:
        for y in range(b):
            l += "r"
            if len(l) == n:
                break
        flag = True

    if len(l) >= n:
        break

         
for c in l:
    if c == "b":
        count += 1

print(count)


Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split())
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
        flag = False
    else:
        for y in range(b):
            l += "r"
        flag = True

    if len(l) >= n:
        break
    
for c in range(n):
    if l[c] == "b":
        count += 1

print(count)


Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n, a, b = map(int, input().split())
    if 1 <= n <= 10**18 and 0 <= a + b <= 10**18:
        break
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
        flag = False
    else:
        for y in range(b):
            l += "r"
        flag = True

    if len(l) >= n:
        break
    
for c in range(n):
    if l[c] == "b":
        count += 1

print(count)


Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n, a, b = map(int, input().split())
    if 1 <= n <= 10**18 and 0 <= a + b <= 10**18:
        break
    
l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
        flag = False
    else:
        for y in range(b):
            l += "r"
        flag = True

    if len(l) >= n:
        for c in range(n):
            if l[c] == "b":
                count += 1
        break

print(count)


Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)

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

l = ""
flag = True
count = 0
while True:
    if flag == True:
        for x in range(a):
            l += "b"
        flag = False
    else:
        for y in range(b):
            l += "r"
        flag = True

    if len(l) >= n:
        for c in range(n):
            if l[c] == "b":
                count += 1
        break

print(count)


Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)
Buggy python submission (verdict: Runtime Error):
2000 20 100

Fixed submission:
d, t, s = [list(map(int, s.split())) for s in open(0)][0]
if t >= d/s:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
h, w, n = [list(map(int, s.split()))[0] for s in open(0)]
print min(int((n-1)//h+1), int((n-1)//w+1))

Fixed submission:
h, w, n = [list(map(int, s.split()))[0] for s in open(0)]
print(min(int((n-1)//h+1), int((n-1)//w+1)))
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
ans = set(range(1,n+1))
for i in range(m):
  l, r = map(int, input().split())
  x = set(range(l, r+1))
  ans = ans & x
print(len(ans))

Fixed submission:
n, m = map(int, input().split())
x = [1, n]
for i in range(m):
  l, r = map(int, input().split())
  x[0] = max(x[0], l)
  x[1] = min(x[1], r)
print(max(x[1] - x[0] + 1, 0))
Buggy python submission (verdict: Time Limit Exceeded):
F = [0, 0, 1]
    
while True:
    try:
        N = int(input())
        
        if N > len(F) - 1:
            for i in range(len(F), N+1):
                F.append(F[i-1] + i - 1)
        
        print(F[N])
    except:
        break

Fixed submission:
R = [0, 0, 1]
while True:
    try:
        N = int(input())
        
        if N <= 2:
            print(R[N])
        else:
            print((N-1)*(N-2)//2 + N - 1)
    except:
        break
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    try:
        N, M = map(int, input().split())
        a = [int(input()) for _ in range(M)]
        
        if (1 in a):
            f = [1, 0]
        else:
            f = [1, 1]
            
        for i in range(2, N+1):
            if i in a:
                f.append(0)
            else:
                f.append((f[i-1] + f[i-2])%1000000007)
        
        print(f[N])
    except:
        break

Fixed submission:
mod = 1000000007

while True:
    try:
        N, M = map(int, input().split())
        
        # check obstacles: O(1)
        a = [0] * (N+1)
        for _ in range(M):
            a[int(input())] = 1
        
        dp = [0] * (N+1)
        dp[0] = 1
        dp[1] = 0 if a[1] else 1
        
        for i in range(2, N+1):
            if a[i]:
                dp[i] = 0
            else:
                dp[i] = dp[i-1] + dp[i-2]
        
        print(dp[N] % mod)
    except:
        break

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    try:
        N, M = map(int, input().split())
        a = [int(input()) for _ in range(M)]
        
        if (1 in a):
            f = [1, 0]
        else:
            f = [1, 1]
            
        for i in range(2, N+1):
            if i in a:
                f.append(0)
            else:
                f.append(f[i-1] + f[i-2])
        
        print(f[N]%1000000007)
    except:
        break

Fixed submission:
mod = 1000000007

while True:
    try:
        N, M = map(int, input().split())
        
        # check obstacles: O(1)
        a = [0] * (N+1)
        for _ in range(M):
            a[int(input())] = 1
        
        dp = [0] * (N+1)
        dp[0] = 1
        dp[1] = 0 if a[1] else 1
        
        for i in range(2, N+1):
            if a[i]:
                dp[i] = 0
            else:
                dp[i] = dp[i-1] + dp[i-2]
        
        print(dp[N] % mod)
    except:
        break
Buggy python submission (verdict: Runtime Error):
N,M=map(int, input().split())
yoi = []
for i in range(N):
  yoi.append(True)
H=list(map(int, input().split()))
for i in ranage(M):
  A,B=map(int, input().split())
  if H[A-1]<=H[B-1]: yoi[A-1]=False
  if H[B-1]<=H[A-1]: yoi[B-1]=False 
print(len([1 for x in yoi if x==True]))

Fixed submission:
N,M=map(int, input().split())
yoi = []
for i in range(N):
  yoi.append(True)
H=list(map(int, input().split()))
for i in range(M):
  A,B=map(int, input().split())
  if H[A-1]<=H[B-1]: yoi[A-1]=False
  if H[B-1]<=H[A-1]: yoi[B-1]=False 
print(len([1 for x in yoi if x==True]))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int, input().split()))
for i in range(1,N+1):
  print(len([1 for x in A if x==i]))

Fixed submission:
import numpy as np
N=int(input())
A_np = np.zeros(N)
A=list(map(int, input().split()))
for Ai in A:
  A_np[Ai-1] = A_np[Ai-1] + 1
for i in range(N):
  print('{:.0f}'.format(A_np[i]))

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
for i in [1:N+1]:
  print(len([1 for x in A if x==i]))

Fixed submission:
import numpy as np
N=int(input())
A_np = np.zeros(N)
A=list(map(int, input().split()))
for Ai in A:
  A_np[Ai-1] = A_np[Ai-1] + 1
for i in range(N):
  print('{:.0f}'.format(A_np[i]))
Buggy python submission (verdict: Runtime Error):
import fractions
K=int(input())
total = 0

for a in range(K):
  for b in range(a,K):
    for c in range(b,K):
      total += fractsion.gcd(a+1, fractions.gcd(b+1,c+1) )
total *= 6

for a in range(K):
  for b in range(a,K):
    total += fractions.gcd(a+1, b+1)
total *= 6

for a in range(K):
  total += (a+1)

print(total)

Fixed submission:
import math
K=int(input())
total = 0

for a in range(1,K+1):
  for b in range(a+1,K+1):
    for c in range(b+1,K+1):
      total += math.gcd(a, math.gcd(b,c) ) * 6
      
for a in range(1,K+1):
  for b in range(a+1,K+1):
    total += math.gcd(a, b)*6

for a in range(1,K+1):
  total += a

print(total)

Buggy python submission (verdict: Time Limit Exceeded):
import math
K=int(input())
ans = 0
for i1 in range(1,1+K):
  for i2 in range(1,1+K):
    for i3 in range(1,1+K):
      ans = ans + math.gcd(math.gcd(i1,i2),i3)
print(ans)

Fixed submission:
import math
K=int(input())
total = 0

for a in range(1,K+1):
  for b in range(a+1,K+1):
    for c in range(b+1,K+1):
      total += math.gcd(a, math.gcd(b,c) ) * 6
      
for a in range(1,K+1):
  for b in range(a+1,K+1):
    total += math.gcd(a, b)*6

for a in range(1,K+1):
  total += a

print(total)