Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1
 
 

if C > D:
    pass_path = False
    for b in range(B-1,D):
        if S[b] == '#':
            continue
        if S[b-1] == '.' and S[b+1] == '.':
            pass_path = True
            break


if step(A,C) and step(B,D)  and pass_path == True:
    print('Yes')
else:
    print('No')
if step(A,C) and step(B,D)  and pass_path == True:
    print('Yes')
else:
    print('No')

Fixed submission:
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1

Ans = step(A,C) and step(B,D)
 
if C > D:
    pass_path = False
    for b in range(B-1,D):
        if S[b] == '#':
            continue
        if S[b-1] == '.' and S[b+1] == '.':
            pass_path = True
            break
    Ans = step(A,C) and step(B,D) and  pass_path


if Ans == True:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1
 
 
pass_path = False
if C > D:
    for b in range(B-1,D):
        if S[b-1] == '.' and S[b+1] == '.':
             path_pass = True
            continue
        elif S[b] == '#':
            break

if step(A,C) and step(B,D)  and pass_path == True:
    print('Yes')
else:
    print('No')

Fixed submission:
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1

Ans = step(A,C) and step(B,D)
 
if C > D:
    pass_path = False
    for b in range(B-1,D):
        if S[b] == '#':
            continue
        if S[b-1] == '.' and S[b+1] == '.':
            pass_path = True
            break
    Ans = step(A,C) and step(B,D) and  pass_path


if Ans == True:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1
 
 
pass_path = True

if C > D:
    for b in range(B-1,D):
        if S[b-1] == '.' and S[b+1] == '.':
            continue
        elif S[b] == '#':
            path_pass = False
            break

if step(A,C) and step(B,D)  and pass_path == True:
    print('Yes')
else:
    print('No')

Fixed submission:
N,A,B,C,D = map(int,input().split())
S = input()
 
def step(x,y):
    N_last = S[x:y-1]
    return N_last.find('##') == -1

Ans = step(A,C) and step(B,D)
 
if C > D:
    pass_path = False
    for b in range(B-1,D):
        if S[b] == '#':
            continue
        if S[b-1] == '.' and S[b+1] == '.':
            pass_path = True
            break
    Ans = step(A,C) and step(B,D) and  pass_path


if Ans == True:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int, input().split())

As = A.sort()
ans = As[len(N)-1] - As[0]
print(ans)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]

A.sort()
ans = A[N-1] - A[0]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

def sum_10(n):
  return sum([int(l) for l in str(n)])

