Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

n = int(input())

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

a_n = np.array(a)

for i in range(n):
    b = np.where(a_n == i+1, 1, 0)
    print(b.sum())

Fixed submission:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

n = int(input())

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

a_n = np.array(a)
cnt_np = np.zeros(n)

for an in a:
    cnt_np[an-1] += 1
for cnt in cnt_np:
    print(int(cnt))
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

l3 = l / 3

print(l3**3)

Fixed submission:
l = int(input())

print((l/3)**3)
Buggy python submission (verdict: Time Limit Exceeded):
# TLE
import sys
import numpy as np

# input = sys.stdin.readline

s = list(input())

n = int(input())

reverse = False
for ii in range(n):
    q = input()
#     print("".join(s))
    if q[0] == "1":
        reverse += 1
        reverse %= 2
#         s = s[::-1]
    else:
        t, f, c = q.split()
        if f == "1":
            if reverse:
                s.append(c)
            else:
                s.insert(0, c)
        else:
            if reverse:
                s.insert(0, c)
            else:
                s.append(c)
if reverse:
    s = s[::-1]
print("".join(s))

Fixed submission:
# TLE
import sys
import numpy as np
from collections import deque

# input = sys.stdin.readline

s = list(input())

n = int(input())

d = deque(s)

reverse = False
for ii in range(n):
    q = input()
#     print("".join(s))
    if q[0] == "1":
        reverse += 1
        reverse %= 2
#         s = s[::-1]
    else:
        t, f, c = q.split()
        if f == "1":
            if reverse:
                d.append(c)
            else:
                d.appendleft(c)
        else:
            if reverse:
                d.appendleft(c)
            else:
                d.append(c)
                
if reverse:
    d.reverse()
print("".join(d))

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

# input = sys.stdin.readline

s = list(input())

n = int(input())

for ii in range(n):
    q = input()
#     print("".join(s))
    if q[0] == "1":
        s = s[::-1]
    else:
        t, f, c = q.split()
        if f == "1":
            s.insert(0, c)
        else:
            s.append(c)
print("".join(s))

Fixed submission:
# TLE
import sys
import numpy as np
from collections import deque

# input = sys.stdin.readline

s = list(input())

n = int(input())

d = deque(s)

reverse = False
for ii in range(n):
    q = input()
#     print("".join(s))
    if q[0] == "1":
        reverse += 1
        reverse %= 2
#         s = s[::-1]
    else:
        t, f, c = q.split()
        if f == "1":
            if reverse:
                d.append(c)
            else:
                d.appendleft(c)
        else:
            if reverse:
                d.appendleft(c)
            else:
                d.append(c)
                
if reverse:
    d.reverse()
print("".join(d))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np

n, k = map(int, input().split())

p = np.array([list(map(int, input().split()))]).reshape(-1)

sum_max = 0
index_max = -1
for i in range(n-k+1):
    mx = np.sum(p[i:i+k])
    if mx > sum_max:
        sum_max = mx
        index_max = i
print(str((sum_max+k) / 2))

Fixed submission:
import sys
import numpy as np

n, k = map(int, input().split())

p = np.array([list(map(int, input().split()))]).reshape(-1)

sum_max = p[:k].sum()
mx = sum_max
index_max = -1
for i in range(1, n-k+1):
    mx += p[i+k-1]
    mx -= p[i-1]
    if mx > sum_max:
        sum_max = mx
        index_max = i
print(str((sum_max+k) / 2))

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

n, k = map(int, input().split())

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

p_a = 0
for i in range(n-k+1):
    p_r = p[i:i+k]
    p_b = 0
    for j in p_r:
        if j == 1:
            p_b += 1
        else:
            p_b += (j + 1) / 2
    if p_b > p_a:
        p_a = p_b
print(p_a)

Fixed submission:
import sys
import numpy as np

n, k = map(int, input().split())

p = np.array([list(map(int, input().split()))]).reshape(-1)

sum_max = p[:k].sum()
mx = sum_max
index_max = -1
for i in range(1, n-k+1):
    mx += p[i+k-1]
    mx -= p[i-1]
    if mx > sum_max:
        sum_max = mx
        index_max = i
print(str((sum_max+k) / 2))
Buggy python submission (verdict: Time Limit Exceeded):
S, Q = map(int, input().split())
S = input()
qn = [list(map(int, input().split())) for _ in range(Q)]
for q in qn:
    print(S.count("AC", q[0]-1, q[1]))


