Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse = True)
ans = 0
while len(A)>= 2:
  ans += A[0]-A[1]
  A = A[2:]
if len(A) = 1:
  ans += A[0]
print(ans)
  
  


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse = True)
ans = 0
while len(A)>= 2:
  ans += A[0]-A[1]
  A = A[2:]
if len(A) == 1:
  ans += A[0]
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
flag = 1
t1 = 0
x1 = 0
x2 = 0
for i in range(N):
  t2, x2, y2 = map(int, input().split())
  dt = t2-t1
  dx = abs(x2-x1)
  dy = abs(y2-y1)
  if dt<(dx+dy) or dt %2 != (dx+dy) % 2:
    flag = 0
    break
  t1 = t2
  x1 = x2
  y1 = y2
print("Yes" if flag else "No")

Fixed submission:
N = int(input())
flag = 1
t1 = 0
x1 = 0
y1 = 0
for i in range(N):
  t2, x2, y2 = map(int, input().split())
  dt = t2-t1
  dx = abs(x2-x1)
  dy = abs(y2-y1)
  if dt<(dx+dy) or dt %2 != (dx+dy) % 2:
    flag = 0
    break
  t1 = t2
  x1 = x2
  y1 = y2
print("Yes" if flag else "No")
Buggy python submission (verdict: Runtime Error):
flag = 1
a = "".join(S[:A])
b = "".join(S[A+1:])
if not(str.isdecimal(a)):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(b)):
  flag = 0
if flag == 1:
  print("Yes")
else:
  print("No")


Fixed submission:
A, B = map(int, input().split())
S = list(input())
flag = 1
a = "".join(S[:A])
b = "".join(S[A+1:])
if not(str.isdecimal(a)):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(b)):
  flag = 0
if flag == 1:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
S = list(input())
flag = 1
if not(str.isdecimal(S[:A])):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(s[A+1:])):
  flag = 0
if flag == 1:
  print("Yes")
else:
  print("No")


Fixed submission:
A, B = map(int, input().split())
S = list(input())
flag = 1
a = "".join(S[:A])
b = "".join(S[A+1:])
if not(str.isdecimal(a)):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(b)):
  flag = 0
if flag == 1:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
print(sum(i for i in range(N+1)) if A <= sum(map(int, str(i)))<= B)

Fixed submission:
N, A, B = map(int, input().split())
print(sum(i for i in range(N+1) if A <= sum(map(int, str(i)))<= B))
Buggy python submission (verdict: Runtime Error):
L = [2, 1]
for i in range(84):
  L.append(L[i]+L[i+1])
A = int(input())
print(L[A])

Fixed submission:
L = [2, 1]
for i in range(85):
  L.append(L[i]+L[i+1])
A = int(input())
print(L[A])

Buggy python submission (verdict: Runtime Error):
L = [2, 1]
for i in range(84):
  L.append(L[i]+L[i+1])
A = int(input())
print(L[A+1])

Fixed submission:
L = [2, 1]
for i in range(85):
  L.append(L[i]+L[i+1])
A = int(input())
print(L[A])

Buggy python submission (verdict: Runtime Error):
L = [2, 1]
for i in range(84):
  L.append(L[i]+L[L+1])
A = int(input())
print(L[A+1])

Fixed submission:
L = [2, 1]
for i in range(85):
  L.append(L[i]+L[i+1])
A = int(input())
print(L[A])
Buggy python submission (verdict: Runtime Error):
 = list(input())
B = list(map(int, A))
for i in range(2**3):
  ans = B[0]
  for j in range(3):
    if ((i>>j) & 1):
      ans += B[j+1]
    else:
      ans -= B[j+1]
  if ans == 7:
    for k in range(3):
      print(B[k], end = "")
      if ((i>>k) & 1):
        print("+", end = "")
      else:
        print("-", end = "")
    print(B[3], end = "")
    print("=7")
    break


Fixed submission:
A = list(input())
B = list(map(int, A))
for i in range(2**3):
  ans = B[0]
  for j in range(3):
    if ((i>>j) & 1):
      ans += B[j+1]
    else:
      ans -= B[j+1]
  if ans == 7:
    for k in range(3):
      print(B[k], end = "")
      if ((i>>k) & 1):
        print("+", end = "")
      else:
        print("-", end = "")
    print(B[3], end = "")
    print("=7")
    break
