Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from functools import reduce

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

if X not in x_list:
    x_list.append(X).sort()
    N += 1    

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

if N >= 3:
    space = [abs(x_list[i + 1] - x_list[i]) for i in range(N - 1)]
    print(reduce(gcd, space))
elif N == 2:
    space = x_list[1] - x_list[0]
    print(space)
elif N == 1:
    space = x_list[0]
    print(space)






Fixed submission:
from functools import reduce

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

if X not in x_list:
    x_list.append(X)
    x_list.sort()
    N += 1    

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

if N >= 3:
    space = [abs(x_list[i + 1] - x_list[i]) for i in range(N - 1)]
    print(reduce(gcd, space))
elif N == 2:
    space = x_list[1] - x_list[0]
    print(space)
elif N == 1:
    space = x_list[0]
    print(space)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - (len(plus) - 1)), min(len(minus) + 1, K)):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

Fixed submission:
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

a = len(minus) - 1
b = len(plus) - 1

ans = []
for i in range(max(0, K - b), min(a, K) + 1):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - (len(plus) - 1)), min(len(minus) + 1, K)):
    print(i, K-i)
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

Fixed submission:
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

a = len(minus) - 1
b = len(plus) - 1

ans = []
for i in range(max(0, K - b), min(a, K) + 1):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - len(plus), min(len(minus), K))):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

Fixed submission:
N, K = map(int, input().split())
X = list(map(int, input().split()))

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

a = len(minus) - 1
b = len(plus) - 1

ans = []
for i in range(max(0, K - b), min(a, K) + 1):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))
Buggy python submission (verdict: Runtime Error):
"""
Sの文字列、最初が何かに依存しそう
"""


S = input()
K = int(input())

if S[0] == "1":
    len_one = 0
    for s in S:
        if s == 1 and flag == 0:
            len_one += 1
        else:
            flag = 0
    
    if K <= len_one:
        ans = 1
    else:
        ans = S[1]

else:
    ans = S[0]

print(ans)

Fixed submission:
"""
Sの文字列、最初が何かに依存しそう
"""


S = input()
K = int(input())

if S[0] == "1":
    len_one = 0
    flag = 0
    for s in S:
        if s == "1" and flag == 0:
            len_one += 1
        elif flag == 0:
            save_num = s
            flag = 1
        else:
            flag = 1
    if K <= len_one:
        ans = 1
    else:
        ans = int(save_num)

else:
    ans = int(S[0])

print(ans)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split()) )for _ in range(m)]
lst=sorted(l,key=lambda x: x[1],reverse=True)
cur=0
for i in lst:
    tmpb=i[0]
    while tmpb:
        if a[cur]<i[1]:
            a[cur]=i[1]
            cur+=1
            tmpb-=1
        else:
            break
            
result=0
for i in a:
    result+=i
print(result)
    
    

Fixed submission:
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split()) )for _ in range(m)]
lst=sorted(l,key=lambda x: x[1],reverse=True)
cur=0
for i in lst:
    tmpb=i[0]
    while (tmpb!=0 and cur<=len(a)-1):
        if a[cur]<i[1]:
            a[cur]=i[1]
            cur+=1
            tmpb-=1
        else:
            break
            
result=0
for i in a:
    result+=i
