Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

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

import itertools
alsum = list(itertools.accumulate(al))

temp1 = 0
temp2 = 0
for i in range(n):
    if i % 2 ==0:
        if alsum[i] >0:
            pass
        else:
            y = abs(alsum[i])+1
            temp1 += y
            alsum = list(map(lambda x:x +y ,alsum))
    else:
        if alsum[i] <0:
            pass
        else:
            y = alsum[i]+1
            temp1 += y
            alsum = list(map(lambda x:x-y,alsum))
    
import itertools
alsum = list(itertools.accumulate(al))

for j in range(n):
    if j % 2 ==0:
        if alsum[j] <0:
            pass
        else:
            y = abs(alsum[j])+1
            temp2 += y
            alsum = list(map(lambda x:x-y,alsum))
    else:
        if alsum[j] >0:
            pass
        else:
            y = abs(alsum[j])+1
            temp2 += y
            alsum = list(map(lambda x:x+y,alsum))

print(min(temp1,temp2))

Fixed submission:
n = int(input())

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

import itertools
alsum = list(itertools.accumulate(al))

temp1 = 0
temp2 = 0
res = 0
for i in range(n):
    res += al[i]
    if i % 2 ==0:
        if res >0:
            pass
        else:
            y = res*(-1)+1
            temp1 += y
            res =1
    else:
        if res <0:
            pass
        else:
            y = res+1
            temp1 += y
            res = -1
    
res= 0

for j in range(n):
    res += al[j]
    if j % 2 ==0:
        if res <0:
            pass
        else:
            y = res+1
            temp2 += y
            res = -1
    else:
        if res >0:
            pass
        else:
            y = res*(-1)+1
            temp2 += y
            res = 1

print(min(temp1,temp2))
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
xl = list(map(int, input().split())) 
yl = list(map(int, input().split())) 

xsum = sum(xl)
ysum = sum(yl)
for i in range(n):
    xi += xsum - xl[i]*(n-i)
    xsum -= xl[i] 
    
for j in range(m):
    yi += ysum - yl[j]*(m-j)
    ysum -= yl[j]

print(xi*yi)

Fixed submission:
n,m = map(int, input().split())
xl = list(map(int, input().split())) 
yl = list(map(int, input().split())) 

xl = list(map(lambda x: x-xl[0],xl))
yl = list(map(lambda x: x-yl[0],yl))

xi=0
yi=0
mod = 10**9+7
xsum = sum(xl)
ysum = sum(yl)
for i in range(n):
    xi += (xsum - xl[i]*(n-i)) % mod
    xsum -= xl[i] 
    
for j in range(m):
    yi += (ysum - yl[j]*(m-j)) % mod
    ysum -= yl[j]

print(xi*yi % mod)

Buggy python submission (verdict: Runtime Error):
n,m= input().split()
xl = list(map(int, input().split())) 
yl = list(map(int, input().split())) 

xsum = sum(xl)
ysum = sum(yl)
for i in range(n):
    xi += xsum - xl[i]*(n-i)
    xsum -= xl[i] 
    
for j in range(m):
    yi += ysum - yl[j]*(m-j)
    ysum -= yl[j]

print(xi*yi)

Fixed submission:
n,m = map(int, input().split())
xl = list(map(int, input().split())) 
yl = list(map(int, input().split())) 

xl = list(map(lambda x: x-xl[0],xl))
yl = list(map(lambda x: x-yl[0],yl))

xi=0
yi=0
mod = 10**9+7
xsum = sum(xl)
ysum = sum(yl)
for i in range(n):
    xi += (xsum - xl[i]*(n-i)) % mod
    xsum -= xl[i] 
    
for j in range(m):
    yi += (ysum - yl[j]*(m-j)) % mod
    ysum -= yl[j]

print(xi*yi % mod)
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())