Buggy python submission (verdict: Runtime Error):
H, W= map(int, input().split())
minpath = [[float("inf")]*10 for _ in range(10)]
path = [list(map(int, input().split())) for i in range(10)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            minpath[j][k] = min(minpath[j][k], path[j][i]+path[i][k])
ans = 0
for i in range(H):
    A = list(map(int, input().split()))
    for j in range(W):
        if A[j] != -1 and A[j] != 1:
            ans += minpath[j][1]
print(ans)
            




Fixed submission:
H, W= map(int, input().split())
minpath = [[float("inf")]*10 for _ in range(10)]
path = [list(map(int, input().split())) for i in range(10)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            path[j][k] = min(path[j][k], path[j][i]+path[i][k])
ans = 0
for i in range(H):
    A = list(map(int, input().split()))
    for j in range(W):
        if A[j] == -1 or A[j] == 1:
            continue
        else:
            ans += path[A[j]][1]
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = set()
for i in range(N):
  x = int(input())
  if x in A:
    A.remove(x)
  else:
    A.append(x)
print(len(A))

Fixed submission:
N = int(input())
A = set()
for i in range(N):
  x = int(input())
  if x in A:
    A.remove(x)
  else:
    A.add(x)
print(len(A))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
count = [0]*(10**6)
for i in range(N):
    count[A[i]] += 1
    count[A[i+1]] += 1
    count[A[i+2]] += 1
print(max(count))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
count = [0]*(10**6)
for i in range(N):
    count[A[i]] += 1
    count[A[i]+1] += 1
    count[A[i]+2] += 1
print(max(count))
Buggy python submission (verdict: Runtime Error):
S = list(input())
S = set(S)
for i in range(26):
  if not(chr(97+i) in S):
    ans = chr(97+i)
    break
print(ans)


Fixed submission:
S = list(input())
S = set(S)
ans = "None"
for i in range(26):
  if not(chr(97+i) in S):
    ans = chr(97+i)
    break
print(ans)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i])
print(B[N-2])


Fixed submission:
import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//math.gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//math.gcd(A[i+2], B[i])
print(B[N-2])


Fixed submission:
import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)

Buggy python submission (verdict: Runtime Error):
from math import gcd
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i])
print(B[N-2])


Fixed submission:
import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)

Buggy python submission (verdict: Runtime Error):
from math import gcd
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i])
print(B[N-2])


Fixed submission:
import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)

Buggy python submission (verdict: Runtime Error):
from math import gcd
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i])
print(B[N-1])

Fixed submission:
import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
S = list(input())[::-1]
s = len(S)
ans = 0
for i in range(s):
  if S[2*i:(2*i+s)/2+0.5] == S[(2*i+s)/2+0.5:]:
    ans = s-2*i
    break
print(ans)
    


