Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(1, n):
    ans *= a[i]
    
if ans > 10**18:
    print(-1)
else:
    print(ans)

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

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

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = a[0]
for i in range(n):
    if a[i] == 0:
        print(0)
        exit()
for i in range(1, n):
    ans = ans * a[i]
    if ans > 10**18:
        print(-1)
        exit()
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#枚数
a, b, c, k = map(int, input().split())
 
A = a
B = 0
C = -1 * c
 
if k - a >= 0:
    if k -a -b > 0:
        for i in range(c +1):
            if a + b + i == k:
                print(a + (-1)*i)
    else:
        print(a)
else:
    print(k)
 

Fixed submission:
#枚数
a, b, c, k = map(int, input().split())
 
A = a
B = 0
C = -1 * c
 
if k - a >= 0:
    if k -a -b >= 0:
        print(a + (-1)*(k -a -b) )
    else:
        print(a)
else:
    print(k)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a, b = map(int, input().split())
l = 1
while a > l*k:
    l += 1
m = 1
while b < m*k:
    m += 1
    
if a <= l*k <= b or a <= m*k <= b:
    print("OK")
else:
    print("NG")

Fixed submission:
n = int(input())
a, b = map(int, input().split())
k = 1
while True:
    if a <= n*k <= b:
        print("OK")
        exit()
    elif n*k > b:
        print("NG")
        exit()
    else:
        k += 1

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a, b = map(int, input().split())
l = 1
while a > l*k:
    l += 1
m = 1
while b < m*k:
    m += 1
    
if a <= l*k <= b or a <= m*k <= b:
    print("OK")
else:
    print("NG")

Fixed submission:
n = int(input())
a, b = map(int, input().split())
k = 1
while True:
    if a <= n*k <= b:
        print("OK")
        exit()
    elif n*k > b:
        print("NG")
        exit()
    else:
        k += 1
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
t = 0
i = 0
while t < x:
    t = int(t*(1.01))
    i += 1
 
print(i)

Fixed submission:
x = int(input())
t = 100
i = 0
while t < x:
    t = int(t*(1.01))
    i += 1
 
print(i)

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
t = 0
i = 0
while t < x:
    t = int(t*(1.01))
    i += 1

print(ans)

Fixed submission:
x = int(input())
t = 100
i = 0
while t < x:
    t = int(t*(1.01))
    i += 1
 
print(i)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a <= b:
    print("unsafe")
else:
    print("safe")

Fixed submission:
a, b = map(int, input().split())
if a <= b:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
sum = 0

def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    
    
    return a

def gcd2(a, c):
    while c != 0:
        a, c = c, a % c
        
    return a


for i in range(1, k +1):
    for j in range(1, k +1):
        for k in range(1, k +1):
            sum += gcd2(gcd(i, j), k)
print(sum)

Fixed submission:
k = int(input())
sum = 0

def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    
    
    return a

def gcd2(a, c):
    while c != 0:
        a, c = c, a % c
        
    return a


for i in range(1, k +1):
    for j in range(1, k +1):
        for k in range(1, k +1):
            sum += gcd2(gcd(i, j), k)
print(sum)
Buggy python submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        

abs_N(n, k)


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

print(c, a, b)
Buggy python submission (verdict: Runtime Error):
s, t = map(input().split())
a, b = map(int, input().split())
u = input()

if s == u:
    print(a-1,end="")
    print(b)
else:
    print(a,end="")
    print(b-1)

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

if s == u:
    print(a-1, b)
else:
    print(a, b-1)

Buggy python submission (verdict: Runtime Error):
s, t = map(input().split())
a, b = map(int, input().split())
u = input()

if s == u:
    print(a-1, b, end="")
else:
    print(a, b-1, end="")

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

if s == u:
    print(a-1, b)
