Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
rm = 0
while True:
    length = len(S)
    for i in range(length - 1):
        # print(S)
        # print(f"1){length} {i} {len(S)}")
        if (int(S[i]) + int(S[i+1])) == 1:
            rm += 2
            del(S[i:i+2])
            # print(f"2){length} {i} {len(S)} {S}")
            break
        else:
            i += 1
    # print(f"3){length} {i} {len(S)}")
    if length == len(S):
        break
    i = 0
print(rm)

Fixed submission:
S = list(input())
zeros = sum([1 if int(x) == 0 else 0 for x in S])
ones = sum([1 if int(x) == 1 else 0 for x in S])

print(min(zeros, ones) << 1)
Buggy python submission (verdict: Runtime Error):
import numpy as np

N, K = (int(x) for x in input().split())
A = np.array(list(int(x) for x in input().split()), dtype='uint64')

fmax = 0
for x in range(K+1):
    i = np.arange(N, dtype='uint64')
    fx = np.sum(np.bitwise_xor(A, i, dtype='uint64'), dtype='uint64')
    if fmax < fx:
        fmax = fx
print(fmax)

Fixed submission:
T, X = (int(x) for x in input().split())
print(T/X)
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N == 1:
	print("Hello World")
else:
	A = int(input())
    B = int(input())
    print(A+B)


Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A+B)
Buggy python submission (verdict: Runtime Error):
N, i = map(int(x), input().split())
print(i - N + 1)