Fixed submission:
N, Q = map(int, input().split())
S = input()
qn = [list(map(int, input().split())) for _ in range(Q)]
S = "0" + S
cnt = []
cnt.append(0)
for i in range(1, N+1):
    if (S[i-1:i+1] == "AC"):
        cnt.append(cnt[i-1] + 1)
    else:
        cnt.append(cnt[i-1])
for q in qn:
    ans = cnt[q[1]] - cnt[q[0]-1]
    if S[q[0]-1:q[0]+1] == "AC":
        ans -= 1
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np

input = sys.stdin.readline

# N 品物の数、 W 合計の重さ
n, w = map(int, input().split())

# (W V) W : 品物の重さ V：品物の価値
lst = [list(map(int, input().split())) for ii in range(n)]

# 価値 v を最大にするので、0に初期化
# １次元は品物（インデックス0には ALL0）、２次元は重さの合計
dp = np.zeros([n+1, w+1])

def retmax(a, b):
    if a > b:
        return a
    return b

for i, ln in enumerate(lst):
    # 品物の数分
    for j in range(w+1):
        # 重みの数まで
        # 選ばない。１つ前からセットする。
        dp[i+1, j] = retmax(dp[i+1, j], dp[i, j])
        if j >= ln[0]:
            # 品物を選べる
            dp[i+1, j] = retmax(dp[i+1, j], dp[i, j-ln[0]]+ln[1])
print(int(dp[n, w]))

Fixed submission:
import sys
import numpy as np

input = sys.stdin.readline

# N 品物の数、 W 合計の重さ
n, w = map(int, input().split())

# (W V) W : 品物の重さ V：品物の価値
lst = [list(map(int, input().split())) for ii in range(n)]

# 価値 v を最大にするので、0に初期化
# １次元は品物（インデックス0には ALL0）、２次元は重さの合計
dp = np.zeros([n+1, w+1])

for i, ln in enumerate(lst):
    # 自分の重さが入るまでは１つ前の
    dp[i+1, :ln[0]] = dp[i, :ln[0]]
    # 自分を加えられる。選ばない時と価値の高いほうをセット
    dp[i+1, ln[0]:] = np.max([dp[i, ln[0]:], dp[i, :w-ln[0]+1]+ln[1]], axis=0)

print(int(dp[n, w]))
Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
qn = [list(map(int, input().split())) for _ in range(Q)]
cnt = [0 for _ in range(N+10)]
for i in range(1, N+1):
    if (S[i-1:i+1] == "AC"):
        cnt[i] = cnt[i-1] + 1
    else:
        cnt[i] = cnt[i-1]
for q in qn:
    l, r = q
    print(cnt[r-1] - cnt[l-1])


Fixed submission:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product
from itertools import combinations

N = int(input())
An = list(map(int, input().split()))
Bn = []
Bn.append(0)
for i, A in enumerate(An):
    Bn.append(A+Bn[i])
Cn = collections.Counter(Bn)
ans = 0
for c in Cn.values():
    if c < 2:
        continue
    ans += c * (c-1) // 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
An = list(map(int, input().split()))
Bn = []
Bn.append(0)
for i, A in enumerate(An):
    Bn.append(A+Bn[i])
ans = 0
for i in range(N+1):
    for j in range(i+1, N+1):
#         print(i, Bn[i], j, Bn[j])
        if (Bn[i] == Bn[j]):
#             print("0")
#             print(An[i:j])
            ans += 1
print(ans)


Fixed submission:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product
from itertools import combinations

N = int(input())
An = list(map(int, input().split()))
Bn = []
Bn.append(0)
for i, A in enumerate(An):
    Bn.append(A+Bn[i])
Cn = collections.Counter(Bn)
ans = 0
for c in Cn.values():
    if c < 2:
        continue
    ans += c * (c-1) // 2
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

# N 時計の数
n = int(input())

# Ti 各時計が1周する秒数
t = []
for i in range(n):
    t.append(int(input()))
    
# 最大公約数を求める
def gcb(a, b):
    if b == 0:
        return a
    return int(gcb(b, a % b))

def lcm(a, b):
    g = gcb(a, b)
    return int(a / g * b)

ans = 1

for num in t:
    ans = lcm(ans, num)

print(int(ans))


Fixed submission:
import sys
import numpy as np

# N 時計の数
n = int(input())

# Ti 各時計が1周する秒数
t = []
for i in range(n):
    t.append(int(input()))
    
# 最大公約数を求める
def gcb(a, b):
    if b == 0:
        return a
    return int(gcb(b, a % b))

def lcm(a, b):
    g = gcb(a, b)
    return a * b // g

if (n == 1):
    print(t[0])
else:
    ans = 1
    for num in t:
        ans = lcm(ans, num)
    print(int(ans))

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np