else:
    print(a, b-1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if a.count(i) >= 2:
        print("NO")
        exit()
print("YES")


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = set(a)
a.sort()
if len(a) != len(b):
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
def has_duplicates2(seq):
    seen = []
    unique_list = [x for x in seq if x not in seen and not seen.append(x)]
    return len(seq) != len(unique_list)
print("NO" if has_duplicates2(a) else "YES")

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = set(a)
a.sort()
if len(a) != len(b):
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while h <= 0:
    h = h - a
    n = n + 1
print(n) 

Fixed submission:
h, a = map(int, input(). split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)

Buggy python submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n) 

Fixed submission:
h, a = map(int, input(). split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)

Buggy python submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= a:
        break
print(n) 

Fixed submission:
h, a = map(int, input(). split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)

Buggy python submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h >= a:
        break
print(n) 

Fixed submission:
h, a = map(int, input(). split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)
Buggy python submission (verdict: Runtime Error):
n = int(input())
p_list = list(map(int, input().split()))
flg = 0
i_sum = 0
for i in range(1, n):
    for j in range(1, i+1):
        if p_list[j] >= p_list[i]:
            flg += 1
            if flg == i:
                i_sum += 1
                flg = 0
                continue
        else:
            flg = 0
            continue
        
print(i_sum +1)

Fixed submission:
n, m = map(int, input().split())
if n == m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
alph = input()
print(ord(alph+1))

Fixed submission:
alph = input()
print(chr(ord(alph)+1))
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)def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(a,b))

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

s = input()
l = len(s) //2

if is_kaibun(s):
    print(0)
    sys.exit()

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

def kisu(s):    
    ans_k = 0
    l = len(s) //2
    for i in range(l +1, len(s)):
        if s[i] != s[l -i]:
            s.replace(s[i], s[l -i])
            ans_k += 1
        if is_kaibun(s):
            return ans_k
    return l -1

def gusu(s):
    ans_g = 0
    l = len(s) //2
    for i in range(l):
        if s[i] != s[l]:
            s.replace(s[i], s[l +i])
            ans_g += 1
        if is_kaibun(s):
            return ans_g
    return l
if len(s) % 2 == 0:
    print(gusu(s))
else:
    print(kisu(s))