Fixed submission:
N, i = map(int, input().split())
print(N - i + 1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = 0
for i in range(0, n+1, 4):
    if (n - i) % 7 == 0:
        x = 1
print(('No','Yes')[x])

Fixed submission:
n, k = map(int, input().split())
print(0 if n % k == 0 else 1)
Buggy python submission (verdict: Runtime Error):
a=map(int,input().split())
print(max(a)-min(a))

Fixed submission:
a=list(map(int,input().split()))
print(max(a)-min(a))
Buggy python submission (verdict: Runtime Error):
a=max(list(map(int,input().split()));print(':('if a>8 else'Yay!')

Fixed submission:
a=max(list(map(int,input().split())));print(':('if a>8 else'Yay!')

Buggy python submission (verdict: Runtime Error):
a=max(list(map(int,input().split()))
print(':('if a>8else'Yay!')

Fixed submission:
a=max(list(map(int,input().split())));print(':('if a>8 else'Yay!')
Buggy python submission (verdict: Runtime Error):
A, B, X = int(x) for x in input().split()
if (A <= X) and ((A + B) >= X):
  print("YES")
else:
  print("NO")

Fixed submission:
A, B, X = (int(x) for x in input().split())
if (A <= X) and ((A + B) >= X):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
S=input()
S[3]='8'
print(S)

Fixed submission:
S=input()
print(S[0:3]+'8'+S[4:])
Buggy python submission (verdict: Runtime Error):
import math

n=int(input())
listx=[]
listy=[]

for i in range(n):
  x,y = map(int,input().split())
  listx.append(x)
  listy.append(y)

%print(listx)
%print(listy)
listl=[]
if n==2:
	ans=((listx[1]-listx[0])**2+(listy[1]-listy[0])**2)**0.5



else:
	for i in range(n-1):
		for j in range(i+1,n):
			l=((listx[i]-listx[j])**2+(listy[i]-listy[j])**2)**0.5
			listl.append(l)
	ll=sum(listl)	
	ans=2*ll/n

print(ans)

Fixed submission:
import math

n=int(input())
listx=[]
listy=[]

for i in range(n):
  x,y = map(int,input().split())
  listx.append(x)
  listy.append(y)

#print(listx)
#print(listy)
listl=[]
if n==2:
	ans=((listx[1]-listx[0])**2+(listy[1]-listy[0])**2)**0.5



else:
	for i in range(n-1):
		for j in range(i+1,n):
			l=((listx[i]-listx[j])**2+(listy[i]-listy[j])**2)**0.5
			listl.append(l)
	ll=sum(listl)	
	ans=2*ll/n

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lista = [int(i) for i in input().split()]
listb=[1]*n
for i in range(n):
    listb[lista[i]-1]=i+1

ans=""
for i in range(n):
    ans+=str(listb[i])+" "
print(ans)

Fixed submission:
n=int(input())
lista = [int(i) for i in input().split()]
listb=[1]*n
for i in range(n):
    listb[lista[i]-1]=i+1


for i in range(n):

    print(str(listb[i])+" ", end="")
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
lista = [int(i) for i in input().split()]

lista.sort(reverse=True)
#print(lista)

if n==1:
    ans=int(sum(lista)/(2**m))

else:
    for i in range(m):
        lista[0]=lista[0]/2
        lista.sort(reverse=True)
    #print(lista)    

    for i in range(n):
        lista[i]=int(lista[i])

    ans=sum(lista)
print(ans)

Fixed submission:
n,m=map(int,input().split())
lista = [int(i) for i in input().split()]


for i in range(len(lista)):
    lista[i]=lista[i]*-1

import heapq

heapq.heapify(lista)

for i in range(m):
        b=heapq.heappop(lista)
        b=b/2
        heapq.heappush(lista,b)
        
for i in range(n):
        lista[i]=int(lista[i]*-1)

ans=sum(lista)
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
ans1=b//c-(a-1)//c
ans2=b//d-(a-1)//d

import math
e=(c*d)//math.gcd(c,d)
ans3=b//e-(a-1)//e

ans=b-a+1-ans1-ans2+ans3

print(ans)


Fixed submission:
a,b,c,d=map(int,input().split())
ans1=b//c-(a-1)//c
ans2=b//d-(a-1)//d

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) 
    
e=(c*d)//gcd(c,d)
ans3=b//e-(a-1)//e

ans=b-a+1-ans1-ans2+ans3

print(ans)
Buggy python submission (verdict: Runtime Error):
X,A=map(int,input().split())
if x<A :
    print(0)
else:
    print(10)


Fixed submission:
X,A=map(int,input().split())
if X<A :
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
List = [int(i) for i in input().split()]
d=0
i=0
for i in range(n)
if d<x :
    d=d+List[i]
else :
    print(i)

Fixed submission:
n,x=map(int,input().split())
List = [int(i) for i in input().split()]
d=0
j=1
for i in range(n):
    d=d+List[i]
    if d<=x :
        j+=1
print(j)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split()) 
lista=[]
for i in range(m): 
	a=int(input())
	lista.append(a)

ans=1


def fb(num):
    """num番目のフィボナッチ数を返す
    """
    a, b = 1, 1
    for i in range(num):
        a, b = a + b, a
    return b
    
#print(fb(3))

if m==0:
	ans=ans*fb(n)
	
else:
	for i in range(m-1):
		if (lista[i]+1==lista[i+1])&(m>=2):
			ans=0
  	
  	
		else:
			lista.append(n)
			if lista[0]!=1:
					ans=ans*(fb(lista[0]-1))
					for i in range(1,m):
							ans=ans*(fb(lista[i]-lista[i-1]-2))
					
		 
					
			if lista[0]==1:
					for i in range(1,m):
							ans=ans*(fb(lista[i]-lista[i-1]-2))
					
		
	ans= ans*(fb(lista[m]-lista[m-1]-1))
		
print(ans%1000000007)
	

Fixed submission:
n,m=map(int,input().split()) 
lista=[]
for i in range(m): 
	a=int(input())
	lista.append(a)

ans=1


def fb(num):
    """num番目のフィボナッチ数を返す
    """
    a, b = 1, 1
    for i in range(num):
        a, b = a + b, a
    return b
    
#print(fb(3))

if m==0:
	ans=ans*fb(n)
	
else:
	for i in range(m-1):
		if (lista[i]+1==lista[i+1])&(m>=2):
			ans=0
  	
  	
	else:
		lista.append(n)
		if lista[0]!=1:
				ans=ans*(fb(lista[0]-1))
				for i in range(1,m):
						ans=ans*(fb(lista[i]-lista[i-1]-2))
					
		 
					
		if lista[0]==1:
				for i in range(1,m):
						ans=ans*(fb(lista[i]-lista[i-1]-2))
					
		
		ans= ans*(fb(lista[m]-lista[m-1]-1))
		
print(ans%1000000007)
Buggy python submission (verdict: Runtime Error):
s=str(input())

lens=len(s)
ans=0
list=[]

for i in range(lens):
	if (s[i]=='A')|(s[i]=='T')|(s[i]=='C')|(s[i]=='G'):
		ans=ans+1
	else:
		list.append(ans)
		ans=0

#print(list)
print(max(list))

Fixed submission:
s=str(input())

lens=len(s)
ans=0
list=[]

for i in range(lens):
	if (s[i]=='A')|(s[i]=='T')|(s[i]=='C')|(s[i]=='G'):
		ans=ans+1
	else:
		list.append(ans)
		ans=0
list.append(ans)
print(max(list))
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
lista = [int(i) for i in input().split()]
import functools
#from functools import reduce
import math
#from math import gcd

gcda=functools.reduce(math.gcd, lista)

if k>max(lista):
    print("IMPOSSIBLE")
else:
    if k%gcda==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

Fixed submission:
n,k=map(int,input().split())
lista = [int(i) for i in input().split()]
import functools
#from functools import reduce
import fractions
#from fractions import gcd

gcda=functools.reduce(fractions.gcd, lista)

if k>max(lista):
    print("IMPOSSIBLE")
else:
    if k%gcda==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
lista = [int(i) for i in input().split()]
from functools import reduce
from math import gcd

gcda=functools.reduce(gcd, lista)

if k>max(lista):
    print("IMPOSSIBLE")
else:
    if k%gcda==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")

Fixed submission:
n,k=map(int,input().split())
lista = [int(i) for i in input().split()]
import functools
#from functools import reduce
import fractions
#from fractions import gcd

gcda=functools.reduce(fractions.gcd, lista)

if k>max(lista):
    print("IMPOSSIBLE")
else:
    if k%gcda==0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
s=str(input())
k=int(input())

lista=[]
for i in range(26):
	lista.append(chr(ord('a') + i))
	
#print(lista)

s_list=list(s)
len_s=len(list(s))
temp1=k
temp2=0
for i in range(len_s):
	if (123-ord(s_list[i])<=temp1):
		temp1=temp1-(123-ord(s_list[i]))
		s_list[i]="a"
if temp1!=0:
#	print(temp1)
	temp2=temp1%26+ord(s_list[-1])
	if temp2>122:
		temp2=temp2-122+96
	s_list[-1]=chr(temp2)
#print(temp2)
#print(str(s_list))

for i in range(len(s_list)):
	print(s_list[i],end="")
print(\n)

		
	
	
	


Fixed submission:
s=str(input())
k=int(input())

lista=[]
for i in range(26):
	lista.append(chr(ord('a') + i))
	
#print(lista)

s_list=list(s)
len_s=len(list(s))
temp1=k
temp2=0
for i in range(len_s):
	if (123-ord(s_list[i])<=temp1)and (s_list[i] != 'a'):
		temp1=temp1-(123-ord(s_list[i]))
		s_list[i]="a"
if temp1!=0:
#	print(temp1)
	temp2=temp1%26+ord(s_list[-1])
	if temp2>122:
		temp2=temp2-122+96
	s_list[-1]=chr(temp2)
#print(temp2)
#print(str(s_list))

for i in range(len(s_list)):
	print(s_list[i],end="")
print()

Buggy python submission (verdict: Time Limit Exceeded):
s=str(input())
k=int(input())

lista=[]
for i in range(26):
	lista.append(chr(ord('a') + i))
	
#print(lista)

s_list=list(s)
len_s=len(list(s))
temp1=k
temp2=0
for i in range(len_s-1):
	if (123-ord(s_list[i])<=temp1)&(temp1>=0):
		temp1=temp1-(123-ord(s_list[i]))
		s_list[i]="a"
if temp1!=0:
#	print(temp1)
	temp2=temp1%26+ord(s_list[-1])
	if temp2>122:
		temp2=temp2-122+96
	s_list[-1]=chr(temp2)
#print(temp2)
#print(str(s_list))
row=""
for i in range(len(s_list)):
	row+=s_list[i]
print(row)
		

		
	
	
	


Fixed submission:
s=str(input())
k=int(input())

lista=[]
for i in range(26):
	lista.append(chr(ord('a') + i))
	
#print(lista)

s_list=list(s)
len_s=len(list(s))
temp1=k
temp2=0
for i in range(len_s):
	if (123-ord(s_list[i])<=temp1)and (s_list[i] != 'a'):
		temp1=temp1-(123-ord(s_list[i]))
		s_list[i]="a"
if temp1!=0:
#	print(temp1)
	temp2=temp1%26+ord(s_list[-1])
	if temp2>122:
		temp2=temp2-122+96
	s_list[-1]=chr(temp2)
#print(temp2)
#print(str(s_list))

for i in range(len(s_list)):
	print(s_list[i],end="")
print()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N = int(input())
l = ["".join(sorted([c for c in input()])) for i in range(N)]
l.sort()


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res

hash_t = {}
for i in range(N-1):
    if l[i] == l[i+1]:
        if l[i] in hash_t.keys():
            hash_t[l[i]] += 1
        else:
            hash_t[l[i]] = 1

cnt = 0
for x in hash_t.values():
    cnt += fac(x)
print(cnt)

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
l = ["".join(sorted([c for c in input()])) for i in range(N)]
l.sort()


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res


hash_l = []
for i in range(N-1):
    if l[i] == l[i+1]:
        if i == 0:
            hash_l.append(0)
        if l[i-1] == l[i]:
            hash_l[-1] += 1
        else:
            hash_l.append(1)

cnt = 0
for x in hash_l:
    cnt += fac(x)
print(cnt)

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


hash_t = {}
for i in range(N):
    a = "".join(sorted([c for c in input()]))
    if a in hash_t.keys():
        hash_t[a] += 1
    else:
        hash_t[a] = 0


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res
cnt = 0
for x in hash_t.values():
    if x == 0:
        continue
    cnt += fac(x)
print(cnt)

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
l = ["".join(sorted([c for c in input()])) for i in range(N)]
l.sort()


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res


hash_l = []
for i in range(N-1):
    if l[i] == l[i+1]:
        if i == 0:
            hash_l.append(0)
        if l[i-1] == l[i]:
            hash_l[-1] += 1
        else:
            hash_l.append(1)

cnt = 0
for x in hash_l:
    cnt += fac(x)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = ["".join(sorted([c for c in input()])) for i in range(N)]
l.sort()


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res

hash_t = {}
for i in range(N-1):
    if l[i] == l[i+1]:
        if l[i] in hash_t.keys():
            hash_t[l[i]] += 1
        else:
            hash_t[l[i]] = 1

cnt = 0
for x in hash_t.values():
    cnt += fac(x)
print(cnt)

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
l = ["".join(sorted([c for c in input()])) for i in range(N)]
l.sort()


def fac(n):
    """階乗"""
    res = 0
    for i in range(1, n+1):
        res += i
    return res


hash_l = []
for i in range(N-1):
    if l[i] == l[i+1]:
        if i == 0:
            hash_l.append(0)
        if l[i-1] == l[i]:
            hash_l[-1] += 1
        else:
            hash_l.append(1)

cnt = 0
for x in hash_l:
    cnt += fac(x)
print(cnt)
Buggy python submission (verdict: Runtime Error):
import fractions
a, b, c, d = map(int, input().split())
 
def wareruzu(x):
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x)
    m = end_b - start_a
    return int(m / x) + 1
 