print(result)
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):

    xright.append(math.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(n):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(result)

Fixed submission:
a,b,t=map(int,input().split())
print((t//a)*b)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[[]]*n
for i in range(n):
    l[i]=list(map(int,input().split()))
lst=sorted(l,key=lambda x:-x[2])
flag=False

for i in range(0,101):#i=X
    if flag:
        break
    for j in range(0,101):#j=Y
        if flag:
            break
        tmp=lst[0][2]+abs(lst[0][0]-i)+abs(lst[0][1]-j)
        for k in range(n):
            if lst[k][2]!=0:
            #print(k,'ループ目')
                sum=abs(lst[k][0]-i)+abs(lst[k][1]-j)
                H=lst[k][2]+sum
                if tmp!=H :
                    break
                a,b,c=i,j,H
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break
            else:
                if lst[0][2]!=max(c-abs(a-lst[k][1])-abs(b-lst[k][2])):
                    break
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break

Fixed submission:
n=int(input())
l=[[]]*n
for i in range(n):
    l[i]=list(map(int,input().split()))
lst=sorted(l,key=lambda x:-x[2])
flag=False

for i in range(0,101):#i=X
    if flag:
        break
    for j in range(0,101):#j=Y
        if flag:
            break
        tmp=lst[0][2]+abs(lst[0][0]-i)+abs(lst[0][1]-j)
        for k in range(n):
            if lst[k][2]!=0:
            #print(k,'ループ目')
                sum=abs(lst[k][0]-i)+abs(lst[k][1]-j)
                H=lst[k][2]+sum
                if tmp!=H :
                    break
                a,b,c=i,j,H
                if k==n-1:
                    flag=True
                    print(i,j,H,)
                    break
            
            else:
                
                if lst[k][2]!=max(c-abs(a-lst[k][0])-abs(b-lst[k][1]),0):
                    #print(c,abs(a-lst[k][0]),abs(b-lst[k][1]))
                    break
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
num = input().rstrip().split(" ")
Ai = []
M =[]


def gcd_list(numbers):
  def gcd(a,b):
    while b!=0:
      a,b=b,a%b
    return a
  
  ans = numbers[0]
  for i in range(1, N-1):
    ans = gcd(ans, numbers[i])
  return ans

for i in range(N):
  Ai.append(int(num[i]))
for i in range(N):
  a = Ai.pop(i)
  M.append(gcd_list(Ai))
  Ai.insert(i,a)

print(max(M))


Fixed submission:
from fractions import gcd
 
n = int(input())
a = list(map(int, input().split()))
 
rs, ls = [0], [0]
for i in range(n-1):
  rs.append(gcd(rs[i], a[i]))
  ls.append(gcd(ls[i], a[-i-1]))
 
print(max(gcd(r, l) for r, l in zip(rs, ls[::-1])))
Buggy python submission (verdict: Runtime Error):
n = int(input())

count = 0
for i in range(1, n + 1):
    s = len(str(i))
    if s%2 == 1:
        count += 1

print(count)


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

print(0 if b+c <= a else c-(a-b))
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

sdash = "".join(sorted(s))
tdash = "".join(sorted(t, reverse = True))

print("Yes" if sdash < tdash else "No")


Fixed submission:
a, b = map(int, input().split())
print( int((a + b + 2 - 1) / 2) )

Buggy python submission (verdict: Runtime Error):
s = list(input())
t = list(input())

sdash = "".join(sorted(s))
tdash = "".join(sorted(s, reverse = True))

print("Yes" if sdash < tdash else "No")


Fixed submission:
a, b = map(int, input().split())
print( int((a + b + 2 - 1) / 2) )
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = [int(x) for x in input().split()]

ans = True
for i in range(n-1, 0, -1):
  dis = h[i] - h[i-1]
  if dis >= 0:
    continue
  elif dis == -1:
    h[i+1] -= 1
    continue
  else:
    ans = False
    break

if ans:
  print('Yes')
else:
  print('No')
  


Fixed submission:
n = int(input())
h = [int(x) for x in input().split()]

ans = True
for i in range(n-1, 0, -1):
  dis = h[i] - h[i-1]
  if dis >= 0:
    continue
  elif dis == -1:
    h[i-1] -= 1
    continue
  else:
    ans = False
    break

if ans:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())

print(max(C-(A-B), 0)

Fixed submission:
A, B, C = map(int, input().split())

print(max(C-(A-B), 0))
Buggy python submission (verdict: Time Limit Exceeded):
import copy

n = int(input())
A = [int(input()) for _ in range(n)]

for i in range(n):
    tmp_list = copy.deepcopy(A)
    tmp_list.pop(i)
    print(max(tmp_list))


Fixed submission:
import copy

n = int(input())
A = [int(input()) for _ in range(n)]

A_sorted = sorted(A, reverse=True)

for i in range(n):
    if A[i] == A_sorted[0]:
        print(A_sorted[1])
    else:
        print(A_sorted[0])
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
S = input()
p = [list(map(int, input().split())) for _ in range(q)]

for l, r in p:
    sub_str = S[l-1:r]
    print(sub_str.count('AC'))

Fixed submission:
n, q = map(int, input().split())
S = input()
t = [0] * (n + 1)

for i in range(n):
    t[i + 1] = t[i] + (1 if S[i:i + 2] == 'AC' else 0)

for i in range(q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])
Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())

rm_count=0
rm_index=[]
while True:
    for i in range(len(s)-1):
        if i in rm_index:
            continue
        if s[i] != s[i+1]:
            rm_count=rm_count+2
            rm_index+=[i,i+1]
            #print("DEBUG: {}, {}, count: {}".format(s[i],s[i+1],rm_count))

    for i in sorted(rm_index, reverse=True):
        s.pop(i)
    rm_index=[]
    if len(set(s)) == 1 or len(s) == 0:
        break
print(rm_count)


Fixed submission:
from collections import Counter
s = list(input())
d = Counter(s).most_common(2)

# 文字列すべてが同じ文字のとき
if len(d) == 1:
    print(0)
else:
    print(min(d[0][1],d[1][1])*2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
hn = list(map(int, input().split()[:n]))

count = 0
prev = 0

for h in hn:
    count += max(0, h-prev)
    prev = h

print(count)


Fixed submission:
ab, bc, ca = map(int, input().split())
print(int(bc*ab/2))
Buggy python submission (verdict: Runtime Error):
from collections import Counter
import sys

s = input()
counter = Counter(s[2:-1])

if s[0] == 'A':
    s = s.lstrip('A')
else:
    print('WA')
    sys.exit(1)

if counter['C'] == 1:
    s = s.replace('C', '')
else:
    print('WA')
    sys.exit(1)

if s.islower():
    print('AC')
else:
    print('WA')


Fixed submission:
from collections import Counter
import sys

s = input()
counter = Counter(s[2:-1])

if s[0] == 'A':
    s = s.lstrip('A')
else:
    print('WA')
    sys.exit(0)

if counter['C'] == 1:
    s = s.replace('C', '')
else:
    print('WA')
    sys.exit(0)

if s.islower():
    print('AC')
else:
    print('WA')
Buggy python submission (verdict: Runtime Error):
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        print("Yes")
        sys.exit(1)

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")


Fixed submission:
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        break

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")

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

s = list(input())
t = list(input())

for i in range(len(s)):
    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

    if s == t:
        print('Yes')
        sys.exit(1)

print('No')


Fixed submission:
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        break

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")

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

s = list(input())
t = list(input())

for i in range(len(s)):
    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

    if s == t:
        print("Yes")
        sys.exit(1)

print("No")


Fixed submission:
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        break

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Fixed submission:
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        break

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
 = int(input())
  2 
  3 if n % 2 == 0:
  4     print(n)
  5 else:
  6     print(n*2)


Fixed submission:
n = int(input())

if n % 2 == 0:
    print(n)
else:
    print(n*2)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A > 8 or  B > 8:
    print(":(")
else:
    print("Yay!")


Fixed submission:
A, B = map(int, input().split())

if A > 8 or  B > 8:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
S=list(input())
li = ['A','T','G','C']
maxl=0
ans=0
for i in range(len(S)):
    if S[i] in li:
        leng+=1
    else:
        if leng>maxl:
            maxl=leng
        leng=0
print(maxl)

Fixed submission:
S=list(input())
li = ['A','T','G','C']
ans=0
leng=0
for i in range(len(S)):
    if S[i] in li:
        leng+=1
    else:
        leng=0
    if leng>ans:
        ans=leng
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])