Fixed submission:
S = list(input())[::-1]
s = len(S)
ans = -1
for i in range(1, s):
  if S[2*i:(2*i+s-1)//2+1] == S[(2*i+s-1)//2+1:]:
    ans = s-2*i
    break
print(ans)
Buggy python submission (verdict: Runtime Error):
def DFS(now, visited):
    ans = 0
    if all(visited):
        return 1
    for i in range(N):
        if path[now][i] and visited[i] == False:
            visited[i] = True
            ans += DFS(i, visited)
            visited[i] = False
    return ans
    


N, M = map(int, input().split())
path = [[0]*N for i in range(M)]
for i in range(M):
    a, b = map(int, input().split())
    path[a-1][b-1] = 1
    path[b-1][a-1] = 1
visited = [False]*N
visited[0] = True
print(DFS(0, visited))


Fixed submission:
N, M = map(int, input().split())
pathmat=[[0]*N for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    pathmat[a-1][b-1] = 1
    pathmat[b-1][a-1] = 1

visited =  [False]*N
visited[0] = True


def DFS(now, visited):
    if all(visited):
        return 1
    ans = 0
    for i in range(N):
        if not pathmat[now][i]:
            continue
        if visited[i]:
            continue
        visited[i]=True
        ans += DFS(i, visited)
        visited[i]=False
    return ans

print(DFS(0,visited))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
pathmat=[[0]*N for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    pathmat[a-1][b-1] = 1
    pathmat[b-1][a-1] = 1

visited =  [False]*N
visited[0] = True
ans = 0

def DFS(now, visited):
    if all(visited):
        return 1
    for i in range(N):
        if not pathmat[now][i]:
            continue
        if visited[i]:
            continue
        visited[i]=True
        ans += DFS(i, visited)
        visited[i]=False
    return ans

print(DFS(0,visited))

        
            


Fixed submission:
N, M = map(int, input().split())
pathmat=[[0]*N for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    pathmat[a-1][b-1] = 1
    pathmat[b-1][a-1] = 1

visited =  [False]*N
visited[0] = True


def DFS(now, visited):
    if all(visited):
        return 1
    ans = 0
    for i in range(N):
        if not pathmat[now][i]:
            continue
        if visited[i]:
            continue
        visited[i]=True
        ans += DFS(i, visited)
        visited[i]=False
    return ans

print(DFS(0,visited))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
path = [[float("inf")]*N for i in range(N)]
ans = [[[float("inf")]]*N for i in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    path[a-1][b-1] = c
    path[b-1][a-1] = c
    ans[a-1][b-1] = [i]
    ans[b-1][a-1] = [i]
for i in range(N):
    path[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            if path[i][k]+path[k][j] < path[i][j]:
                path[i][j] = path[i][k]+path[k][j]
                ans[i][j] = ans[i][k]+ans[k][j]
total = []
for i in range(N):
    for j in range(N):
        total = ans[i][j] + total
print(M-len(set(total))+1)
        


Fixed submission:
N, M = map(int, input().split())
path = [[float("inf")]*N for i in range(N)]
ans = [[[float("inf")]]*N for i in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    path[a-1][b-1] = c
    path[b-1][a-1] = c
    ans[a-1][b-1] = [i]
    ans[b-1][a-1] = [i]
for i in range(N):
    path[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            if path[i][k]+path[k][j] < path[i][j]:
                path[i][j] = path[i][k]+path[k][j]
                ans[i][j] = ans[i][k]+ans[k][j]
total = set()
for i in range(N):
    for j in range(N):
        p = set(ans[i][j])
        total = total|p
print(M-len(set(total))+1)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
path = [[float("inf")]*N for i in range(N)]
ans = [[[float("inf")]]*N for i in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    path[a-1][b-1] = c
    path[b-1][a-1] = c
    ans[a-1][b-1] = [i]
    ans[b-1][a-1] = [i]
for i in range(N):
    path[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            if path[i][k]+path[k][j] < path[i][j]:
                path[i][j] = path[i][k]+path[k][j]
                ans[i][j] = ans[i][k]+ans[k][j]
total = []
for i in range(N):
    for j in range(N):
        if ans[i][j] != [float("inf")]:
            total = ans[i][j] + total
print(M-len(set(total)))
        


Fixed submission:
N, M = map(int, input().split())
path = [[float("inf")]*N for i in range(N)]
ans = [[[float("inf")]]*N for i in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    path[a-1][b-1] = c
    path[b-1][a-1] = c
    ans[a-1][b-1] = [i]
    ans[b-1][a-1] = [i]
for i in range(N):
    path[i][i] = 0
for k in range(N):
    for i in range(N):
        for j in range(N):
            if path[i][k]+path[k][j] < path[i][j]:
                path[i][j] = path[i][k]+path[k][j]
                ans[i][j] = ans[i][k]+ans[k][j]
total = set()
for i in range(N):
    for j in range(N):
        p = set(ans[i][j])
        total = total|p
print(M-len(set(total))+1)
Buggy python submission (verdict: Runtime Error):
H, W  = map(int, input().split())
X = [list(input().split()) for i in range(H)]
for i in range(2*N):
  print(*X[int(i/2)])

Fixed submission:
H, W  = map(int, input().split())
X = [list(input().split()) for i in range(H)]
for i in range(2*H):
  print(*X[int(i/2)])
Buggy python submission (verdict: Runtime Error):
S = list(input())
A = []
for i in S:
  if i in A:
    remove(i)
  else:
    A.append(i)
if len(A) == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
S = list(input())
A = []
for i in S:
  if i in A:
    A.remove(i)
  else:
    A.append(i)
if len(A) == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = input()
A = list(map(int, input().split()))

answer = 1
for Ai in A:
    answer *= Ai

if answer > 10 ** 18:
    answer = -1

print(answer)


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

haz_zero = 0 in A
if haz_zero:
    print(0)
    exit()

answer = 1
for Ai in A:
    answer *= Ai
    if answer > 10 ** 18:
        answer = -1
        break

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

A, B = list(input().split())
A = int(A)

# A *= 100
B = float(B)
B = math.floor( * 100)

AB = A * B / 100
floored = int(math.floor(AB))
print(floored)

# AB = A * B
# AB = str(AB)
# AB = AB[0:-2]
# AB = 0 if AB == '' else AB
# print(AB)


Fixed submission:
import math

A, B = list(input().split())
A = int(A)

# A *= 100
# B = float(B)
# B = math.floor(B * 100)
B = B.replace('.', '').ljust(3, '0')
B = int(B)

# AB = A * B / 100
# floored = int(math.floor(AB))
# print(floored)

AB = A * B
AB = str(AB)
AB = AB[0:-2]
AB = 0 if AB == '' else AB
print(AB)

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

A, B = list(input().split())
A = int(A)

# A *= 100
B = math.floor(B * 100)

AB = A * B / 100
floored = int(math.floor(AB))
print(floored)

# AB = A * B
# AB = str(AB)
# AB = AB[0:-2]
# AB = 0 if AB == '' else AB
# print(AB)


Fixed submission:
import math

A, B = list(input().split())
A = int(A)

# A *= 100
# B = float(B)
# B = math.floor(B * 100)
B = B.replace('.', '').ljust(3, '0')
B = int(B)

# AB = A * B / 100
# floored = int(math.floor(AB))
# print(floored)

AB = A * B
AB = str(AB)
AB = AB[0:-2]
AB = 0 if AB == '' else AB
print(AB)

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

A, B = list(input().split())
A = int(A)
B = '{:.2f}'.format(B).replace('.', '')
B = int(B)

# A *= 100
# B = int(B * 100)


AB = A * B / 100
floored = int(math.floor(AB))
print(floored)

# AB = A * B
# AB = str(AB)
# AB = AB[0:-2]
# AB = 0 if AB == '' else AB
# print(AB)


Fixed submission:
import math

A, B = list(input().split())
A = int(A)

# A *= 100
# B = float(B)
# B = math.floor(B * 100)
B = B.replace('.', '').ljust(3, '0')
B = int(B)

# AB = A * B / 100
# floored = int(math.floor(AB))
# print(floored)

AB = A * B
AB = str(AB)
AB = AB[0:-2]
AB = 0 if AB == '' else AB
print(AB)

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

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

multipled = A * B
floored = math.floor(multipled)

print(floored)


Fixed submission:
import math

A, B = list(input().split())
A = int(A)

# A *= 100
# B = float(B)
# B = math.floor(B * 100)
B = B.replace('.', '').ljust(3, '0')
B = int(B)

# AB = A * B / 100
# floored = int(math.floor(AB))
# print(floored)

AB = A * B
AB = str(AB)
AB = AB[0:-2]
AB = 0 if AB == '' else AB
print(AB)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
AB = [list(map(int, input().split())) for i in range(M)]
# print(N, M, H, AB)


dictionary = {}
for A, B in AB:
    if dictionary.get(A) is None:
        dictionary[A] = []
    if dictionary.get(B) is None:
        dictionary[B] = []

    dictionary[A].append(H[B - 1])
    dictionary[B].append(H[A - 1])
# print(dictionary)

count = 0
for i, heights in dictionary.items():
    # print(i, type(i), H[i - 1], heights)
    if H[i - 1] > max(heights):
        count += 1

import itertools

paths = list(itertools.chain.from_iterable(AB))
# print(paths)
for i in range(1, N + 1):
    if not i in paths:
        count += 1

print(count)


Fixed submission:
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
AB = [list(map(int, input().split())) for i in range(M)]
# print(N, M, H, AB)


dictionary = {}
for A, B in AB:
    if dictionary.get(A) is None:
        dictionary[A] = []
    if dictionary.get(B) is None:
        dictionary[B] = []

    dictionary[A].append(H[B - 1])
    dictionary[B].append(H[A - 1])
# print(dictionary)

count = 0
for i, heights in dictionary.items():
    # print(i, type(i), H[i - 1], heights)
    if H[i - 1] > max(heights):
        count += 1

import itertools

# paths = list(itertools.chain.from_iterable(AB))
# print(paths)
for i in range(1, N + 1):
    if dictionary.get(i) is None:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
from math import floor

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

x = None
if N < B:
    x = N

answer = floor(A * x / B) - A * floor(x / B)

print(answer)


Fixed submission:
from math import floor

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

x = None
if N < B:
    x = N
else:
    x = B
    x = B - 1
    # max_diff = 0
    # for _x in range(B, N + 1):
    #     diff = (x / B) - floor(x / B)
    #     if max_diff <= diff:
    #         max_diff = diff
    #         x = _x

answer = floor(A * x / B) - A * floor(x / B)

print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

gcd = lambda *numbers: reduce(math.gcd, numbers)

K = int(input())

answer = 0
for i in range(1, K + 1):
    for j in range(1, K + 1):
        for k in range(1, K + 1):
            answer += gcd(i, j, k)

print(answer)


Fixed submission:
import math
from functools import reduce

gcd = lambda *numbers: reduce(math.gcd, numbers)

K = int(input())

answer = 0
for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            answer += gcd(a, b, c)

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

inputted = list(map(int, input().split()))
N = inputted[0]
K = inputted[1]

candidate1 = N - K * math.floor(N / K)
candidate2 = K - remainder
answer = min(candidate1, candidate2)

print(answer)


Fixed submission:
import math

inputted = list(map(int, input().split()))
N = inputted[0]
K = inputted[1]

candidate1 = N % K
candidate2 = K - candidate1
answer = min(candidate1, candidate2)

print(answer)
Buggy python submission (verdict: Runtime Error):
from math import factorial

inputted = list(map(int, input().split()))
N = inputted[0]
M = inputted[1]

nPk = lambda n, k: factorial(n) / (factorial(k) * factorial(n - k))

answer = nPk(N, 2) +  nPk(M, 2)
answer = int(answer)

print(answer)


Fixed submission:
from math import factorial

inputted = list(map(int, input().split()))
N = inputted[0]
M = inputted[1]

nPk = lambda n, k: 0 if n - k < 0 else factorial(n) / (factorial(k) * factorial(n - k))

answer = nPk(N, 2) +  nPk(M, 2)
answer = int(answer)

print(answer)
Buggy python submission (verdict: Runtime Error):
inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = int(tax_price_a / 0.08)
price_10 = int(tax_price_b / 0.10)

if price_8 == price_10:
    print(price_8)
elif tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.u):
    print(price_10)
else:
    print(-1)


Fixed submission:
import math

inputted = list(map(int, input().split()))
tax_price_a = inputted[0]
tax_price_b = inputted[1]

price_8 = math.ceil(tax_price_a / 0.08)
price_10 = math.ceil(tax_price_b / 0.10)

if tax_price_b == int(price_8 * 0.1):
    print(price_8)
elif tax_price_a == int(price_10 * 0.08):
    print(price_10)
else:
    print('-1')
Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
sc = [list(map(int, input().split())) for i in range(M)]

answer = [None] * N
for si, ci in sc:
    digit = si - 1
    if answer[digit] is not None and answer[digit] != ci:
        print('-1')
        exit()
    
    answer[digit] = ci

for i, value in enumerate(answer):
    if answer[i] is None:
        answer[i] = 0

if (answer[0] == 0 and N == 3) or (answer[1] == 0 and N == 2):
    print('-1')
    exit()

answer = int(''.join(map(str, answer)))
print(answer)


Fixed submission:
N, M = list(map(int, input().split()))
sc = [list(map(int, input().split())) for i in range(M)]

answer = [None] * N
for si, ci in sc:
    digit = si - 1
    if answer[digit] is not None and answer[digit] != ci:
    # if answer[digit] != ci:
        print('-1')
        exit()
    
    answer[digit] = ci

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

if answer[0] is None and N == 1:
    answer[0] = 0
elif answer[0] is None:
    answer[0] = 1

for i, value in enumerate(answer):
    if answer[i] is None:
        answer[i] = 0

answer = int(''.join(map(str, answer)))
print(answer)

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

answer = [None] * N
for si, ci in sc:
    if answer[si - 1] > ci:
        answer[si - 1] = ci

if answer[0] is None or answer[0] == 0:
    print('-1')
    exit()

for i, value in enumerate(answer):
    if answer[i] is None:
        answer[i] = 0

answer = ''.join(map(str, answer))
print(answer)


Fixed submission:
N, M = list(map(int, input().split()))
sc = [list(map(int, input().split())) for i in range(M)]

answer = [None] * N
for si, ci in sc:
    digit = si - 1
    if answer[digit] is not None and answer[digit] != ci:
    # if answer[digit] != ci:
        print('-1')
        exit()
    
    answer[digit] = ci

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

if answer[0] is None and N == 1:
    answer[0] = 0
elif answer[0] is None:
    answer[0] = 1

for i, value in enumerate(answer):
    if answer[i] is None:
        answer[i] = 0

answer = int(''.join(map(str, answer)))
print(answer)