# N 時計の数
n = int(input())

# Ti 各時計が1周する秒数
t = []
for i in range(n):
    t.append(int(input()))
    
# 最大公約数を求める
def gcb(a, b):
    if b == 0:
        return a
    return gcb(b, a % b)

def lcm(a, b):
    g = gcb(a, b)
    return a / g * b

ans = 1

for num in t:
    ans = lcm(ans, num)

print(int(ans))


Fixed submission:
import sys
import numpy as np

# N 時計の数
n = int(input())

# Ti 各時計が1周する秒数
t = []
for i in range(n):
    t.append(int(input()))
    
# 最大公約数を求める
def gcb(a, b):
    if b == 0:
        return a
    return int(gcb(b, a % b))

def lcm(a, b):
    g = gcb(a, b)
    return a * b // g

if (n == 1):
    print(t[0])
else:
    ans = 1
    for num in t:
        ans = lcm(ans, num)
    print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np

# N K 操作回数、K番目の値
n, k = map(int, input().split())

# ai, bi  追加する整数 ai, 追加する数 bi
s = []
for i in range(n):
    s.append(list(map(int, input().split())))

num = []
for pr in s:
    for i in range(pr[1]):
        num.append(pr[0])

num.sort()

print(num[k-1])

Fixed submission:
import sys
import numpy as np

# N K 操作回数、K番目の値
n, k = map(int, input().split())

# ai, bi  追加する整数 ai, 追加する数 bi
s = []
for i in range(n):
    s.append(list(map(int, input().split())))

# ai, bi の順にソート
s.sort()

number = 0
for s_item in s:
    # kの位置以上に来たか
    number += s_item[1]
    if number >= k:
        number_k = s_item[0]
        break

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

K, S = map(int, input().split())
cnt = 0
for i in range(K+1):
    for j in range(K+1):
        ij = i + j
        if ij > S:
            break
        for k in range(K+1):
            if (ij + k == S):
                cnt += 1
print(cnt)



Fixed submission:
K, S = map(int, input().split())

cnt = 0
for i in range(K+1):
    for j in range(K+1):
        ij = i + j
        if ij > S:
            break
        if (S - ij <= K):
            cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())

cnt = 0
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            if (i + j + k == S):
                cnt += 1
print(cnt)

Fixed submission:
K, S = map(int, input().split())

cnt = 0
for i in range(K+1):
    for j in range(K+1):
        ij = i + j
        if ij > S:
            break
        if (S - ij <= K):
            cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
S = input()
total = 0
for p in (product((0, 1), repeat=len(S)-1)):
    ns = S[0]
    for i, pp in enumerate(p, 1):
        if pp == 0:
            ns += S[i]
        else:
            total += int(ns)
            ns = S[i]
    total += int(ns)
print(total)




Fixed submission:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

# input = sys.stdin.readline
S = input()
total = 0
for p in (product((0, 1), repeat=len(S)-1)):
    ns = S[0]
    for i, pp in enumerate(p, 1):
        if pp == 0:
            ns += S[i]
        else:
            total += int(ns)
            ns = S[i]
    total += int(ns)
print(total)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = 1
ans = 0

while a < n:
    b = 1
    while a * b < n:
        ans += 1
        b += 1
    a += 1

print(ans)

Fixed submission:
n = int(input())
a = 2
ans = 0
 
while a < n/2:
    b = 2
    while a * b < n:
        ans += 1
        b += 1
    a += 1
 