Fixed submission:
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B])+1)):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])

Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
print(ans[K-1])

Fixed submission:
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B])+1)):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])

Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[]
for i in range(1,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
print(ans[K-1])

Fixed submission:
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B])+1)):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])
Buggy python submission (verdict: Runtime Error):
S = map(int,input().split("/"))
if S<=20190430:
    print("Heisei")
    elif:
        print("TBD")

Fixed submission:
S = input().split("/")
x = "".join(S)
if int(x)<=20190430:
    print("Heisei")
else:
        print("TBD")
Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0])*380000

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0]*380000)

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0])*380000

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if i[i][1]=="JPY":
        Y+=u[i][0]
    else:
        Y+=u[i][0]*380000

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in u:
    if i[i][0]=="JPY":
        Y+=u[i][1]
    else:
        Y+=u[i][1]*380000

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
u = [list(map(int, input().split())) for _ in range(N)]

Y=0
for i in u:
    if i[i,0]=="JPY":
        Y+=u[i,1]
    else:
        Y+=u[i,1]*380000

print(Y)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

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

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

Fixed submission:
from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

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

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
def gcd(numbers):
    return reduce(math.gcd, numbers)

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

Fixed submission:
from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

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

Buggy python submission (verdict: Runtime Error):

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

A.sort()
check = []
while True:
    min_num = A[0]
    for i in A:
        # 余りのリスト
        if
        check.append(i%A[0])
    check[0] = min_num
    if A[1] - A[0]>0:
        A[1] = A[1] - A[0]
    else:
        break
    A = check
    A.sort()

