Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

a = int(input())
h = np.array(list(range(1,a+1)))
h2 = h[::-1]
temp = int(0)
index_val = int(0)
max_mod = int(0)
sum_mod = int(0)

for value in h2:
  for index in range(len(h)):
    if h[index]!=0:
      temp = value % h[index]
      if temp > max_mod:
        max_mod = temp
        index_val = index
  sum_mod += max_mod
  max_mod = 0
  temp = 0
  np.put(h,index_val,0)

if a==1:
  print(0)
else:
  print(sum_mod+1)

Fixed submission:
import numpy as np

a = int(input())
answer = a*(a-1)//2

print(int(answer))

Buggy python submission (verdict: Runtime Error):
import numpy as np

a = int(input())
h = np.array(list(range(1,a+1)))
h2 = h[::-1]
temp = int(0)
index_val = int(0)
max_mod = int(0)
sum_mod = int(0)

for value in h2:
  for index in range(len(h)):
    temp = value % h[index]
    if temp > max_mod:
      max_mod = temp
      index_val = index
  sum_mod += max_mod
  max_mod = 0
  np.put(h,index_val,0)

if a!=1:
  print(sum_mod+1)
else:
  print(0)

Fixed submission:
import numpy as np

a = int(input())
answer = a*(a-1)//2

print(int(answer))
Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
v = np.array(list(map(int,input().split())))
v_sort = np.sort(v)
temp = 0

for index in range(n-1):
  temp = (v_sort[0]+v_sort[1])/2
  v_sort = np.delete(v_sort,0)
  v_sort = np.delete(v_sort,0)
  v_sort = np.append(v_sort,temp)
  v_sort = np.sort(v_sort)

print(v_sort[0])

Fixed submission:
a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print("red")
Buggy python submission (verdict: Runtime Error):
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)
  
print(" ".join(list(map(str,x))))

Fixed submission:
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)

if x.size > 1:
  print(" ".join(list(map(str,x))))
else:
  print(x)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
moji = [list(map(str,input())) for index in range(n)]
count = int(0)

for index in range(n):
  moji[index].sort()

for index in range(n):
  for index2 in range(index+1,n):
    if moji[index]==moji[index2]:
      count+=1

print(count)

Fixed submission:
import numpy as np
import collections

n = int(input())
moji = [list(map(str,input())) for index in range(n)]
count = 0

for index in range(n):
  moji[index].sort()
  moji[index] = "".join(moji[index])

moji.sort()

for index in collections.Counter(moji).values():
  n = index - 1
  count += n*(1+n)/2

print(int(count))
Buggy python submission (verdict: Runtime Error):
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if n=="0":
    print(1)
  else:
    print(int(n)-int(zeronine))

Fixed submission:
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if len(n)==1:
    print(int(n))
  else:
    print(int(n)-int(zeronine))

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

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  print(int(n)-int(zeronine))

Fixed submission:
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if len(n)==1:
    print(int(n))
  else:
    print(int(n)-int(zeronine))
Buggy python submission (verdict: Runtime Error):
# initialize
s = list(input())
s2 = s[0]
num = 1

# RunLength
for index in range(len(s)):
  if index<len(s)-1:
    if s[index]!=s[index+1]:
      s2 += str(num)
      s2 += s[index+1]
      num = 1
    else:
      num += 1
s2 += str(num)

# split strings
s3 = [s2[i:i+4] for i in range(0,len(s2),4)]

# initialize
zero = ""
zero2 = ""
s4 = ""
s5 = ""

def countzero(zero_number):
  temp = ""
  for index in range(zero_number-1):
    temp += "0"
  return temp

