Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
mod =10**9+7
n,a,b = map(int,input().split())
ans = 2**n-1
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
ans -= cmb(n,a) + cmb(n,b)
print(ans%mod)

Fixed submission:
mod =10**9+7
n,a,b = map(int,input().split())
ans = pow(2,n,mod)-1
def cmb(n,k):
    x,y = 1,1
    for i in range(k):
        x = x * (n-i) % mod
        y = y * (k-i) % mod
    return x * pow(y, mod-2, mod) % mod
ans -= cmb(n,a) + cmb(n,b)
print(ans%mod)

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

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

ans -= cmb(n,a)+cmb(n,b)

print(ans%(10**9+7))

Fixed submission:
mod =10**9+7
n,a,b = map(int,input().split())
ans = pow(2,n,mod)-1
def cmb(n,k):
    x,y = 1,1
    for i in range(k):
        x = x * (n-i) % mod
        y = y * (k-i) % mod
    return x * pow(y, mod-2, mod) % mod
ans -= cmb(n,a) + cmb(n,b)
print(ans%mod)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = list(map(int,input().split()))
ans = 1
for i in range(1,n):
    if x[i] == min(x[:i+1]):
        ans += 1
print(ans)


Fixed submission:
n = int(input())
x = list(map(int,input().split()))
ans = 1
b = x[0]
for i in range(1,n):
    if x[i] < b:
        ans += 1
        b = x[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
import string
s = input()
x = string.ascii_letters
for i in range(len(x)):
    if x[i] == s:
        print(x[i;1])
        break

Fixed submission:
import string
s = input()
x = string.ascii_letters
for i in range(len(x)):
    if x[i] == s:
        print(x[i+1])
        break
Buggy python submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
def lcm(x, y):
    return int((x * y) / math.gcd(x, y))

print(lcm(a, b))

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

Buggy python submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
def lcm(x, y):
    return int((x * y) / math.gcd(x, y))

print(lcm(a, b))

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

Buggy python submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Fixed submission:
import fractions
a,b = map(int,input().split())
print(int((a * b) / fractions.gcd(a, b)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(input())

a = [chr(i) for i in range(65, 65+26)]
b = [chr(i) for i in range(65+N, 65+26)]
for i in range(N):
    b.append(a[i])

a_dict = {}
for i in range(len(a)) :
    a_dict[a[i]] = b[i]
for i in range(len(S)) :
    S[i] = a_dict[S[i]]

print(''.join(S))

Fixed submission:
s = input()
week = {'FRI': 2,'THU': 3,'WED': 4,'TUE':5,'MON':6,'SAT':1,'SUN':7}
print(week[s])
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [*input()]

a = [chr(i) for i in range(65, 65+26)]
b = [chr(i) for i in range(65+N, 65+26)]
for i in range(N):
    b.append(a[i])

a_dict = {}
for i in range(len(a)) :
    a_dict[a[i]] = b[i]
for i in range(len(S)) :
    S[i] = a_dict[S[i]]

print(''.join(S))

Fixed submission:
N = int(input())
S = list(input())

a = [chr(i) for i in range(65, 65+26)]
b = [chr(i) for i in range(65+N, 65+26)]
for i in range(N):
    b.append(a[i])

a_dict = {}
for i in range(len(a)) :
    a_dict[a[i]] = b[i]
for i in range(len(S)) :
    S[i] = a_dict[S[i]]

print(''.join(S))
Buggy python submission (verdict: Runtime Error):
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x**2 == s :
    ans = math.degrees(math.atan(b/a))
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)


Fixed submission:
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x == s :
    ans = 0
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x**2 == s :
    ans = 90
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)


Fixed submission:
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x == s :
    ans = 0
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 <= s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)


Fixed submission:
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x == s :
    ans = 0
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
k = 0
g = 0
for i in range(1,n+1) :
    if i % 2 == 0:
        g += 1
    else :
        k += 1
print(k/(g+k))

Fixed submission:
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
for m in a :
    if m >= k :
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
def move(a):
    for i in range(len(a)-1):
        if a[i] < a[i+1]:
            a[i],a[i+1] = a[i+1],a[i]
        else:
            break
    return a
for i in range(m):
    a[0] //= 2
    a = move(a)
ans = 0
for x in a:
    ans += x
print(ans)


Fixed submission:
import heapq
n,m = map(int,input().split())
a = list(map(lambda x: int(x)*(-1),input().split()))
a.sort(reverse=True)
heapq.heapify(a)
for i in range(m):
    x = -heapq.heappop(a)
    x //= 2
    heapq.heappush(a,-x)