print(ans+2*(n-2)+1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = 0
su = 0

for i in range(len(str(n))):
    s = s + int(str(n)[i])

for i in range(len(str(s))):
    su = su + int(str(s)[i])

if su % 9 == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")

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

for i in range(len(str(n))):
    s = s + int(str(n)[i])

if s % 9 == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

while num_list:
    max_num_index = num_list.index(max(num_list))
    for i in range(max_num_index,len(num_list)):
        count += (num_list[max_num_index]-num_list[i])
        num_list[i] = num_list[max_num_index]
    num_list.remove(num_list[max_num_index])

print(count)

Fixed submission:
n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

for i in range(1,n):
    if num_list[i] < num_list[i-1]:
        count += (num_list[i-1] - num_list[i])
        num_list[i] = num_list[i-1]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
from typing import Counter


n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

while num_list:
    max_num_index = num_list.index(max(num_list))
    for i in range(max_num_index,len(num_list)):
        count += (num_list[max_num_index]-num_list[i])
        num_list[i] = num_list[max_num_index]
    num_list.remove(num_list[max_num_index])

print(count)

Fixed submission:
n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

for i in range(1,n):
    if num_list[i] < num_list[i-1]:
        count += (num_list[i-1] - num_list[i])
        num_list[i] = num_list[i-1]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list = [int(i) for i in input().split()]
count = 0

for i in range(n-1):
    for j in range(i+1,n):
        if list[j] < list[i]:
            count += (list[i] - list[j])
            list[j] = list[i]

print(count)

Fixed submission:
n = int(input())
num_list = [int(i) for i in input().split()]
count = 0

for i in range(1,n):
    if num_list[i] < num_list[i-1]:
        count += (num_list[i-1] - num_list[i])
        num_list[i] = num_list[i-1]

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
num_list = list(map(int, input().split()))
cnt_list = [0] * n

for k in range(n):
    cnt_list[k] = num_list.count(num_list[k]) - 1

for k in range(n):
    ans = sum(cnt_list)//2 - cnt_list[k]
    print(ans)

Fixed submission:
import collections
n = int(input())
num_list = list(map(int, input().split()))
all = 0

c = collections.Counter(num_list)

for i in c:
    all += c[i]*(c[i]-1)//2

for k in range(n):
    print(all - c[num_list[k]] + 1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
from scipy.special import comb
n = int(input())
num_list = list(map(int, input().split()))
all = 0

c = collections.Counter(num_list)
value_list = list(c.values())

for i in range(len(value_list)):
    if not value_list[i] == 1:
        all += comb(value_list[i],2,exact=True)

for k in range(n):
    if not num_list.count(num_list[k]) == 1:
        ans = all + comb(num_list.count(num_list[k])-1,2,exact=True) - comb(num_list.count(num_list[k]),2,exact=True)
        print(ans)
    else:
        print(all)

Fixed submission:
import collections
n = int(input())
num_list = list(map(int, input().split()))
all = 0

c = collections.Counter(num_list)

for i in c:
    all += c[i]*(c[i]-1)//2

for k in range(n):
    print(all - c[num_list[k]] + 1)
Buggy python submission (verdict: Runtime Error):
n, k, q = map(int, input().split())
A = [int(i) for i in input().split()]

start = [k - q] * n
for i in range(q):
    start[A[i]] += 1

for i in range(n):
    if start[i] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k, q = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(q)]
start = [k - q] * n

for i in range(q):
    start[a[i][0] - 1] += 1

for i in range(n):
    if start[i] > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
num_list = list(map(int, input().split()))
ans = 1
cnt_list = [0] * n

for i in range(1,n):
    if num_list[i-1] > num_list[i]:
        cnt_list[i] = -1
    if num_list[i-1] < num_list[i]:
        cnt_list[i] = 1

for i in range(1,n-1):
    if cnt_list[i] == -1 * cnt_list[1]:
        if cnt_list[i+1] == cnt_list[1] or cnt_list[i-1] == cnt_list[1]:
            ans+=1
if cnt_list[n-1] == -1 * cnt_list[1] and cnt_list[n-2] == cnt_list[1]:
    ans += 1

print(ans)

Fixed submission:
n = int(input())
num_list = list(map(int, input().split()))
ans = 1
cnt_list = [0] * n
a = int()

for i in range(1,n):
    if num_list[i-1] > num_list[i]:
        cnt_list[i] = -1
    if num_list[i-1] < num_list[i]:
        cnt_list[i] = 1

while 1 in cnt_list and -1 in cnt_list:
    del cnt_list[:max(cnt_list.index(1),cnt_list.index(-1))]
    cnt_list[0] = 0
    ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
score = 0
i = 0
ans_list = []

while score < n:
    i += 1
    score += i
    ans_list.append(i)


ans_list.remove(score - n)
for k in range(len(ans_list)):
    print(ans_list[k])

Fixed submission:
n = int(input())
score = 0
i = 0
ans_list = []

while score < n:
    i += 1
    score += i
    ans_list.append(i)

if score == n:
    for k in range(len(ans_list)):
        print(ans_list[k])
else:
    ans_list.remove(score - n)
    for k in range(len(ans_list)):
        print(ans_list[k])
Buggy python submission (verdict: Runtime Error):
import math
n,d=map(int(input().split()))
c=0
for i in range(n):
  a,b=map(int(input().split()))
  r=math.sqrt(a**2+b**2)
  if r<=d:
    c+=1
print(c)    

Fixed submission:
import math
n,d=map(int,input().split())
c=0
for i in range(n):
  a,b=map(int,input().split())
  r=math.sqrt(a**2+b**2)
  if r<=d:
    c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
l=[0]*100000
ans=sum(A)

for i in A:
  l[i]+=1

for i in range(Q):
  b,c=map(int,input().split())
  ans=ans+(c-b)*l[b]
  l[c]+=l[b]
  l[b]=0
  print(ans)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
l=[0]*1000000
ans=sum(A)

for i in A:
  l[i]+=1

for i in range(Q):
  b,c=map(int,input().split())
  ans=ans+(c-b)*l[b]
  l[c]+=l[b]
  l[b]=0
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
s=0 
for k in range(len(A)):
  s=s+A[k]
  
for i in range(Q):
  B,C=map(int,input().split())
  m=0
  for j in range(len(A)):
    if A[j]==B:
      A[j]=C
      m+=1
  s=s+m*(C-B)
  print(s)


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
l=[0]*1000000
ans=sum(A)

for i in A:
  l[i]+=1

for i in range(Q):
  b,c=map(int,input().split())
  ans=ans+(c-b)*l[b]
  l[c]+=l[b]
  l[b]=0
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
for i in range(Q):
  B,C=map(int,input().split())
  for j in range(len(A)):
    if A[j]==B:
      A[j]=C
  s=0
  for k in range(len(A)):
    s=s+A[k]
  print(s)


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
l=[0]*1000000
ans=sum(A)

for i in A:
  l[i]+=1

for i in range(Q):
  b,c=map(int,input().split())
  ans=ans+(c-b)*l[b]
  l[c]+=l[b]
  l[b]=0
  print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split()))