for value in s3:
  # when R=L
  if value[1]==value[3]:
    zero += countzero(int(value[1]))
    if value[1]=="1":
      s4 += value[1]+value[3]
    else:
      s4 += zero+value[1]+value[3]+zero
      zero = ""
  # when (R+L)/2 is even
  elif (int(value[1])+int(value[3]))%2 == 0:
    number = str(int((int(value[1])+int(value[3]))/2))
    zero += countzero(int(value[1]))
    zero2 += countzero(int(value[3]))
    s4 += zero+number+number+zero2
    zero = ""
    zero2 = ""
  else:
  # when (R+L)/2 is odd
    number = str(int((int(value[1])+int(value[3]))//2)+1)
    number2 = str(int((int(value[1])+int(value[3]))//2))
    zero += countzero(int(value[1]))
    zero2 += countzero(int(value[3]))
    if int(value[1])<int(value[3]):
      if int(value[3])%2==0:
        s4 += zero+number+number2+zero2
      else:
        s4 += zero+number2+number+zero2
    else:
      if int(value[1])%2==0:
        s4 += zero+number2+number+zero2
      else:
        s4 += zero+number+number2+zero2
    zero = ""
    zero2 = ""

# insert blank
for char in s4:
  s5 += char+" "
s5 = s5[:-1]

print(s5)

Fixed submission:
# initialize
s = list(input())
s2 = {}
s2_index = 1
num = 1

# RunLength
for index in range(len(s)):
  if index<len(s)-1:
    if s[index]!=s[index+1]:
      s2[s2_index] = num
      num = 1
      s2_index += 1
    else:
      num += 1
  s2[s2_index] = num

# initialize
zero = ""
zero2 = ""
s3 = ""
s4 = ""

def countzero(zero_number):
  temp = ""
  for index in range(zero_number-1):
    temp += "0 "
  return temp

for key,value in s2.items():
  if key%2!=0:
    # when R=L
    if s2[key]==s2[key+1]:
      zero += countzero(s2[key])
      if s2[key]=="1":
        s3 += "1 1 "
      else:
        s3 += zero+str(s2[key])+" "+str(s2[key])+" "+zero
        zero = ""
    # when (R+L)/2 is even
    elif (s2[key]+s2[key+1])%2 == 0:
      number = str(int((s2[key]+s2[key+1])/2))
      zero += countzero(s2[key])
      zero2 += countzero(s2[key+1])
      s3 += zero+number+" "+number+" "+zero2
      zero = ""
      zero2 = ""
    # when (R+L)/2 is odd
    else:
      number = str(int((s2[key]+s2[key+1])//2)+1)
      number2 = str(int((s2[key]+s2[key+1])//2))
      zero += countzero(s2[key])
      zero2 += countzero(s2[key+1])
      if int(s2[key])<int(s2[key+1]):
        if s2[key+1]%2==0:
          s3 += zero+number+" "+number2+" "+zero2
        else:
          s3 += zero+number2+" "+number+" "+zero2
      else:
        if s2[key]%2==0:
          s3 += zero+number2+" "+number+" "+zero2
        else:
          s3 += zero+number+" "+number2+" "+zero2
      zero = ""
      zero2 = ""

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

a = max(A)
A_max = []
for i in range(N):
  if A[i] != a:
    A_max.append(a)
  else:
    A_ = A[:]
    A_[i] = 0
    A_max.append(max(A_))
    
for i in A_max:
  print(i)

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

a = max(A)
A_max = []
A_ = A[:]

for i in range(N):
  if A[i] == a:
    A_[i] = 0
    break
    
a_ = max(A_)    
    
for i in range(N):
  if A[i] != a:
    A_max.append(a)
  else:
    A_max.append(a_)
    
for i in A_max:
  print(i)
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

else:
  return a[2]

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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in range input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]



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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy python submission (verdict: Runtime Error):
a = input().split()

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]



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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy python submission (verdict: Runtime Error):
a = input().split()

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]



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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy python submission (verdict: Runtime Error):
a = list( input().split())

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]



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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

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

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]



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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])

Buggy python submission (verdict: Runtime Error):
i = list( map( int, input().split()))
if i[0]*i[1]<=i[2]:
  return i[0]*i[1]
else:
  return i[2]


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

if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
  
else:
  print(a[2])
Buggy python submission (verdict: Time Limit Exceeded):
a = [ int(i) for i in input().split()]

b = (a[0]*a[1]) % 2019

for i in range (a[0], a[1]):
  for j in range (i+1, a[1]+1):
    b = min (b, (i*j)%2019)
    if b == 0:
      break
    
print(b)      

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

b = (a[0]*a[1]) % 2019

for i in range (a[0], a[1]):
  for j in range (i+1, a[1]+1):
    b = min (b, (i*j)%2019)
    
    if b == 0:
      break
      
  if b == 0:
    break
    
print(b)

Buggy python submission (verdict: Time Limit Exceeded):
a = [ int(i) for i in input().split()]

b = (a[0]*a[1]) % 2019

for i in range (a[0], a[1]):
  for j in range (i+1, a[1]+1):
    if (i*j)%2019 < b:
      b = (i*j)%2019
      
print(b)      

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

b = (a[0]*a[1]) % 2019

for i in range (a[0], a[1]):
  for j in range (i+1, a[1]+1):
    b = min (b, (i*j)%2019)
    
    if b == 0:
      break
      
  if b == 0:
    break
    
print(b)
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict as dedict
counter = dedict(int)

a = input()
for i in list(a):
  counter[i] += 1
  
if ( len(counter) == 2) and (  counter [counter.keys()[0]] == 2):
  print ("Yes")
  
else:
  print('No')
  
  

Fixed submission:
from collections import defaultdict as dedict
counter = dedict(int)

a = input()
for i in list(a):
  counter[i] += 1
  
if ( len(counter) == 2) and (  counter [a[0]] == 2):
  print ("Yes")
  
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n = int( input())
a = list( map(int(input().split())))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)    


Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = int( input())
a = list( int(input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)    


Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list (int(input()))

cnt = 0
for i in range (1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i-1]>a[i]>a[i+1]):
    cnt += 1
    