Fixed submission:
s = input()
cnt = 0
for i in range(len(s)//2):
    if s[i] != s[-i -1]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
ans = []
for s in S:
    if ord(s) + N > 90:
        ans.append(chr(ord(s)+(N-26)))
    else:
        ans.append(chr(ord(s)+N))
for j in range(len(S)):
    print(ans, end ="")

Fixed submission:
n = int(input())
s = input()
ans = []

for i in range(len(s)):
    temp = ord(s[i]) +n
    if temp > 0x5a:
        temp -= 26
    ans.append(chr(temp))
    
for k in range(len(ans)):
    print(ans[k], end = "")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
ans = []
for i in range(n):
    ans.append(0)
for i in range(n):
    ans[a[i]-1] = i +1
for i in range(len(ans)):
    print(ans[i], end=" ")

Fixed submission:
n = int(input())

if n % 2 == 1:
    a = n // 2 + 1
else:
    a = n // 2
print(a / n)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    for j in range(n):
        if i+1 == a[j]:
            print(j+1, end=" ")

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans = []
for i in range(n):
    ans.append(0)
for i in range(n):
    ans[a[i]-1] = i +1
for i in range(len(ans)):
    print(ans[i], end=" ")
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
def calc(n):
    return n-1
for i in range(n):
  ans.append(k)
for i in range(q):
  ans = list(map(calc, ans))
  ans[a[i]-1]+= 1

for i in range(n):
  if ans[i] <= 0:
    print("No")
  else:
    print("Yes")

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
def calc(n):
    return n-q
for i in range(n):
  ans.append(k)
ans = list(map(calc, ans))
for i in range(q):
  ans[a[i]-1]+= 1
for i in range(n):
  if ans[i] <= 0:
    print("No")
  else:
    print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
for i in range(n):
  ans.append(k)
for i in range(q):
  for j in range(n):
    if a[i] != j +1:
      ans[j] -= 1

for i in range(n):
  if ans[i] <= 0:
    print("No")
  else:
    print("Yes")

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
ans = []
def calc(n):
    return n-q
for i in range(n):
  ans.append(k)
ans = list(map(calc, ans))
for i in range(q):
  ans[a[i]-1]+= 1
for i in range(n):
  if ans[i] <= 0:
    print("No")
  else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b=map(int(input().split()))
print(b%(a+1))

Fixed submission:
a, b = map(int, input().split())
for i in range(50):
    if  a * i  - (i-1) >= b:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
a,b=map(int(input().split()))
print(b%a+1)

Fixed submission:
a, b = map(int, input().split())
for i in range(50):
    if  a * i  - (i-1) >= b:
        print(i)
        exit()
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append(c)
l.append(d)
l.append(e)
print(max(l[c, d, e]))

Fixed submission:
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append(c)
l.append(d)
l.append(e)
print(max(l))

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append =c
l.append =d
l.append =e
print(max(l[c, d, e]))

Fixed submission:
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append(c)
l.append(d)
l.append(e)
print(max(l))

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append =c
l.append =d
l.append =e
print(max(l))

Fixed submission:
a, b = map(int, input().split())
l = []
c = a +b
d = a -b
e = a *b
l.append(c)
l.append(d)
l.append(e)
print(max(l))
Buggy python submission (verdict: Runtime Error):
n, d = map(int, input().split())
print(math.ceil(n / (2*d +1)))

Fixed submission:
import math
n, d = map(int, input().split())
print(math.ceil(n / (2*d +1)))
Buggy python submission (verdict: Runtime Error):
s = input()
flg = 0
for i in range(4):
    if s[i] == s[i+1]:
        flg = 1

if flg == 0:
    print("Good")
else:
    print("Bad")


Fixed submission:
s = input()
flg = 0
for i in range(3):
    if s[i] == s[i+1]:
        flg = 1

if flg == 0:
    print("Good")
else:
    print("Bad")
Buggy python submission (verdict: Runtime Error):
x,a=map{int,input().split()}
if a>x:
   print("0")
else:
   print("10")

Fixed submission:
x,a=map(int,input().split())
if x>=a :
   print("10")
else:
   print("0")
Buggy python submission (verdict: Runtime Error):
a, p = map(int, input().split())

apple = 3 * a + b
pie = apple // 2

print(pie)

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

apple = 3 * a + p
pie = apple // 2

print(pie)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = list(input())
s[k].lower()
for i in range(n):
  print(s[k], end="")


Fixed submission:
n, k = map(int, input().split())
s = input()
for i in range(0, k-1):
    print(s[i], end="")
print(str.swapcase(s[k-1]), end="")
for i in range(k, n):
    print(s[i], end="")
Buggy python submission (verdict: Runtime Error):
menu = [int(input()) for i in range(5)]
def kuriage(n):
    if n %10 == 0:
        return 0
    else:
        return 10-(n %10)
ans = 0
mini = 10
for i in range(5):
    if menu[i] %10 < mini and menu[i]%10 !=0:
        mini = menu[i] %10
        k = i
for i in range(5):
    if i == k:
        menu[i], menu[-1] = menu[-1], menu[i]

for i in range(5):
    if i != 4:
        ans += menu[i] + kuriage(menu[i])
    else:
        ans += menu[-1]
        print(ans)


Fixed submission:
menu = [int(input()) for i in range(5)]
def kuriage(n):
    if n %10 == 0:
        return 0
    else:
        return 10-(n %10)
ans = 0
mini = 10
k = 5
for i in range(5):
    if menu[i] %10 < mini and menu[i]%10 !=0:
        mini = menu[i] %10
        k = i
for i in range(5):
    if i == k:
        menu[i], menu[-1] = menu[-1], menu[i]

for i in range(5):
    if i != 4:
        ans += menu[i] + kuriage(menu[i])
    else:
        ans += menu[-1]
        print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
if s[5] == "1":
    print("TBD")
elif s[6] == "4" or s[6] == "3" s[6] == "2" s[6] == "1":
    print("Heisei")
else:
    print("TBD")

Fixed submission:
s = input()
if s[5] == "1":
    print("TBD")
elif s[6] == "4" or s[6] == "3" or s[6] == "2" or s[6] == "1":
    print("Heisei")
else:
    print("TBD")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().spli())