print(A[0])

Fixed submission:
from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

N = int(input())
A = list(map(int,input().split()))
answer = gcd_list(A)
print(answer)
Buggy python submission (verdict: Runtime Error):
li=int(input().split())
print(li[0]*li[1]*1/2)

Fixed submission:
li=list(map(int, input().split()))
print(int(li[0]*li[1]*1/2))
Buggy python submission (verdict: Runtime Error):
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        count += 1
print(count)

Fixed submission:
n = int(input())

count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h_list = list(map(int, input().split()))

for i in range(n - 1, 0, -1):
    if max(h_list[:i]) - h_list[i] >= 2:
        print('No')
        break
else:
    print('Yes')

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

min_v = h_list[-1]
for i in range(n - 1, 0, -1):
    if h_list[i] < min_v:
        min_v = h_list[i]
    if h_list[i - 1] - min_v >= 2:
        print('No')
        break
else:
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
l, r = map(int, input().split())

mod_min = l * r
for i in range(l, r):
    for j in range(i + 1, r + 1):
        mod_tmp = (i * j) % 2019
        if mod_tmp < mod_min:
            mod_min = mod_tmp

print(mod_min)

Fixed submission:
l, r = map(int, input().split())

mod_min = l * r
for i in range(l, r + 1):
    if mod_min == 0:
        break
    for j in range(i + 1, r + 1):
        mod_tmp = (i * j) % 2019
        if mod_tmp < mod_min:
            mod_min = mod_tmp
        if mod_min == 0:
            break

print(mod_min)
Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(int, input().split())
t_mean_list = list(map(int, input().split()))
t_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))

print(t_diff_list.index(min(t_val_list)))


Fixed submission:
n = int(input())
t, a = map(int, input().split())
t_mean_list = list(map(int, input().split()))
t_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))
 
print(t_diff_list.index(min(t_diff_list)) + 1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(int, input().split())
t_mean_list = list(map(int, input().split()))
t_val_list = list(map(lambda x: t - x * 0.006, t_mean_list)

diff_min = math.abs(t_val_list[0] - a)
a_min = 1
for i in range(1, n):
  diff = math.abs(t_val_list[i] - a)
  if diff < diff_min:
    diff_min = diff
    a_min = i
  else:
    continue

print(a_min)

Fixed submission:
n = int(input())
t, a = map(int, input().split())
t_mean_list = list(map(int, input().split()))
t_diff_list = list(map(lambda x: abs(t - x * 0.006 - a), t_mean_list))
 
print(t_diff_list.index(min(t_diff_list)) + 1)