print(cnt)    


Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0

if (len(a) = 3) and (a[1] = 2):
  cnt = 1

else:
  for i in range ( 1, len(a)-1):
    if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
      cnt += 1
    
print (cnt)    


Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if (len(a) = 3) and (a[1] = 2):
  cnt = 1
    
print (cnt)    

Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if len(a) = 3 and a[1] = 2:
    cnt = 1
    
print (cnt)    

Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)

Buggy python submission (verdict: Runtime Error):
n = input()
a = list( input().split())
cnt = 0
for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
if len(a) = 3:
  if a[1] = 2:
    cnt = 1
    
print (cnt)    

Fixed submission:
n = int( input())
a = list( map( int, input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)
Buggy python submission (verdict: Runtime Error):
n = int( input())
a = list ( map( int, input().split()))

a.sort()
    
print(a[int(n/2)+1]-a[int(n/2)])



  

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

a.sort()
k = int(n/2)    
print(a[k]-a[k-1])

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

def swap(a,i,j):
  c = a[i]
  d = a[j]
  if a[i]>a[j]:
    a[j] = c
    a[i] = d
  return a

for i in range (int(n/2)+1):
  for j in range (i+1,n):
    swap(a,i,j)
    
print(a[int(n/2)+1]-a[int(n/2)])



  

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

a.sort()
k = int(n/2)    
print(a[k]-a[k-1])

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

def swap(a,i,j):
  c = a[i]
  d = a[j]
  if a[i]>a[j]:
    a[j] = c
    a[i] = d
  return a

for i in range (int(n/2)+1):
  for j in range (i+1,n):
    swap(a,i,j)
    
print(a[int(n/2)+1]-a[int(n/2)])


  

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

a.sort()
k = int(n/2)    
print(a[k]-a[k-1])

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

def swap(a,i,j):
  c = a[i]
  d = a[j]
  if a[i]>a[j]:
    a[j] = c
    a[i] = d
  return a

for i in range (n/2+1):
  for j in range (i+1,n):
    swap(a,i,j)
    
print(a[n/2+1]-a[n/2])
  

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

a.sort()
k = int(n/2)    
print(a[k]-a[k-1])
Buggy python submission (verdict: Runtime Error):
W, H, x, y = map( int, input().split())
print(WH/2, 1)

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

if not ( x == W/2 and y == H/2):
  print(W*H/2, 0)
  
else:
  print(W*H/2,1)
Buggy python submission (verdict: Runtime Error):
l = list(map(int, input().split()))

if l[0] < l[2] && l[1] < l[2]:
 print('No')
elif l[2] < l[0] && l[2] < l[0]:
 print('No')
else:
 print('Yes')

Fixed submission:
l = list(map(int, input().split()))
 
if l[0] < l[2] and l[1] < l[2]:
 print('No')
elif l[2] < l[0] and l[2] < l[1]:
 print('No')
else:
 print('Yes')
Buggy python submission (verdict: Runtime Error):
n=int(input())
print(n**2)
#B
n=int(input())
s=list(str(input()))
if n % 2 ==0:
    ans=0
    for i in range(n//2):
        if s[i]==s[n//2+i]:
            ans+=1
        else:
            ans+=0

    if ans==n//2:
        print('Yes')
    else:
        print('No')   

else:
    print('No')

Fixed submission:
n=int(input())
s=list(str(input()))
if n % 2 ==0:
    ans=0
    for i in range(n//2):
        if s[i]==s[n//2+i]:
            ans+=1
        else:
            ans+=0

    if ans==n//2:
        print('Yes')
    else:
        print('No')   

else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a <= 9 and b <= 9:
    pritn(a*b)
else:
    print(-1)

Fixed submission:
a,b=map(int,input().split())
if a <= 9 and b <= 9:
    print(a*b)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=a-2*b
if c>o:
    print(c)
else:
    print(0)

Fixed submission:
a,b=map(int,input().split())
c=a-2*b
if c>0:
    print(c)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
s=str(input())
if s='Sunny':
    print('Cloudy')
elif s='Cloudy':
    print('Rainy')
else:
    print('Sunny')

Fixed submission:
s=str(input())
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainy')
else:
    print('Sunny')
Buggy python submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
ans=[]
for i in range(n-1):
    ans_i=0
    for j in range(i+1,n):
        while h[j] <= h[i]:
            ans_i+=1
        ans.append(ans_i)
print(max(ans))

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
H=[]
for i in range(n-1):
    if h[i+1] <= h[i]:
        H.append('a')
    else:
        H.append('b')
s=''.join(H)
t=s.split('b')
ans=max(len(u) for u in t)
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
K =nA + B

if K % 2 == 0:
    print(K)
else:
    print("IMPOSSIBLE")


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

if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
K =nA + B

if K % 2 == 0:
    print(K)
else:
    print("IMPOSSIBLE")


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

if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
L, R = map(int,input().split())

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        A = [(i*j)%2019]
        mi = min(A)
        new_list.append(mi)

print(min(new_list))


Fixed submission:
import sys
L, R = map(int,input().split())

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        new_list.append((i*j)%2019)
        
        if (i*j)%2019 == 0:
            print(0)
            sys.exit()
print(min(new_list))

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

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        A = [(i*j)%2019]
        mi = min(A)
        new_list.append(mi)

print(min(new_list))


Fixed submission:
import sys
L, R = map(int,input().split())

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        new_list.append((i*j)%2019)
        
        if (i*j)%2019 == 0:
            print(0)
            sys.exit()
print(min(new_list))

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

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        k = i*j
        A = [k%2019]
        mi = min(A)
        new_list.append(mi)

print(min(new_list))

Fixed submission:
import sys
L, R = map(int,input().split())

new_list = []
for i in range(L,R):
    for j in range(i+1, R+1):
        new_list.append((i*j)%2019)
        
        if (i*j)%2019 == 0:
            print(0)
            sys.exit()
print(min(new_list))
Buggy python submission (verdict: Runtime Error):
n = int(input())
P = list(map(int, input().split()))

num = 0
for i in range(n):
    list_i = P[i:i+3]
    if list_i[1] == sorted(list_i)[-2]:
        num += 1
    else:
        num += 0

print(num)

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

num = 0
for i in range(n-2):
    list_i = P[i:i+3]
    if list_i[1] == sorted(list_i)[-2]:
        num += 1
    else:
        num += 0

print(num)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
B = sorted(A)
print(B[N/2]-B[N/2-1])

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = sorted(A)
print(B[N//2]-B[N//2-1])
Buggy python submission (verdict: Runtime Error):
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

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

Fixed submission:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")

Buggy python submission (verdict: Runtime Error):
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        num += 1
    else:
        num += 0

if num == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")

Buggy python submission (verdict: Runtime Error):
import sys
S = str(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        print("Bad")
        sys.exit()
    else:
        num += 1
        if num == 3:
            print("Yes")

Fixed submission:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")

Buggy python submission (verdict: Runtime Error):
import sys
S = int(input())
l = list(S)
s = int(len(S))

num = 0
for i in range(s):
    if l[i] == l[i+1]:
        print("Bad")
        sys.exit()
    else:
        num += 1
        if num == 3:
            print("Yes")

Fixed submission:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")
Buggy python submission (verdict: Runtime Error):
P,Q,R = int(input().split())
print(min(P+Q,P+R,Q+R))

Fixed submission:
P,Q,R = map(int,input().split())
print(min(P+Q,P+R,Q+R))
Buggy python submission (verdict: Runtime Error):
s = str(input())
w = list(map(int, input().split()))
f = "".join(w[0:2])
b = "".join(w[2:4])
if 1 <= int(f) <= 12 and  1 <= int(b) <= 12:
    print("AMBIGUOUS")
elif 1 <= int(b) <= 12 and not  1 <= int(f) <= 12:
    print("YYMM")
elif 1 <= int(f) <= 12 and not  1 <= int(b) <= 12:
    print("MMYY")
else:
    print("NA")

Fixed submission:
s = int(input())
f = s // 100
b = s % 100
if 1 <= f <= 12 and  1 <= b <= 12:
    print("AMBIGUOUS")
elif 1 <= b <= 12 and not  1 <= f <= 12:
    print("YYMM")
elif 1 <= f <= 12 and not  1 <= b <= 12:
    print("MMYY")
else:
    print("NA")
Buggy python submission (verdict: Runtime Error):
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
ans += min(ll)
print(ans)

Fixed submission:
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
if ll == []:
    ans += 10
else:
    ans += min(ll)
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b = int(input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)
    

Fixed submission:
a,b = map(int,input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)