if b % a == 0:
    print(a + b)
else:
    print(b-a)

Fixed submission:
a, b = map(int, input().split())
if a == b:
    print(a + b)
elif b % a == 0:
    print(a + b) 
else:
    print(b-a)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print(a*b*(0.5)

Fixed submission:
a, b, c = map(int, input().split())
print(int(a*b*0.5))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1, 10):
    if 100*i + 10*i + i => n:
        print(100*i + 10*i + i)

Fixed submission:
n = int(input())
for i in range(1, 10):
    if (100*i + 10*i + i ) >= n:
        print(100*i + 10*i + i)
        exit()

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(10):
    if 100*i + 10*i + i => n:
        print(100*i + 10*i + i)

Fixed submission:
n = int(input())
for i in range(1, 10):
    if (100*i + 10*i + i ) >= n:
        print(100*i + 10*i + i)
        exit()
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if s in T*2:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()
T = input()
if S in T*2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
d, n = map(int, input().split())
if d == 0:
    print(x)
    exit()
x = 100 **d
print(x*n)

Fixed submission:
d, n = map(int, input().split())
x = 100 **d
if n != 100:
    print(x*n)
else:
    print(x*(n +1))
Buggy python submission (verdict: Runtime Error):
n,m,x = map(int,input().split())
a=list(map(int,input().split()))
cnt1, cnt2 = 0, 0
for i in range(x):
  if a[i] <= x:
    cnt1 += 1
for j in range(x, n):
  if x <= a[i] <= n:
    cnt2 += 1
print(min(cnt1 -1, cnt2 -1))

Fixed submission:
n,m,x = map(int,input().split())
a=list(map(int,input().split()))
cnt1, cnt2 = 0, 0
for i in range(m):
  if 0 <= a[i] < x:
    cnt1 += 1
  if x < a[i] <= a[-1]:
    cnt2 += 1
print(min(cnt1, cnt2))
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(sum(min(a, b), min(c, d)))

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(min(a, b) + min(c, d))
Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split()))
li.sort(reverse = True)
i = 0
while i <= len(li): 
    a = li[i]
    i += 2
i = 1
while i <= len(li):
    b = li[i]
    i += 2
print(a -b)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse = True)
i = 0
a = 0
b = 0
while i < n: 
    a = a +l[i]
    i += 2
i = 1
while i < n:
    b = b +l[i]
    i += 2
print(a -b)

Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split()))
li.sort(*, key = None, reverse = True)
i = 0
while i <= len(li): 
    a = li[i]
    i += 2
i = 1
while i <= len(li):
    b = li[i]
    i += 2
print(a -b)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse = True)
i = 0
a = 0
b = 0
while i < n: 
    a = a +l[i]
    i += 2
i = 1
while i < n:
    b = b +l[i]
    i += 2
print(a -b)

Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split()))
li.sort(*, key = None, reverse = True)
for i in range(len(li)):
    a = li[i]
    b = li[i +1]
print(a -b)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse = True)
i = 0
a = 0
b = 0
while i < n: 
    a = a +l[i]
    i += 2
i = 1
while i < n:
    b = b +l[i]
    i += 2
print(a -b)

Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split()))
li.sort(*, key = None, reverse = True)
for i in range(len(li)):
    a = li[i]
    b = li[i +1]]