print(-sum(a))
Buggy python submission (verdict: Runtime Error):
n = int(input())
print(int(n*(n-1)/2)

Fixed submission:
n = int(input())
print(n*(n-1)//2)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [''.join(sorted(input())) for i in range(n)]
b = []
ans = 0
for i in range(n) :
    x = a[i]
    if x in b :
        ans += b.count(x)
        b.append(x)
    else :
        b.append(x)
print(ans)


Fixed submission:
n = int(input())
a = [''.join(sorted(input())) for i in range(n)]
ans = 0
count = 0
a.sort()
for i in range(1,n) :
    if a[i] == a[i-1] :
        count += 1
        ans += count
    else :
        count = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [sorted(input()) for i in range(n)]
b = []
ans = 0
for i in range(n) :
    x = ''.join(a[i])
    if x in b :
        ans += b.count(x)
        b.append(x)
    else :
        b.append(x)
print(ans)

Fixed submission:
n = int(input())
a = [''.join(sorted(input())) for i in range(n)]
ans = 0
count = 0
a.sort()
for i in range(1,n) :
    if a[i] == a[i-1] :
        count += 1
        ans += count
    else :
        count = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for i in range(n)]
b = [num for num in a]
x = max(a)
for i in range(n) :
    if a[i] != x :
        print(x)
    else :
        b.remove(a[i])
        print(max(b))
        b.append(a[i])

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
x = max(a)
m = a.index(x)
a.remove(x)
y = max(a)
for i in range(n) :
    if i == m :
        print(y)
    else :
        print(x)
Buggy python submission (verdict: Runtime Error):
import ractions
a,b,c,d = map(int,input().split())
x = b//c + b//d - b//(c*d//ractions.gcd(c,d))
y = (a-1)//c + (a-1)//d - (a-1)//(c*d//ractions.gcd(c,d))
print(b-(a-1)-x+y)


Fixed submission:
import fractions
a,b,c,d = map(int,input().split())
x = b//c + b//d - b//(c*d//fractions.gcd(c,d))
y = (a-1)//c + (a-1)//d - (a-1)//(c*d//fractions.gcd(c,d))
print(b-(a-1)-x+y)

Buggy python submission (verdict: Runtime Error):
import math
a,b,c,d = map(int,input().split())
x = b//c + b//d - b//(c*d//math.gcd(c,d))
y = (a-1)//c + (a-1)//d - (a-1)//(c*d//math.gcd(c,d))
print(b-(a-1)-x+y)


Fixed submission:
import fractions
a,b,c,d = map(int,input().split())
x = b//c + b//d - b//(c*d//fractions.gcd(c,d))
y = (a-1)//c + (a-1)//d - (a-1)//(c*d//fractions.gcd(c,d))
print(b-(a-1)-x+y)
Buggy python submission (verdict: Runtime Error):
n,x = map(int,input().split())
l = list(map(int,input().split()))
a =[0]
ans = n+1
for i in range(n):
    s = a[i] + l[i]
    if s > x:
        ans = i+1
    else:
        a.append(s)
print(ans)

Fixed submission:
n,x = map(int,input().split())
l = list(map(int,input().split()))
a =[0]
ans = n+1
for i in range(n):
    s = a[i] + l[i]
    if s > x:
        ans = i+1
        break
    else:
        a.append(s)
print(ans)
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split())).sort()
print(a[0]+a[1])

Fixed submission:
a = sorted(list(map(int,input().split())))
print(a[0]+a[1])
Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
    a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
    a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))
a.append(0)
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2])%mod
    if a[0] == i :
        dp[i] = 0
        a.pop(0)
print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
    a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2])%mod
    if i in a :
        dp[i] = 0
print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
    a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])
Buggy python submission (verdict: Runtime Error):
n  = int(input())
a = list(map(int,input().split()))
ans = 0
mn = 0
for i in range(n):
    if a[i] < 0:
        mn += 1
        a[i] = abs(a[i])
    ans += a[i]
if 0 in a or mn%2 = 0:
    print(ans)
else:
    print(ans - 2*min(a))

Fixed submission:
n  = int(input())
a = list(map(int,input().split()))
ans = 0
mn = 0
for i in range(n):
    if a[i] < 0:
        mn += 1
        a[i] = abs(a[i])
    ans += a[i]
if 0 in a or mn%2 == 0:
    print(ans)
else:
    print(ans - 2*min(a))
Buggy python submission (verdict: Runtime Error):
a=input()

print(int(a+a**2+a**3))

Fixed submission:
a=int(input())
 
b=a+(a**2)+(a**3)
print(b)
Buggy python submission (verdict: Runtime Error):
a, b, c, d, e=(int(x) in input().split())
list=[a, b, c, d, e]
for num in list:
  if num=1:
    print((list.index(num))+1)
    