li=[]
for i in range(1,N//2 +1):
  for k in range(N-N//2,N+1):
    if i + k == N:
      li.append(sum_10(i)+sum_10(k))
print(min(li))      

Fixed submission:
N = int(input())

def sum_10(n):
  return sum([int(l) for l in str(n)])

li=[]
for i in range(1,N//2 +1):
    if N - N//2 <= N - i <= N:
      li.append(sum_10(i)+sum_10(N - i))
print(min(li))

Buggy python submission (verdict: Runtime Error):
N = int(input())

def sum_10(n):
  return sum[int(l) for l in str(n)]

li=[]
for i in range(1,N//2 +1):
  for k in range(N-N//2,N+1):
    if i + k == N:
      li.append(sum_10(i)+sum_10(k))
print(min(li))      

Fixed submission:
N = int(input())

def sum_10(n):
  return sum([int(l) for l in str(n)])

li=[]
for i in range(1,N//2 +1):
    if N - N//2 <= N - i <= N:
      li.append(sum_10(i)+sum_10(N - i))
print(min(li))
Buggy python submission (verdict: Runtime Error):
S = input()
S_list = [S[i:i+1] for i in range(S)]
count = 0
for k in range(len(S)):
  if S_list[k]==o:
    count += 1
  else:
    pass
print(700 + 100*count)

Fixed submission:
S = input()
S_list = [S[i:i+1] for i in range(len(S))]
count = 0
for k in range(len(S)):
  if S_list[k] == 'o':
    count += 1
  else:
    pass
print(700 + 100 * count)
Buggy python submission (verdict: Runtime Error):
N = input()
A = input()

if N % 500 <= A:
  print('YES')
else:
  print('NO')

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

if N % 500 <= A:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0

for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500 *i + 100 *j + 50 *k == X
          count += 1

print(count)


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

count = 0

for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500 *i + 100 *j + 50 *k == X:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
A = [int(i) for i in input().split()]

l=[]
for i in range(N+1):
  l.append(A.count(i))

ls = sorted(l,reverse=True)

j= K
ans = 0
while ls[j] != 0:
  ans += ls[j]

print(ans)

Fixed submission:
s = input()
N = [int(s[i:i+1]) for i in range(len(s))]
count = 0
for i in range(len(N)):
  if N[i] == 1:
    count += 1
  else:
    pass 
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = [int(i) for i in input().split()]

l=[]
for i in range(N+1):
  l.append(A.count(i))

ls = sorted(l,reverse=True)

print(sum(ls[K:]))

Fixed submission:
import collections as co
N,K = map(int, input().split())
A = list(map(int, input().split()))

ldic = co.Counter(A)        
l = list(ldic.values())
ls = sorted(l,reverse=True)

print(sum(ls[K:]))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = [int(i) for i in input().split()]

l=[]
for i in range(N+1):
  l.append(A.count(i))

ls = sorted(l,reverse=True)

ans = N
for j in range(K):
  ans -= ls[j]

print(ans)

Fixed submission:
import collections as co
N,K = map(int, input().split())
A = list(map(int, input().split()))

ldic = co.Counter(A)        
l = list(ldic.values())
ls = sorted(l,reverse=True)

print(sum(ls[K:]))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
A = [int(i) for i in input().split()]

l=[]
for i in range(N+1):
  l.append(A.count(i))

ls = sorted(l,reverse=True)

j= K
ans = 0
while ls[j] != 0:
  ans += ls[j]

print(ans)

Fixed submission:
import collections as co
N,K = map(int, input().split())
A = list(map(int, input().split()))

ldic = co.Counter(A)        
l = list(ldic.values())
ls = sorted(l,reverse=True)

print(sum(ls[K:]))
Buggy python submission (verdict: Time Limit Exceeded):
K,S = map(int, input().split())

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

print(count)

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

count = 0
for i in range(K+1):
  for j in range(K+1):
    if  0 <= S - i - j <= K:
      count += 1
print(count)

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

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

print(count)

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

count = 0
for i in range(K+1):
  for j in range(K+1):
    if  0 <= S - i - j <= K:
      count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
N=int(input())
p=list(map(int,input().split()))
A=p.copy()
A.sort()
if p==A:
  print("YES")
else:
  i=p.index(max(p))
  min1=p[N-1]
  for j in range(N-2,0,-1):
    if p[j]<min1:
      min1=p[j]
      min_index=j
  p[i],p[min_index]=p[min_index],p[i]
  if p==A:
    print("YES")
  else:
    print("NO")

Fixed submission:
N=int(input())
p=list(map(int,input().split()))
A=p.copy()
A.sort()
if p==A:
  print("YES")
else:
  flag=0
  for i in range(N):
    for j in range(i):
      p[i],p[j]=p[j],p[i]
      if p==A:
        flag=1
        break
      else:
        p[i],p[j]=p[j],p[i]
    if flag==1:
      break
  if flag==0:
    print("NO")
  else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())

for i in range(N):
  if i == A.index(max(A)):
    A.pop(i)
    A.sort
    print(A[N-2])
  else:
    print(max(A))

Fixed submission:
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())
max1=max(A)
numbers_of_max1=0
for i in range(N):
  if A[i]==max1:
    numbers_of_max1+=1
    
if numbers_of_max1>1:
  for i in range(N):
    print(max1)
else:
  L=A.copy()
  L.pop(L.index(max1))
  max2 = max(L)
  for i in range(N):
    if A[i]==max1:
      print(max2)
    else:
      print(max1)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())
L=A.copy()
L.sort()
max1=L[N-1]
max2=L[N-2]
for i in range(N):
  if i == A.index(max1):
    print(max2)
  else:
    print(max1)

Fixed submission:
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())
max1=max(A)
numbers_of_max1=0
for i in range(N):
  if A[i]==max1:
    numbers_of_max1+=1
    
if numbers_of_max1>1:
  for i in range(N):
    print(max1)
else:
  L=A.copy()
  L.pop(L.index(max1))
  max2 = max(L)
  for i in range(N):
    if A[i]==max1:
      print(max2)
    else:
      print(max1)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())

for i in range(N):
  L = A.copy()
  L[i]=0
  L.sort()
  print(L[N-1])

Fixed submission:
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())
max1=max(A)
numbers_of_max1=0
for i in range(N):
  if A[i]==max1:
    numbers_of_max1+=1
    