if n*2 <= m:
    ma = m-n*2
    ans = n+(ma//4)
    
else:
    ans = ma//2

print(ans)

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

if n*2 <= m:
    ma = m-n*2
    ans = n+(ma//4)
    
else:
    ans = m//2

print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())

nl = [list(input()) for _ in range(n)]

ml = [list(input()) for _ in range(m)]



for i in range (0,n-(n-m)):
    for j in range (0,n-(n-m)):
        if nl[i][j] ==ml[0][0]:
            flag = 1
            for k in range(0,m):
                for l in range(0,m):
                    if nl[i+k][j+l] !=ml[k][l]:
                        flag = 0
            if flag ==1:
                print("Yes")
                exit()
            
print("No")

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

nl = [list(input()) for _ in range(n)]

ml = [list(input()) for _ in range(m)]



for i in range (0,1+n-m):
    for j in range (0,1+n-m):
        if nl[i][j] ==ml[0][0]:
            flag = 1
            for k in range(0,m):
                for l in range(0,m):
                    if nl[i+k][j+l] !=ml[k][l]:
                        flag = 0
            if flag ==1:
                print("Yes")
                exit() 
print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print("1")

elif n ==2:
    print("2")
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

print(res)

Fixed submission:
n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print(1)
    
elif n ==2:
    print(2)
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

    print(res)

Buggy python submission (verdict: Runtime Error):
n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print(1)

elif n ==2:
    print(2)
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

print(res)

Fixed submission:
n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print(1)
    
elif n ==2:
    print(2)
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

    print(res)
Buggy python submission (verdict: Runtime Error):
a,b,x= map(int, input().split())
xb = b//x
xa = a//x
if a % x ==0:
    tx = 1

print(int(xb-xa+tx))

Fixed submission:
a,b,x= map(int, input().split())
tx =0
xb = b//x
xa = a//x
if a % x ==0:
    tx = 1

print(int(xb-xa+tx))
Buggy python submission (verdict: Runtime Error):
N,x= map(int, input().split())
Alist = list(map(int, input().split())) 

if Alist[0] >x:
    res = Alist[0]-x
    Alist[0] = x
    
for i in range(0,N-1):    
    if Alist[i] + Alist[i+1] > x:
        de = Alist[i+1] + Alist[i] - x
        Alist[i+1] = Alist[i+1] - de
        res = res + de 

print(res)

Fixed submission:
N,x= map(int, input().split())
Alist = list(map(int, input().split())) 
res = 0
if Alist[0] >x:
    res = Alist[0]-x
    Alist[0] = x
    
for i in range(0,N-1):    
    if Alist[i] + Alist[i+1] > x:
        de = Alist[i+1] + Alist[i] - x
        Alist[i+1] = Alist[i+1] - de
        res = res + de 

print(res)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ab = [list(map(int, input().split())) for _ in range(n)]

x = ab[0][0]
y = ab[0][1]
j = 1
flg = True
for i in range(1,n):
    xx = ab[i][0]
    yy = ab[i][1]
    while flg:
        if x> j*xx or y > j*yy:
            j +=1
        else:
            x = xx *j
            y = yy *j
            break
    j = 1

print(x+y)

Fixed submission:
n = int(input())

ab = [list(map(int, input().split())) for _ in range(n)]

x = ab[0][0]
y = ab[0][1]
j = 1
flg = True
for i in range(1,n):
    xx = ab[i][0]
    yy = ab[i][1]
    j = max(x//xx,y//yy)
    while flg:
        if x> j*xx or y > j*yy:
            j +=1
        else:
            x = xx *j
            y = yy *j
            break

print(x+y)

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

ab = [list(map(int, input().split())) for _ in range(n)]

x = ab[0][0]
y = ab[0][1]
j = 1
for i in range(1,n):
    flg = True
    xx = ab[i][0]
    yy = ab[i][1]
    while flg:
        if x> j*xx or y > j*yy:
            j +=1
        else:
            x = xx *j
            y = yy *j
            flg =False
    j = 1

print(x+y)

Fixed submission:
n = int(input())

ab = [list(map(int, input().split())) for _ in range(n)]

x = ab[0][0]
y = ab[0][1]
j = 1
flg = True
for i in range(1,n):
    xx = ab[i][0]
    yy = ab[i][1]
    j = max(x//xx,y//yy)
    while flg:
        if x> j*xx or y > j*yy:
            j +=1
        else:
            x = xx *j
            y = yy *j
            break

print(x+y)
Buggy python submission (verdict: Runtime Error):
if len(slist) ==2:
    if len(set(slist)) ==1:
        print(1,2)
        exit()
    else:
        print("-1 -1")
        exit()

else:
    for i in range(1,len(slist)-1):
        if len(set(slist[i-1:i+2])) !=3:
            print(i,3)
            exit()
            
    print("-1 -1")

Fixed submission:
s = input()
slist = list(s)

if len(slist) ==2:
    if len(set(slist)) ==1:
        print(1,2)
        exit()
    else:
        print("-1 -1")
        exit()

else:
    for i in range(1,len(slist)-1):
        if len(set(slist[i-1:i+2])) !=3:
            print(i,i+2)
            exit()
            
    print("-1 -1")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

cnt = 0
for i in range(1, N):
  for j in range(1, N//i + 1):
    if N - i * j >= 1:
      cnt += 1

print(cnt)

Fixed submission:
N = int(input())

cnt = 0
for i in range(1, N):
  j =  (N - 1)//i
  cnt += j

print(cnt)
Buggy python submission (verdict: Runtime Error):
def root(x):
  if F[x] < 0:
    return x
  else:
    F[x] = root(F[x])
    return F[x]

def unite(x, y):
  rx = root(x)
  ry = root(y)
  if rx == ry:
    return
  if rx > ry:
    x, y = y, x
  F[x] += F[y]
  F[y] = x

N, M = map(int, input().split())
F = [-1] * N

for m in range(M):
  a, b = map(int, input().split())
  unite(a - 1, b - 1)
ans = 0
for f in F:
  ans = min(ans, f)
print(-ans)


Fixed submission:
def root(x):
  if F[x] < 0:
    return x
  else:
    F[x] = root(F[x])
    return F[x]

def unite(x, y):
  x = root(x)
  y = root(y)
  if x == y:
    return
  if x > y:
    x, y = y, x
  F[x] += F[y]
  F[y] = x

N, M = map(int, input().split())
F = [-1] * N

for m in range(M):
  a, b = map(int, input().split())
  unite(a - 1, b - 1)
ans = 0
for f in F:
  ans = min(ans, f)
print(-ans)
Buggy python submission (verdict: Time Limit Exceeded):
H, W, M = map(int, input().split())

Hc = [0 for i in range(H)]
Wc = [0 for i in range(W)]
HW = [[0 for i in range(W)] for i in range(H)]

for m in range(M):
  h, w = map(int, input().split())
  Hc[h - 1] += 1
  Wc[w - 1] += 1
  HW[h - 1][w - 1] = 1
Hcmax = max(Hc)
Hcmax_idx = [i for i, x in enumerate(Hc) if x == Hcmax] 
Wcmax = max(Wc)
Wcmax_idx = [i for i, x in enumerate(Wc) if x == Wcmax] 

ans = Hcmax + Wcmax - 1
f = False
for i in Hcmax_idx:
  for j in Wcmax_idx:
    if HW[i][j] == 0:
      ans = Hcmax + Wcmax
      f = True
      break
  if f:
    break
print(ans)

Fixed submission:
H, W, M = map(int, input().split())

Hc = [0 for i in range(H)]
Wc = [0 for i in range(W)]
B = []

for m in range(M):
  h, w = map(int, input().split())
  Hc[h - 1] += 1
  Wc[w - 1] += 1
  B.append((h - 1, w - 1))
Hcmax = max(Hc)
Hcmax_idx = [i for i, x in enumerate(Hc) if x == Hcmax] 
Wcmax = max(Wc)
Wcmax_idx = [i for i, x in enumerate(Wc) if x == Wcmax] 

ans = Hcmax + Wcmax - 1
B = set(B)
f = False
for i in Hcmax_idx:
  if f:
    break
  for j in Wcmax_idx:
    if (i, j) not in B:
      ans = Hcmax + Wcmax
      f = True
      break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
H, W, M = map(int, input().split())

Hc = [0 for i in range(H)]
Wc = [0 for i in range(W)]
HW = [[0 for i in range(W)] for i in range(H)]

for m in range(M):
  h, w = map(int, input().split())
  Hc[h - 1] += 1
  Wc[w - 1] += 1
  HW[h - 1][w - 1] = 1
Hcmax = max(Hc)
Hcmax_idx = [i for i, x in enumerate(Hc) if x == Hcmax] 
Wcmax = max(Wc)
Wcmax_idx = [i for i, x in enumerate(Wc) if x == Wcmax] 

ans = 0
for i in Hcmax_idx:
  for j in Wcmax_idx:
    if HW[i][j] == 1:
      t = Hcmax + Wcmax - 1
    else:
      t = Hcmax + Wcmax
    ans = max(ans, t)
print(ans)

Fixed submission:
H, W, M = map(int, input().split())

Hc = [0 for i in range(H)]
Wc = [0 for i in range(W)]
B = []

for m in range(M):
  h, w = map(int, input().split())
  Hc[h - 1] += 1
  Wc[w - 1] += 1
  B.append((h - 1, w - 1))
Hcmax = max(Hc)
Hcmax_idx = [i for i, x in enumerate(Hc) if x == Hcmax] 
Wcmax = max(Wc)
Wcmax_idx = [i for i, x in enumerate(Wc) if x == Wcmax] 

ans = Hcmax + Wcmax - 1
B = set(B)
f = False
for i in Hcmax_idx:
  if f:
    break
  for j in Wcmax_idx:
    if (i, j) not in B:
      ans = Hcmax + Wcmax
      f = True
      break
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

def isPrime(n):
  if n == 1:
    return False
  for k in range(2, int(math.sqrt(n)) + 1):
    if n % k == 0:
      return False
  return True

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

if len(A) == 1:
  print(N)
  exit()

if A[0] == 1 and A[1] == 1:
  print(N)
  exit()
if A[0] == 1 and A[1] != 1:
  print(N - 1)
  exit()

for i in range(N):
  x = A[i]
  if isPrime(x):
    if i - 1 >= 0:
      if x == A[i - 1]:
        cnt -= 1
        continue
    if i + 1 < N:
      if x == A[i + 1]:
        cnt -= 1
        continue
    continue
    
  for j in range(i):
    y = A[j]
    if x % y == 0:
      cnt -= 1
      break
print(cnt)


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

for i in range(len(X)):
  if X[i] == 0:
    print(i + 1)
Buggy python submission (verdict: Time Limit Exceeded):
import math
def isPrime(n):
  if n == 1:
    return False
  for k in range(2, int(math.sqrt(n)) + 1):
    if n % k == 0:
      return False
  return True

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

if N == 1:
  print(N)
  exit()

if A[0] == 1 and A[1] == 1:
  print(0)
  exit()
if A[0] == 1 and A[1] != 1:
  print(1)
  exit()

for i in range(N):
  x = A[i]
  if isPrime(x):
    if i - 1 >= 0 and x == A[i - 1]:
        cnt -= 1
        continue
    if i + 1 < N and x == A[i + 1]:
        cnt -= 1
        continue
    continue
    
  for j in range(min(i + 2, N)):
    if i == j:
      continue
    y = A[j]
    if x % y == 0:
      cnt -= 1
      break
print(cnt)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
m = A[-1]
B = [0] * m
for a in A:
  B[a - 1] += 1
  if B[a - 1] == 1:
    for j in range(a * 2, m + 1, a):
      B[j - 1] = 2
print(B.count(1))

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

def isPrime(n):
  if n == 1:
    return False
  for k in range(2, int(math.sqrt(n)) + 1):
    if n % k == 0:
      return False
  return True

def isDiv(x, y):
  if x % y == 0:
    return True
  else:
    return False

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

if A[0] == 1 and A[1] == 1:
  print(N)
  exit()
if A[0] == 1 and A[1] != 1:
  print(N - 1)
  exit()

for i in range(N):
  x = A[i]
  if isPrime(x):
    if i - 1 >= 0:
      y = A[i - 1]
      if isDiv(x, y):
        cnt -= 1
        continue
    if i + 1 < N:
      y = A[i + 1]
      if isDiv(x, y):
        cnt -= 1
        continue
    continue
  for j in range(N):
    if i == j:
      continue

    y = A[j]
    if x < y:
      break
    if isDiv(x, y):
      cnt -= 1
      break
print(cnt)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
m = A[-1]
B = [0] * m
for a in A:
  B[a - 1] += 1
  if B[a - 1] == 1:
    for j in range(a * 2, m + 1, a):
      B[j - 1] = 2
print(B.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = sorted(list(map(int, input().split())))
cnt = N
for i in range(N):
  for j in range(N):
    if i == j:
      continue
    if A[j] > A[i]:
      break
    if A[i] % A[j] == 0:
      cnt -= 1
      break
print(cnt)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
m = A[-1]
B = [0] * m
for a in A:
  B[a - 1] += 1
  if B[a - 1] == 1:
    for j in range(a * 2, m + 1, a):
      B[j - 1] = 2
print(B.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = sorted(list(map(int, input().split())))
cnt = N
for i in range(N):
  for j in range(N):
    if i == j:
      continue
    if A[i] % A[j] == 0:
      cnt -= 1
      break
print(cnt)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
m = A[-1]
B = [0] * m
for a in A:
  B[a - 1] += 1
  if B[a - 1] == 1:
    for j in range(a * 2, m + 1, a):
      B[j - 1] = 2
print(B.count(1))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

ans = 1
for a in A:
  ans *= a
  if ans == 0:
    break

print(ans if ans <= 10**18 else -1)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
ans = 1
for a in A:
  ans *= a
  if ans == 0:
    break
  if ans > 10**18:
    ans = -1
    break

print(ans)

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

ans = 1
for a in A:
  ans *= a

print(ans if ans <= 10**18 else -1)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
ans = 1
for a in A:
  ans *= a
  if ans == 0:
    break
  if ans > 10**18:
    ans = -1
    break

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

if S = "ABC":
  print("ARC")
else:
  print("ABC")

Fixed submission:
S = input()

if S == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
H = list(map(int, input().split()))
AB = []
cnt = 0
for i in range(M):
  a, b = map(int, input().split())
  ab = sorted([a, b])
  if AB.count(ab) == 0:
    AB.append(ab)
  
for i in range(1, N+1):
  flag = True
  for ab in AB:
    if ab[0] == i:
      x = ab[1]
      if H[i - 1] <= H[x - 1]:
        flag = False
        break
    elif ab[1] == i:
      x = ab[0]
      if H[i - 1] <= H[x - 1]:
        flag = False
        break
  if flag:
    cnt += 1
      
print(cnt)

Fixed submission:
N, M = map(int, input().split())
H = list(map(int, input().split()))
m = [0] * N
cnt = 0

for _ in range(M):
  a, b = map(int, input().split())
  m[a - 1] = max(m[a - 1], H[b - 1])
  m[b - 1] = max(m[b - 1], H[a - 1])

for i in range(N):
  if H[i] > m[i] or m[i] == 0:
    cnt += 1

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
H = list(map(int, input().split()))
AB = []
cnt = 0
for i in range(M):
  a, b = map(int, input().split())
  AB.append(sorted([a, b]))
  
for i in range(1, N+1):
  flag = True
  for ab in AB:
    if ab[0] == i:
      x = ab[1]
      if H[i - 1] <= H[x - 1]:
        flag = False
    elif ab[1] == i:
      x = ab[0]
      if H[i - 1] <= H[x - 1]:
        flag = False
  if flag:
    cnt += 1
      
print(cnt)

Fixed submission:
N, M = map(int, input().split())
H = list(map(int, input().split()))
m = [0] * N
cnt = 0

for _ in range(M):
  a, b = map(int, input().split())
  m[a - 1] = max(m[a - 1], H[b - 1])
  m[b - 1] = max(m[b - 1], H[a - 1])

for i in range(N):
  if H[i] > m[i] or m[i] == 0:
    cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
N, M = list(int, input().split())

print(int(N * (N - 1) / 2 + M * (M - 1) / 2))


Fixed submission:
N, M = map(int, input().split())

print(int(N * (N - 1) / 2 + M * (M - 1) / 2))
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split
f = False
n = int(A / 8 * 100)
while n * 0.08 //1 == A:
  if n * 0.1 // 1 == B:
    f = True
    break
  n += 1
print(n if f else -1)

Fixed submission:
A, B = map(int, input().split())
f = False
ans = 0
for i in range(1, 1100):
  if i * 8 // 100 == A and i // 10 == B:
    f = True
    ans = i
    break
print(ans if f else -1)
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N%2 == 0
  print(N/2)
else:
  print(N/2 + 1)

Fixed submission:
N = int(input())

if N%2 == 0:
  print(int(N/2))
else:
  print(int(N/2 + 1))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(M)]
ans = 0
exist = False
if N == 1:
  x = 0
else:
  x = 10 ** (N - 1)
for i in range(x, 1000):
  s = str(i)
  f = True
  for j in range(len(s)):
    if int(s[sc[j][0] - 1]) != sc[j][1]:
      f = False
      break
  if f:
    ans = i
    exist = True
    break
print(ans if exist else -1)

Fixed submission:
N, M = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(M)]
ans = 0
exist = False
if N == 1:
  x = 0
else:
  x = 10 ** (N - 1)
for i in range(x, 1000):
  s = str(i)
  f = True
  for j in range(M):
    if int(s[sc[j][0] - 1]) != sc[j][1]:
      f = False
      break
  if f:
    ans = i
    exist = True
    break
print(ans if exist else -1)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input())

if N == M:
  print("Yes")
else:
  print("No")

Fixed submission:
N, M = map(int, input().split())

if N == M:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
S, T = map(str, input().split())

print("{}{}",format(T, S))

Fixed submission:
S, T = map(str, input().split())

print("{}{}".format(T, S))
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())

if K <= A:
  res_A = A - K
elif A < K <= A + B:
  res_A = 0
  res_B = B - ( K - A )
else:
  res_A = 0
  res_B = 0
print(res_A, res_B)

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

if K <= A:
  A = A - K
elif A < K <= A + B:
  B = B - ( K - A )
  A = 0
else:
  A = 0
  B = 0
print(A, B)
Buggy python submission (verdict: Runtime Error):
S = []
S.append(int(input())
S.append(int(input())

nums = [1, 2, 3]

nums = nums - S

print(nums[0])

Fixed submission:
A = int(input())
B = int(input())

nums = [1, 2, 3]

nums.remove(A)
nums.remove(B)

print(nums[0])
Buggy python submission (verdict: Runtime Error):
A = list(map(int, input().split()))

total = sum(A)

if total > 22:
  print("bust")
else:
  print("win)

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

total = sum(A)

if total > 21:
  print("bust")
else:
  print("win")

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

total = sum(A)

if A > 22:
  print("bust")
else:
  print("win)

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

total = sum(A)

if total > 21:
  print("bust")
else:
  print("win")