Fixed submission:
a,b,c,d,e=(int(x) for x in input().split())
if a==0:
  print(1)
elif b==0:
  print(2)
elif c==0:
  print(3)
elif d==0:
  print(4)
elif e==0:
  print(5)

Buggy python submission (verdict: Runtime Error):
def sunuke(a, b, c, d, e):
  a, b, c, d, e=(int(x) for x input().split())
  list=[a, b, c, d, e]
  for num in list:
    if num==1:
      print(list.index(num)+1)
  

Fixed submission:
a,b,c,d,e=(int(x) for x in input().split())
if a==0:
  print(1)
elif b==0:
  print(2)
elif c==0:
  print(3)
elif d==0:
  print(4)
elif e==0:
  print(5)

Buggy python submission (verdict: Runtime Error):
def sunukeaho(a, b, c, d, e):
	input("番号を入力しろ")
    if a==o:
    	print(1)
	elif b==o:
    	print(1)
	elif c==o:
    	print(1)
	elif d==o:
    	print(1)
    elif e==o:
    	print(1)
   
  
  

Fixed submission:
a,b,c,d,e=(int(x) for x in input().split())
if a==0:
  print(1)
elif b==0:
  print(2)
elif c==0:
  print(3)
elif d==0:
  print(4)
elif e==0:
  print(5)
Buggy python submission (verdict: Runtime Error):
i = list(map(int, input().split()))
if A > 10 or B > 10:
  print('-1')
else:
  print('A * B')

Fixed submission:
a = list(map(int,input().split()))
if a[0] >= 10 or a[1] >= 10:
  print('-1')
else:
  print(a[0] * a[1])

Buggy python submission (verdict: Runtime Error):
i = list(map(int, input().split()))
if A > 10 or B > 10:
  print('1')
else:
  print('A * B')

Fixed submission:
a = list(map(int,input().split()))
if a[0] >= 10 or a[1] >= 10:
  print('-1')
else:
  print(a[0] * a[1])

Buggy python submission (verdict: Runtime Error):
s = input().split()
if A > 10 or B > 10:
  print(1)
else:
  print(A * B)

Fixed submission:
a = list(map(int,input().split()))
if a[0] >= 10 or a[1] >= 10:
  print('-1')
else:
  print(a[0] * a[1])

Buggy python submission (verdict: Runtime Error):
s = input().split()
if A > 10 or B > 10:
  print(1)
else:
  print(a * b)

Fixed submission:
a = list(map(int,input().split()))
if a[0] >= 10 or a[1] >= 10:
  print('-1')
else:
  print(a[0] * a[1])
Buggy python submission (verdict: Runtime Error):
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(math.floor(i))
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i += 1
  a = int(a * 1.01)
  
  
print(math.floor(a))
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i += 1
  a = int(a * 1.01)
  
  
print(math.floor(i))
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i += 1
  a += 1.01
  
  
print(math.floor(i))
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i+ = 1
  a *= 1.01
  
  
print(math.floor(i))
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i+ = 1
  a+ = i
  
  
print(x/i)
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < x:
  i+ = 1
  a+ = i
  
  
print(i)
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < X:
  
  i+ = a
  a+ = 1
print(a)
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)

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

a = 100
i = 0

while a < 18:
  print("a="+str(a))
  i+ = a
  a+ = 1

print(x/a)
  



Fixed submission:
x = int(input())

a = 100
i = 0

while a < x:
  i += 1
  a += a // 100
  
  
print(i)
Buggy python submission (verdict: Runtime Error):
S = input()

if S == 'Sunny':
  print(Cloudy)
  
if S == 'Cloudy':
  print(Rainy)
  
if S == 'Rainy':
  print(Sunny)


Fixed submission:
S = input()

if S == 'Sunny':
  print('Cloudy')
  
if S == 'Cloudy':
  print('Rainy')
  
if S == 'Rainy':
  print('Sunny')

Buggy python submission (verdict: Runtime Error):
S = int(input())

if S == 'Sunny':
  print(Cloudy)
  
if S == 'Cloudy':
  print(Rainy)
  
if S == 'Rainy':
  print(Sunny)

Fixed submission:
S = input()

if S == 'Sunny':
  print('Cloudy')
  
if S == 'Cloudy':
  print('Rainy')
  
if S == 'Rainy':
  print('Sunny')
Buggy python submission (verdict: Runtime Error):

def main():
  a = int(input())
  b = input()
  l = b.split()
  ll = []
  for i in range(0,a * 2):
    str = (b[0] + b[1])[i::4]
    str1 += str
  print(str1)

if __name__ == '__main__':
  main()