if numbers_of_max1>1:
  for i in range(N):
    print(max1)
else:
  L=A.copy()
  L.pop(L.index(max1))
  max2 = max(L)
  for i in range(N):
    if A[i]==max1:
      print(max2)
    else:
      print(max1)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())

for i in range(N):
  L=[0 for i in range(N)]
  for j in range(N):
    L[j] = A[j]
  L[i]=0
  L.sort()
  print(L[N-1])

Fixed submission:
N=int(input())
A=[0 for i in range(N)]
for i in range(N):
  A[i]=int(input())
max1=max(A)
numbers_of_max1=0
for i in range(N):
  if A[i]==max1:
    numbers_of_max1+=1
    
if numbers_of_max1>1:
  for i in range(N):
    print(max1)
else:
  L=A.copy()
  L.pop(L.index(max1))
  max2 = max(L)
  for i in range(N):
    if A[i]==max1:
      print(max2)
    else:
      print(max1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
B =[]
i = N-1
M = 0
while(i>=0):
    sum1=0
    j = i + i
    while (j<N):
        sum1 += 1
        j+=i
    if sum1%2!=A[i]:
        M+=1
        B.append(i)
    i-=1
B.reverse
print(M)
for s in B:
    print(s,end=" ")

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

j = 0
while i>0:
    sum1=0
    j = i + i
    while j<=N:
        sum1 += B[j-1]
        sum1=(sum1+2)%2
        j=j+i
    B[i-1]+=(A[i-1]+sum1)
    B[i-1]=(B[i-1]+2)%2
    i=i-1
count=0
for s in B:
  if s == 1 :
    count+=1
print(count)
for i in range(N):
  if B[i]==1:
    print(i+1,end=" ")
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
mod = 2018
flag =0
for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)
    if mod = 0:
      flag = 1
      break
  if flag:
    break

print(mod)

Fixed submission:
A,B=map(int,input().split())
mod = 2018
flag =0
for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)
    if mod == 0:
      flag = 1
      break
  if flag:
    break

print(mod)

Buggy python submission (verdict: Time Limit Exceeded):
A,B=map(int,input().split())
mod = 2018

for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)

print(mod)

Fixed submission:
A,B=map(int,input().split())
mod = 2018
flag =0
for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)
    if mod == 0:
      flag = 1
      break
  if flag:
    break

print(mod)

Buggy python submission (verdict: Time Limit Exceeded):
A,B=map(int,input().split())
mod = 2018

for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    mod = min(mod, (x*j)%2019)

print(mod)

Fixed submission:
A,B=map(int,input().split())
mod = 2018
flag =0
for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)
    if mod == 0:
      flag = 1
      break
  if flag:
    break

print(mod)

Buggy python submission (verdict: Time Limit Exceeded):
A,B=map(int,input().split())
mod = 2018
for i in range(A,B):
  for j in range(i+1,B+1):
    mod = min(mod,(i*j)%2019)
print(mod)

Fixed submission:
A,B=map(int,input().split())
mod = 2018
flag =0
for i in range(A,B):
  x = i % 2019
  for j in range(i+1,B+1):
    j = j % 2019
    mod = min(mod, (x*j)%2019)
    if mod == 0:
      flag = 1
      break
  if flag:
    break

print(mod)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A =[int(x) for x in input().split()]

sum = 0
for i in range(N):
  sum+=A[i]
X =[0 for x in range(N)]
sum2=0
i=1
while i < N:
  sum2+=A[i]
  i+=2
X[0]=sum-sum2

for i in range(1,N):
  X[i]=2*A[i-1]-X[i-1]
for i in range(N):
  X[i]=string(X[i])
print(" ".join(X))

Fixed submission:
N = int(input())
A =[int(x) for x in input().split()]

sum = 0
for i in range(N):
  sum+=A[i]
X =[0 for x in range(N)]
sum2=0
i=1
while i < N:
  sum2+=A[i]
  i+=2
X[0]=sum-sum2*2

for i in range(1,N):
  X[i]=2*A[i-1]-X[i-1]
for i in range(N):
  X[i]=str(X[i])
print(" ".join(X))
Buggy python submission (verdict: Runtime Error):
S = input()
count1=1
count2=0
for i in range(4):
  if S[i] == S[0] :
    count1++
  else:
    count2++
    