all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) / fractions.gcd(c,d)))

Fixed submission:
S = input()

flg = False
for i in range(3):
    if S[i] == S[i+1]:
        flg =True

print('Bad' if flg else 'Good')
Buggy python submission (verdict: Runtime Error):
import math
a, b, c, d = map(int, input().split())

def wareruzu(x):
    if b < x:
        return 0
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x)
    m = end_b - start_a
    return int(m / x) + 1

all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) / math.gcd(c,d)))

Fixed submission:
import fractions
a, b, c, d = map(int, input().split())
 
def wareruzu(x):
    if b < x:
        return 0
    if b == x:
        return 1
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x) # bより小さい最大の値。
    m = end_b - start_a
    if m < 0:
        return 0
    return int(m // x) + 1
 
all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) // fractions.gcd(c,d)))
Buggy python submission (verdict: Runtime Error):
import fractions
a, b, c, d = map(int, input().split())
 
def wareruzu(x):
    if b < x:
        return 0
    if b == x:
        return 1
    start_a = a if a % x == 0 else a - (a % x) + x
    end_b = b - (b % x)
    m = end_b - start_a
    return int(m / x) + 1
 
all_n = b - a + 1
print(all_n - wareruzu(c) - wareruzu(d) + wareruzu((c*d) / fractions.gcd(c,d)))