Fixed submission:
def main():
  a = int(input())
  b = input()
  l = b.split()
  d = a * 2
  str1 = []
  s = "".join(i+j for i, j in zip(l[0],l[1]))
  print(s)
 
if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
import math

a = input().split()
a = list(map(int, a))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(a[0],a[1]))

Fixed submission:
import fractions

a = input().split()
a = list(map(int, a))
def lcm(x, y):
    return (x * y) // fractions.gcd(x,y)
print(lcm(a[0],a[1]))
Buggy python submission (verdict: Runtime Error):
s= input()
print (s+s**2+s**3)

Fixed submission:
s = int(input())
print(s+s**2+s**3)
Buggy python submission (verdict: Runtime Error):
t_hp,t_at,a_hp,a_at=input().split()
while(int(t_hp) > 0 and int(a_hp) > 0):
  int(a_hp) -= int(t_at)
  if int(a_hp) <= 0:
    print("Yes")
    break
  int(t_hp) -= int(a_at)
  if int(t_hp <= 0:
         print("No")
         break

Fixed submission:
t_hp,t_at,a_hp,a_at=map(int,input().split())
while(t_hp > 0 and a_hp > 0):
  a_hp -= t_at
  if a_hp <= 0:
    print("Yes")
    break
  t_hp -= a_at
  if t_hp <= 0:
         print("No")
         break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
al = []
count = 0
for i in range(n):
  a = input()
  if a in al:
      pass
  else:
    count += 1
    al.append(a)
print(count)

Fixed submission:
s = set(open(0))
print(len(s)-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
al = []
count = 1
for i in range(n):
  a = input()
  if a　in al:
    count += 1
  else:
    al.append(a)
print(count)

Fixed submission:
s = set(open(0))
print(len(s)-1)
Buggy python submission (verdict: Runtime Error):
s = list(open(0))
s = input()

j = [0]*int(s)

a = list(map(int,input().split()))
for i in  range(int(s)-1):
    j[a[i]] += 1
for i in range(len(j)-1):
    print(j[(i+1)])

print(0)

Fixed submission:
s = input()

j = [0]*int(s)

a = list(map(int,input().split()))
for i in  range(int(s)-1):
    j[a[i]] += 1
for i in range(len(j)-1):
    print(j[(i+1)])

print(0)

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

for j in range(len(a)):
    s = a.count(j+1)
    print(s)
print(0)

Fixed submission:
s = input()

j = [0]*int(s)

a = list(map(int,input().split()))
for i in  range(int(s)-1):
    j[a[i]] += 1
for i in range(len(j)-1):
    print(j[(i+1)])

print(0)
Buggy python submission (verdict: Runtime Error):
N,M = input().split()
l = [0]*int(N) #flg
m = [0]*int(N) #counter
c =0

for i in range(int(M)+1):
    p,s = input().split()
    if s =="AC":
        if l[int(p)-1]==1:
            pass
        else:
            l[int(p)-1] = 1
            c += m[int(p)-1]
    elif s == "WA":
        m[int(p)-1] += 1



print(l.count(1),c)





Fixed submission:
N,M = input().split()
l = [0]*int(N) #flg
m = [0]*int(N) #counter
c =0

for i in range(int(M)):
    p,s = input().split()
    if s =="AC":
        if l[int(p)-1]==1:
            pass
        else:
            l[int(p)-1] = 1
            c += m[int(p)-1]
    elif s == "WA":
        m[int(p)-1] += 1



print(l.count(1),c)
Buggy python submission (verdict: Runtime Error):
import math
a=int(input())
b=int(input())
h=int(input())
m=int(input())
rad=abs(math.radians(30*h-6*m))
if(rad>180):
    rad=2*math.pi()-rad
ans=a**2+b**2-2*a*b*math.cos(rad)
print(math.sqrt(ans))

Fixed submission:
import math
a,b,h,m=map(int,input().split())
rad=abs(math.radians(30*(h+m/60)-6*m))
# if(rad>180):
#     rad=2*math.pi()-rad
ans=a**2+b**2-2*a*b*math.cos(rad)
print(math.sqrt(ans))
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
def num_div(n) : 
    cnt = 0
    for i in range(1, (int)(math.sqrt(n)) + 1) : 
        if (n % i == 0) : 
            if (n / i == i) : 
                cnt = cnt + 1
            else :
                cnt = cnt + 2 
    return cnt*n 
s = 0
for i in range(1, n+1):
    s+=num_div(i)
print(s)


Fixed submission:
n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(n):
    a.append(a[i] + A[i])
for i in range(m):
    b.append(b[i] + B[i])
c = 0
f = m
for i in range(n+1):
    if a[i]>k:
        break
    while a[i]+b[f]>k:
        f-=1
    c = max(c, i+f)
print(c)