if 0 in l:
  print(0)
else:
	a=1
	for i in l:
  		a=a*i
	    if a>10**18:
  			print(-1)
            exit()
  	print(a)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
if 0 in l:
  print(0)
else:
  a=1
  for i in l:
    a=a*i
    if a>10**18:
      print(-1)
      exit()
  print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
a=1
for i in l:
  a=a*i
if a>10**18:
  print(-1)
else:
  print(a)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
if 0 in l:
  print(0)
else:
  a=1
  for i in l:
    a=a*i
    if a>10**18:
      print(-1)
      exit()
  print(a)
Buggy python submission (verdict: Runtime Error):
a=input()
if a="ABC":
  print("ARC")
else:
  print("ABC")

Fixed submission:
a=input()
if a=="ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=[]
for i in range(n):
  s=input()
  if not s in p:
    p.append(s)
print(len(p))

Fixed submission:
n=int(input())
p=[]
for i in range(n):
  s=input()
  p.append(s)
print(len(set(p)))
Buggy python submission (verdict: Runtime Error):
s=input()
if s=="AAA" or s=="BBB":
  print(No)
else:
  print(Yes)

Fixed submission:
s=input()
if s=="AAA" or s=="BBB":
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
N,R=map(int,input().split())
if N>=10:
  return (R)
else:
  return (R+100*N)

Fixed submission:
N,R=map(int,input().split())
if N>=10:
  print(R)
else:
  print(R+100*(10-N))

Buggy python submission (verdict: Runtime Error):
N,R=map(int,input().split())
if N>=10:
  return R
else:
  return R-100*N



Fixed submission:
N,R=map(int,input().split())
if N>=10:
  print(R)
else:
  print(R+100*(10-N))

Buggy python submission (verdict: Runtime Error):
def rating(N,R)
 if N>=10:
    return R
 else:
  return R-100*N

Fixed submission:
N,R=map(int,input().split())
if N>=10:
  print(R)
else:
  print(R+100*(10-N))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b:
   print "Yes"
elif a==c:
   print "Yes"
elif b==c:
   print "Yes"
else:
   print "No"

Fixed submission:
a,b,c=map(int,input().split())
if a==b and b==c:
  print("No") 
elif a==b:
   print ("Yes")
elif a==c:
   print ("Yes")
elif b==c:
   print ("Yes")
else:
   print ("No")
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
city = [0] * 10
for i in range(M):
  a, b = map(int, input().split())
  city[a - 1] += 1
  city[b - 1] += 1
for i in range (N):
  print(city[i])

Fixed submission:
N, M = map(int, input().split())
city = [0] * N
for i in range(M):
  a, b = map(int, input().split())
  city[a - 1] += 1
  city[b - 1] += 1
for i in range (N):
  print(city[i])
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d = map(int,input().split())
a1 = []
for i in range(a,b+1):
    for j in range(c,d+1):
        a1.append(i*j)
print(max(a1))

Fixed submission:
a,b,c,d = map(int,input().split())
a1 = []
e = [a,b]
f = [c,d]
for i in e:
    for j in f:
        a1.append(i*j)
print(max(a1))