Fixed submission:
from operator import itemgetter
N = int(input())

lst =[]
for i in range(N):
    lst.append(list(map(int, input().split())))

lst.sort(key=itemgetter(1))

now = 0
flg = True
for item in lst:
    now += item[0]
    if now > item[1]:
        flg = False
        break

print('Yes' if flg else 'No')
Buggy python submission (verdict: Runtime Error):
A,B = int(input())
if A<=9:
  if B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)

Fixed submission:
A,B = map(int, input().split())
if A<=9:
  if B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
lst = []
for i in range(10):
  for j in range(10):
    lst.append(i*j)

N = int(input())
if N in lst:
  print(Yes)
else:
  print(No)

Fixed submission:
lst = []
for i in range(1,10):
  for j in range(1,10):
    lst.append(i*j)

N = int(input())
if N in lst:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import itertools
import numpy as np

N = int(input())
lst = np.array(list(map(int,input().split())))

lst2 = np.array(list(itertools.combinations(lst,2)))
lst3 =[]
for i in range(len(lst2):
               dot = np.dot(lst2[i][0],lst2[i][1])
               lst3.append(dot)

print(sum(lst3))

Fixed submission:
import itertools
import numpy as np

N = int(input())
lst = np.array(list(map(int,input().split())))
lst2 = np.array(list(itertools.combinations(lst,2)))
lst3 =[]

for i in range(len(lst2)):
               dot = np.dot(lst2[i][0],lst2[i][1])
               lst3.append(dot)

print(sum(lst3))
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
 
K=(A+B)/2
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
 
if is_integer_num(K)==False:
  print(IMPOSSIBLE)
else:
  print(K)

Fixed submission:
A,B = map(int,input().split())
 
K=(A+B)/2
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
 
if is_integer_num(K)==False:
  print("IMPOSSIBLE")
else:
  print(int(K))

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

K=(A+B)/2

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if is_integer_num(K)==False:
  print(IMPOSSIBLE)
else:
  print(K)

Fixed submission:
A,B = map(int,input().split())
 
K=(A+B)/2
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
 
if is_integer_num(K)==False:
  print("IMPOSSIBLE")
else:
  print(int(K))
Buggy python submission (verdict: Runtime Error):
w=input()
s=list(set(list(w)))

if len(s) = 2 and w.count(s[0]) = 2:
  print("Yes")
else:
  print("No")

Fixed submission:
w=input()
s=list(set(list(w)))

if len(s) == 2 and w.count(s[0]) == 2:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
w=input()
s=set(list(w))

if len(s) = 2 and w.count(s[0]) = 2:
  print("Yes")
else:
  print("No")

Fixed submission:
w=input()
s=list(set(list(w)))

if len(s) == 2 and w.count(s[0]) == 2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
w=input()

cnt=0
for i in w:
  if w[cnt] == w[cnt+1]:
    print("Bad")
  else:
    print("Good")
  cnt += 1



Fixed submission:
w=input()

cnt=0
for i in w:
    if cnt+1 < len(w):
        if w[cnt] == w[cnt+1]:
            print("Bad")
            exit()
    cnt += 1

print("Good")
Buggy python submission (verdict: Runtime Error):
import numpy as np
lst = list(input().split())

num = len(lst)

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(np.min([A,B,C]))

Fixed submission:
p,q,r = map(int,input().split())    
lst = [p,q,r]

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(min([A,B,C]))

Buggy python submission (verdict: Runtime Error):
import numpy as np
lst = list(input().split())

num = len(lst)

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(np.min(np.array(A,B,C)))

Fixed submission:
p,q,r = map(int,input().split())    
lst = [p,q,r]

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(min([A,B,C]))

Buggy python submission (verdict: Runtime Error):
import numpy as np
lst = list(input().split())

num = len(lst)

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(min(np.array(A,B,C)))

Fixed submission:
p,q,r = map(int,input().split())    
lst = [p,q,r]

A = lst[0] + lst[1]
B = lst[1] + lst[2]
C = lst[0] + lst[2]

print(min([A,B,C]))
Buggy python submission (verdict: Runtime Error):
L = []
N = L.append(int(input))
if len(N) == 1:
  print("Hello world")
  
else:
  print(N[2]+N[3])

Fixed submission:
N = int(input())
if N == 1:
  print("Hello World")
else:
  A = int(input())
  B = int(input())
  print(A+B)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
price = list(map(int, input().split()))
for i in range(M):
  price[price.index(max(price))] //= 2

print(sum(price))

Fixed submission:
from heapq import heappop, heappush

N, M = map(int, input().split())
price = list(map(int, input().split()))
he = []
for i in price:
  heappush(he, -i)
for i in range(M):
  max = heappop(he)
  heappush(he, -(-max//2))
print(-sum(he))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
price = list(map(int, input().split()))
for i in range(M):
  price[price.index(max(price))] = int(price[price.index(max(price))] / 2)
print(sum(price))

Fixed submission:
from heapq import heappop, heappush

N, M = map(int, input().split())
price = list(map(int, input().split()))
he = []
for i in price:
  heappush(he, -i)
for i in range(M):
  max = heappop(he)
  heappush(he, -(-max//2))
print(-sum(he))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
price = list(map(int, input().split()))
price.sort(reverse=True)
for i in range(M):
  price[0] = int(price[0] / 2)
  price.sort(reverse=True)
print(sum(price))

Fixed submission:
from heapq import heappop, heappush

N, M = map(int, input().split())
price = list(map(int, input().split()))
he = []
for i in price:
  heappush(he, -i)
for i in range(M):
  max = heappop(he)
  heappush(he, -(-max//2))
print(-sum(he))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
price = list(map(int, input().split()))
price.sort(reverse=True)
for i in range(M):
  price[0] /= 2
  price.sort(reverse=True)
price = sum([int(i) for i in price])
print(price)

Fixed submission:
from heapq import heappop, heappush

N, M = map(int, input().split())
price = list(map(int, input().split()))
he = []
for i in price:
  heappush(he, -i)
for i in range(M):
  max = heappop(he)
  heappush(he, -(-max//2))
print(-sum(he))
Buggy python submission (verdict: Runtime Error):
n = 1
if b == 1:
    print(0)
else:
    while a*n-(n-1) < b:
        n += 1
    print(n)

Fixed submission:
a,b = map(int, input().split())
n = 1
if b == 1:
    print(0)
else:
    while a*n-(n-1) < b:
        n += 1
    print(n)