print(a -b)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse = True)
i = 0
a = 0
b = 0
while i < n: 
    a = a +l[i]
    i += 2
i = 1
while i < n:
    b = b +l[i]
    i += 2
print(a -b)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if total = h *500 + i *100 + j *50 == x:
                count += 1
print(count)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if h *500 + i *100 + j *50 == x:
                count += 1
print(count)

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

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if total = a *500 + b *100 + c *50 == x:
                count += 1
print(count)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for h in range(a +1):
    for i in range(b +1):
        for j in range(c +1):
            if h *500 + i *100 + j *50 == x:
                count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input.split())
if a // 2 == 1 and b // 2 == 1:
  print("Odd")
else:
  print("Even")

Fixed submission:
a, b = map(int, input().split())
if (a % 2 == 1) and (b % 2 == 1):
  print("Odd")
else:
  print("Even")
Buggy python submission (verdict: Runtime Error):
s=int(input())
print("2018"+[:4])

Fixed submission:
s=input()
print("2018"+s[4:])
Buggy python submission (verdict: Runtime Error):
n=int(input())
list=[input() for i in range(n)]

a = []

for i in range(n):
    a.append(list.count(i))
    
print(len(set((a)))


Fixed submission:
n=int(input())
list=[int(input()) for i in range(n)]
print(len(set(list)))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b):
    if not(0 <= int(s[i]) <= 9): 
        if s[a] == "-":
            flg = 1
        
print("Yes" if flg == 1 else "No")

Fixed submission:
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b +1):
    try:
        if (0 <= int(s[i]) <= 9):
            if i == a:
                flg = 0
                break
    except:
        if i == a:
            flg = 1
        else:
            flg = 0
            break
print("Yes" if flg == 1 else "No")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b):
    if not(0 <= s[i] <= 9): 
        if s[a] == "-":
            flg = 1
        
print("Yes" if flg == 1 else "No")

Fixed submission:
a, b = map(int, input().split())
s = input()
flg = 0
for i in range(a +b +1):
    try:
        if (0 <= int(s[i]) <= 9):
            if i == a:
                flg = 0
                break
    except:
        if i == a:
            flg = 1
        else:
            flg = 0
            break
print("Yes" if flg == 1 else "No")
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
if (A+B)<(C+D):
   print("Right")
elif (A+B)==(C+D)
   print("Balanced")
else:
   print("Left")

Fixed submission:
A,B,C,D=map(int,input().split())
if (A+B)<(C+D):
   print("Right")
elif (A+B)==(C+D):
   print("Balanced")
else:
   print("Left")
Buggy python submission (verdict: Runtime Error):
import statistics
import marh
a, b = map(int,input().split())
if ((a + b) //2 ) %2 == 0:
    print((a+b)//2)
else:
    print((a+b)//2 +1)

Fixed submission:
a, b = map(int,input().split())
if ((a + b) /2 ) == ((a+b)//2) :
    print((a+b)//2)
else:
    print((a+b)//2 +1)
Buggy python submission (verdict: Runtime Error):
s = list[]
print(s.count("1"))

Fixed submission:
s=input()
print(s.count("1"))

Buggy python submission (verdict: Runtime Error):
s = int(input())
print(s.count(1))

Fixed submission:
s=input()
print(s.count("1"))

Buggy python submission (verdict: Runtime Error):
s, t, u = map(int, input().split())
x = 0
if s % 1 == 1:
  x = x + 1
if t % 1 == 1:
  x = x + 1
if u % 1 == 1:
  x = x + 1
 
print(x)

Fixed submission:
s=input()
print(s.count("1"))

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

t = s % 100
u = s % 10
v = s % 1

if t == 1:
  x++
if u == 1:
  x++
if v == 1:
  x++

print(x)

Fixed submission:
s=input()
print(s.count("1"))