if count2==2 and count1 ==2:
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
l =[S[0]]
for i in S:
  if i not in l:
    l.append(i)
if len(l)==2:
  count1=0
  for i in range(4):
    for j in range (4):
      if S[i]==S[j]:
        count1+=1
  if count1 ==8:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())

def pascal(N,K):
  C=[[0 for i in range(K+1)]for j in range(N+1)]
  for i in range(N+1):
    for j in range(K+1):
      if C[i][j]!=0:
        break
      if i==j+1 or j==1:
        C[i][j]=i
      elif i==j or j==0:
        C[i][j]=1
      else:
        C[i][j] = C[i-1][j]+C[i-1][j-1]
  return C[N][K]
    
mod = 10**9+7
x=0
for i in range(1,K+1):
  x = pascal(N-K+1,i)*pascal(K-1,i-1)
  print(x%mod)

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

mod = 10**9+7
n = N-K+1
print(n)
for i in range(2,K+1):
  n = n * (N-K+2-i)*(K+1-i)//(i*(i-1))
  print(n%mod)

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

def pascal(N,K):
  C=[[0 for i in range(K+1)]for j in range(N+1)]
  for i in range(N+1):
    for j in range(K+1):
      if i==j+1 or j==1:
        C[i][j]=i
      elif i==j or j==0:
        C[i][j]=1
      else:
        C[i][j] = C[i-1][j]+C[i-1][j-1]
  return C[N][K]
    
mod = 10**9+7
x=0
for i in range(1,K+1):
  x = pascal(N-K+1,i)*pascal(K-1,i-1)
  print(x%mod)

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

mod = 10**9+7
n = N-K+1
print(n)
for i in range(2,K+1):
  n = n * (N-K+2-i)*(K+1-i)//(i*(i-1))
  print(n%mod)

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
def pascal(N,K):
  if N == K+1 or K==1:
    return N
  elif K==0 or N==K:
    return 1
  else: return pascal(N-1,K) + pascal(N-1,K-1)
mod = 10**9+7
x=0
for i in range(1,K+1):
  x = pascal(N-K+1,i)*pascal(K-1,i-1)
  print(x%mod)

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

mod = 10**9+7
n = N-K+1
print(n)
for i in range(2,K+1):
  n = n * (N-K+2-i)*(K+1-i)//(i*(i-1))
  print(n%mod)
Buggy python submission (verdict: Runtime Error):
s=map(int, input().split())
for i in range(3):
    s[i]=int(s[i])
s.sort()
print(s[0]+s[1])

Fixed submission:
P,Q,R=map(int, input().split())
s=[]
s.append(P)
s.append(Q)
s.append(R)
s.sort()
print(s[0]+s[1])
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input(),split())
x=round(a/b)
print(x)

Fixed submission:
import math
a,b=map(int, input().split())
x=math.ceil((a+b)/2)
print(x)
Buggy python submission (verdict: Time Limit Exceeded):
from heapq import *
n, m = map(int, input().split())

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append([a,b])
j.sort()
p = 0
temp = []
for i in range(1, m+1):
    while j and j[0][0] <= i:
        a,b = j.pop(0)
        heappush(temp, -b)
    if temp:
        p -= heappop(temp)
print(p)

Fixed submission:

from heapq import *
n, m = map(int, input().split())

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append((a,b))
j.sort(reverse=True)

ans = 0
q = []
for i in range(1, m+1):
    while j and j[-1][0] <= i:
        a,b = j.pop()
        heappush(q, -b)
    if q:
        ans -= heappop(q)
print(ans)

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

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append([a,b])
j.sort(reverse=True)
p = 0
temp = []
for i in range(1, m+1):
    while j and j[-1][0] <= i:
        a,b = j.pop()
        temp.append(b)
    p+=max(temp)
    temp.remove(max(temp))
print(p)

Fixed submission:

from heapq import *
n, m = map(int, input().split())

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append((a,b))
j.sort(reverse=True)

ans = 0
q = []
for i in range(1, m+1):
    while j and j[-1][0] <= i:
        a,b = j.pop()
        heappush(q, -b)
    if q:
        ans -= heappop(q)
print(ans)

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

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append([a,b])
j.sort()
p = 0
temp = []
for i in range(1, m+1):
    while j and j[0][0] <= i:
        a,b = j.pop(0)
        temp.append(b)
    p+=max(temp)
    temp.remove(max(temp))
print(p)

Fixed submission:

from heapq import *
n, m = map(int, input().split())

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append((a,b))
j.sort(reverse=True)

ans = 0
q = []
for i in range(1, m+1):
    while j and j[-1][0] <= i:
        a,b = j.pop()
        heappush(q, -b)
    if q:
        ans -= heappop(q)
print(ans)

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

j = []
for _ in range(n):
  a,b = map(int, input().split())
  if a <= m :
    j.append([a,b])

j.sort()
p = 0
temp = []
for i in range(1, m+1):
  while j and j[0][0] <= i:
      a,b = j.pop(0)
      temp.append(b)
  p+=max(temp)
  temp.remove(max(temp))
print(p)

Fixed submission:

from heapq import *
n, m = map(int, input().split())

j = []
for _ in range(n):
    a,b = map(int, input().split())
    if a <= m :
        j.append((a,b))
j.sort(reverse=True)

ans = 0
q = []
for i in range(1, m+1):
    while j and j[-1][0] <= i:
        a,b = j.pop()
        heappush(q, -b)
    if q:
        ans -= heappop(q)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
if(n == 1):
  print("Hello World")
else:
  print(input() + input())


Fixed submission:
if(input() == "1"):
  print("Hello World")
else:
  print(int(input()) + int(input()))
Buggy python submission (verdict: Runtime Error):
l = input().split(" ").sort()
print(int(l[0] + l[1]) + int(l[2])

Fixed submission:
str = input().split(" ")
str.sort(reverse=True)
print(int(str[0] + str[1]) + int(str[2]))
Buggy python submission (verdict: Runtime Error):
num = input().split(' ')
print((int(num[0]) - 1)＊(int(num[1]) - 1))

Fixed submission:
num = input().split(' ')
a = int(num[0]) - 1
b = int(num[1]) - 1
print(a*b)

Buggy python submission (verdict: Runtime Error):
num = input().split(' ')
print((int(num[0]) - 1)＊(int(num[1]) - 1)

Fixed submission:
num = input().split(' ')
a = int(num[0]) - 1
b = int(num[1]) - 1
print(a*b)
Buggy python submission (verdict: Runtime Error):
nums = map(int, input().split(' '))
nums.sort()
map(-nums[0], nums)
print(nums[2] - nums[1])

Fixed submission:
nums = list(map(int, input().split(' ')))
nums.sort()
buf = nums[0]
nums = list(map(lambda x: x - buf, nums))
print(nums[2])
Buggy python submission (verdict: Runtime Error):
val = 0
for s in list(input()):
  if(s == '+'):
    val++
  else:
    val--
print(val)

Fixed submission:
val = 0
for s in list(input()):
  if(s == "+"):
    val+=1
  else:
    val-=1
print(val)

Buggy python submission (verdict: Runtime Error):
val = 0
for s in input():
  if(s == '+'):
    val++
  else:
    val--
print(val)

Fixed submission:
val = 0
for s in list(input()):
  if(s == "+"):
    val+=1
  else:
    val-=1
print(val)
Buggy python submission (verdict: Runtime Error):
if(int(input()) 1000):
  print("ABC")
else:
  print("ABD")
  

Fixed submission:
if(int(input()) < 1000):
  print("ABC")
else:
  print("ABD")
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
c = 0
for i in range(N-1):
  if H[i] > H[i+1]:
    H[i+1] = H[i+1] + 1
  if H[i] <= H[i+1]:
    C += 1
if C == N-1:
  print('Yes')
else:
  print('No')


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
c = 0
for i in range(N-1):
  if H[i] > H[i+1]:
    H[i+1] = H[i+1] + 1
  if H[i] <= H[i+1]:
    c += 1
if c == N-1:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

return max(A+B, A-B, A*B)

Fixed submission:
a, b = (int(i) for i in input().split())
print(max(a+b, a-b, a*b))

Buggy python submission (verdict: Runtime Error):
return max(A+B, A-B, A*B)

Fixed submission:
a, b = (int(i) for i in input().split())
print(max(a+b, a-b, a*b))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug  8 23:12:25 2019

@author: kohei
"""

N = input()

A = N.split()[0]
B = N.split()[1]
C = N.split()[2] 

print(C-A+B)

Fixed submission:

N = input()

A = int(N.split()[0])
B = int(N.split()[1])
C = int(N.split()[2]) 

D = A-B

if D<C:
    print(C-D)

else:
    print(0)