Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02879 (python)

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

if 0<a<10:
  if 0<b<10:
    print(a*b)
  else:
    print(-1)
else:
  print(-1)

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

if 0<a<10,0<b<10:
  print(a*b)
else:
  print(-1)

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

if i in range(1,9):
  print(a*b)
else:
  print(-1)
Problem p02880 (python)

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

i = 1

while i<10:
  num = N / i 
  if  N%i ==0:
    if 0<num<10:
    	print('Yes')
    	break
  i +=1
    
if i>=10:
  print('No')

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

while i in range(1, 9):
  num = N / i
  if 0<num<10:
    print('Yes')
    break
print('No')
Problem p02879 (python)

Fixed submission:
a,b =map(int,raw_input().split())
if a <= 9 and b <=9:
	print a*b
else:
	print -1

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
if a <= 9 and b <=9:
	print a*b
else:
	print -1

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
if a <= 9 and b <=9:
  print a*b
else:
  print -1
Problem p02879 (python)

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

if A>=10 or B>=10:
  print(-1)
else:
  print(A*B)

Buggy submission (verdict: Runtime Error):
A, B= [int(i) for i in input().split()]

if A>=10orB>=10:
  print(-1)
else:
  print(A*B)
Problem p02880 (python)

Fixed submission:
N = int(input())
a = []

for i in range(1,10):
    for j in range(1,10):
        a.append(i*j)

if N in a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = []

for i in range(1,10):
    for j in range(1,10):
        a.append(i*j)

if N in a:
    print("Yes")
else:
    prtin("NO")
Problem p02881 (python)

Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors

N = int(input())
a = make_divisors(N)
b = []
c = []

for j in range(len(a)):
    for k in range(len(a)):
        if a[j] * a[k] == N:
            b.append([a[j],a[k]])

for l in range(len(b)):
    c.append(b[l][0] + b[l][1])

print(min(c) - 2)

Buggy submission (verdict: Runtime Error):


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


N = int(input())
a = make_divisors(N)
b = []
c = []

for j in range(round(len(a)):
    for k in range(len(a)):
        if a[j] * a[k] == N:
            b.append([a[j],a[k]])

for l in range(len(b)):
    c.append(b[l][0] + b[l][1])

print(min(c) - 2)

Buggy submission (verdict: Runtime Error):


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


N = int(input())
a = make_divisors(N)
b = []
c = []

for j in range(round(len(a)):
    for k in range(len(a)):
        if a[j] * a[k] == N:
            b.append([a[j],a[k]])

for l in range(len(b)):
    c.append(b[l][0] + b[l][1])

print(b)
print(min(c) - 2)

Buggy submission (verdict: Runtime Error):

N = int(input())
N_half = round(N/2)
a =[]

for i in range(N_half):
    for j in range(N_half - i+1):
        if i * j == N:
            a.append([i,j])


sum=[]

for k in range(len(a)-1):
    sum.append(a[k][0] + a[k][1])

sum.sort
print(sum[0]-2)
Problem p02879 (python)

Fixed submission:
a,b=map(int, input().split())
if 0<a<10 and 0<b<10:
	print(a*b)
else:
	print('-1')

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if (0<a<10　and 0<b<10):
  print(a*b)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
a,b=int(input())
if (0<a<10　and 0<b<10):
  return a*b
else:
  return -1
Problem p02879 (python)

Fixed submission:
s = input().split()
a = int(s[0])
b = int(s[1])

if(a<1 or a>9):
    print(-1)
elif(b<1 or b>9):
    print(-1)
else:
    print(a*b)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a<1 or a>9):
    print(-1)
elif(b<1 or b>9):
    print(-1)
else:
    print(a*b)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a<1 or a>9):
  print(-1)
elif(b<1 or b>9):
  print(-1)
else:
  print(a*b)
Problem p02880 (python)

Fixed submission:
n = int(input())
flag = False
for i in range(1, 10):
	for j in range(1, 10):
		if i*j == n:
			flag = True
if flag is True:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n = int(input().split())
flag = False
for i in range(1, 10):
	for j in range(1, 10):
		if i*j == n:
        	flag = True
if flag is True:
    print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n = int(input().split())
flag = False
for i in range(1, 10):
	for j in range(1, 10):
		if i*j == n:
        flag = True
if flag is True:
    print("Yes")
else:
	print("No")
Problem p02879 (python)

Fixed submission:
A,B=map(int,input().split())
print(A*B if A<10 and B<10 else -1)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
print(A*B if A<10 and B<10 else -1&)
Problem p03012 (python)

Fixed submission:
N = int(input())
W = list(map(int,input().split()))
t = []
for i in range(1,N):
  t.append(abs(sum(W[:i])-sum(W[i:])))
print(min(t))

Buggy submission (verdict: Runtime Error):
N = int(input())
W = map(int,input().split())
t = []
for i in range(1,N):
  t.append(abs(sum(W[:i])-sum(W[i:])))
print(min(t))
Problem p03013 (python)

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

for i in range(M):
    a.append(int(input()))
a.sort()
diff = [a[i+1]-a[i] for i in range(M-1)] if M!=1 else []
if diff and min(diff)==1 :
    print(0)
else:
    if M==0:
        stairs = [N]
    elif not(diff):
        stairs = [a[0]-1,N-a[0]-1]
    else :
        stairs = [a[0]-1]+[diff[i]-2 for i in range(M-1)]+[N-a[-1]-1]
    
    t = [1,1]
    for i in range(max(stairs)-1):
        t.append(t[-1]+t[-2])
    ans = 1
    for i in stairs:
        ans *= t[i]
    print(ans%1000000007)

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
a = [] 
for i in range(M):
    a.append(int(input()))
a.sort()
diff = [a[i+1]-a[i] for i in range(M-1)] if M!=1 else []
if diff and min(diff)==1 :
    print(0)
else:
    if not(diff):
        stairs = [a[0]-1,N-a[0]-1]
    else :
        stairs = [a[0]-1]+[diff[i]-2 for i in range(M-1)]+[N-a[-1]-1]
    
    t = [1,1]
    for i in range(max(stairs)-1):
        t.append(t[-1]+t[-2])
    ans = 1
    for i in stairs:
        ans *= t[i]
    print(ans%1000000007)
Problem p03077 (python)

Fixed submission:
import math
N = int(input())
cap = [int(input()) for i in range(5)]
print( math.ceil(N/min(cap))+4)

Buggy submission (verdict: Runtime Error):
N = int(input())
cap = [int(input()) for i in range(5)]
state = [N, 0, 0, 0, 0, 0]
time = 0
while state[-1] != N:
    for i in range(4,-1,-1):
        if state[i]==0:
            continue
        move = cap if state[i]>=cap[i] else state[i]
        state[i] -= move
        state[i+1] += move
    time += 1
print(time)
Problem p02879 (python)

Fixed submission:
a,b=list(map(int,input().split()))
if a <= 9 and b <= 9 and a >=1 and b >=1:
    print(a*b)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
if a <= 9 and b <=9:
    return a*b
return -1
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a < 3200:
    print('red')
else:
    print(s)

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
d = {}
v = {}
for _ in range(n - 1):
    a, b = input().split()
    if a not in d:
        d[a] = [b]
    else:
        d[a].append(b)
    if b not in d:
        d[b] = []

for key in d.keys():
    v[key] = 0

for _ in range(q):
    node, increment = input().split()
    queue = [node]
    all_childs = [node]
    while len(queue) > 0:
        el = queue.pop()
        if el not in all_childs:
            all_childs.append(el)
        childs = d[el]
        if len(childs) > 0:
            queue.extend(d[el])
    for child in all_childs:
        v[child] += int(increment)

for value in v.values():
    print(value, end=' ')
print('')
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if a >= 10 or b >= 10:
  print(-1)
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>=10 or b >= 10:
      print(-1)
    else:
      print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>9 or b>9:
      print(-1)
    else:
      print(a*b)

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

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

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>9 or b>9:
      print(-1)
    else:
      print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>9  | b>9:
      print(-1)
    else:
      print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>9  || b>9:
      print(-1)
    else:
      print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>9 or b >9:
      print(-1)
    else:
      print(a*b)

Buggy submission (verdict: Runtime Error):
    a,b=map(int,input().split())
    if a>=10 or b >= 10:
      print(-1)
    else:
      print(a*b)
Problem p03072 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
c = 1

bean = True
for i in range(1, n):
  bean = True
  for j in range(i, 0, -1):
    if l[j-1] > l[i]:
      bean = False
  if bean:
    c += 1

print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input().split()))
c = 1

bean = True
for i in range(1, n):
  bean = True
  for j in range(i, 0, i-1):
    if l[j-1] > l[i]:
      bean = False
  if bean:
    c += 1

print(c)
Problem p02990 (python)

Fixed submission:
import math

NUM = 10 ** 9 + 7

N, K = map(int, input().split())


def comb(a, b):
    return math.factorial(a) // (math.factorial(a - b) * math.factorial(b))


c = N - K + 1
d = K - 1
for i in range(1, K + 1):
    if c < i:
        print(0)
    else:
        print((comb(c, i) * comb(d, i - 1)) % NUM)

Buggy submission (verdict: Runtime Error):
import math

NUM = 10 ** 9 + 7

N, K = map(int, input().split())


def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, K + 1):
    print((comb(N - K + 1, i) * comb(K - 1, i - 1)) % NUM)
Problem p02879 (python)

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

if i[0] <= 9:
    if i[1] <= 9:
        print(i[0] * i[1])
    else:
        print('-1')

else:
    print('-1')

Buggy submission (verdict: Runtime Error):
i = int(input())
list = []

if i % 2 == 0:
    for m in range(2, int((i+2)/2) + 1):
        if i % m == 0:
            list.append(m + i / m)

if i % 2 == 1:
    for m in range(1, int((i+1)/2), 2):
        if i % m == 0:
            list.append(m + i / m)


list.sort()
print(int(list[0]-2))
Problem p02989 (python)

Fixed submission:
N = int(input())


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

ls.sort()

K = ls[N//2] - ls[N//2 - 1]

print(int(K))

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


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

ls_sorted = sorted(ls)

K = ls_sorted[N//2] - ls_sorted[N//2 - 1]

print(K)

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

if N/2 %2 != 0:
    print(0)

else:
    ls = list(map(int, input().split()))

    ls_sorted = sorted(ls)

    K = ls_sorted[N/2] - ls_sorted[N/2 - 1]

    print(K)

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

if N/2 %2 != 0:
    print '0'

else:
    ls = list(map(int, input().split()))

    ls_sorted = sorted(ls)

    K = ls_sorted[N/2] - ls_sorted[N/2 - 1]

    print(K)
Problem p03075 (python)

Fixed submission:
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0

for city1 in list1[:5]:
    for city2 in list1[:5]:
        if (city1 - city2 > list1[5] or city2 - city1 > list1[5]):
            print ':('
            count += 1
            break
    if count != 0:
        break
if count == 0:
    print 'Yay!'

Buggy submission (verdict: Runtime Error):
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0
for city1 in list1[:4]:
    for city2 in list1[:4]:
        if city1 - city2 > list[5] | city2 - city1 > list[5]:
            print ':('
            count += 1
            break
if count = 0:
    print 'Yay!'
Problem p02879 (python)

Fixed submission:
m = input()
n = m.split(" ")
if (int(n[0])<=9 and int(n[1])<=9):
    print(int(n[0])*int(n[1]))
else:
    print("-1")

Buggy submission (verdict: Runtime Error):
n = int(input())
m = int(input())
if (n>0 or n<10) and (m>0 or m<10):
    print(n*m)
else:
    print("-1")
Problem p02880 (python)

Fixed submission:
import math
m = int(input())
k = 0
for i in range(1,10,1):
    for j in range(1,10,1):
        if i*j == m:
            k = 1
            break
if k == 1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
m = int(input())
if (n<=9 and m<=9):
    print(n*m)
else:
    print("-1")
Problem p02879 (python)

Fixed submission:
A,B = map(int,input().split())
if A<10 and B<10:
  ans = A * B
else:
  ans = -1
print(ans)

Buggy submission (verdict: Runtime Error):
A,B = zip(int(),input().split())
if A<10 && B<10:
  ans = A * B
else:
  ans = -1
print(ans)
Problem p02879 (python)

Fixed submission:
a, b = map(int, input().split())
if a > 9 or b > 9:
    print("-1")
else:
    print(a * b)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
flg = False
for i in range(2, sq):
    if n % i == 0:
        flg = True
        break
if flg:
    print(sq * 2 - 1)
else:
    print(n - 1)
Problem p02880 (python)

Fixed submission:
n = int(input())
if n > 81:
    print("No")
else:
    is_ok = False
    for x in range(1, 10):
        if n % x == 0 and n // x <= 9:
            is_ok = True
            break
    if is_ok:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n > 81:
    print("No")
else:
    is_ok = False
    for x in range(1, 10):
        if n % x == 0 and n // x <= 9:
            is_ok = True
            break

if is_ok:
    print("Yes")
else:
    print("No")
Problem p02879 (python)

Fixed submission:
a=list(map(int,input().split()))
if(a[0]<10 and a[1]<10):
    print(a[0]*a[1])
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if(a<10 and b<10):
    print(a*b)
else:
    print(-1)
Problem p02879 (python)

Fixed submission:
data = list(map(lambda x: int(x), input().split()))
     
if __name__ == "__main__":
  if data[0] < 10:
    if data[1] < 10:
      answer = data[0]*data[1]
    else:
      answer = -1
  else:
    answer = -1
    
  print(answer)

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

if data[0] < 10:
  if data[1] < 10:
    answer = data[0]*data[1]
    
return answer
Problem p02879 (python)

Fixed submission:
a, b = map(int, input().split())
if(a>9 or b>9):
  print('-1')
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
n = int(input())
 
for i in range(1,10):
  if(n%i == 0 and n/i <10):
    print('Yes')
    break
else:
  print('No')
Problem p02881 (python)

Fixed submission:
import math
 
n = int(input())
 
sqrt_n = int(math.sqrt(n))
 
for i in reversed(range(sqrt_n+1)):
  if(n%i == 0):
    print(i+int(n/i)-2)
    break

Buggy submission (verdict: Runtime Error):
import math

n = int(input())

sqrt_n = int(math.sqrt(n))

for i in reversed(range(sqrt_n)):
  if(n%i == 0):
    print(i + n%i -2)
Problem p03242 (python)

Fixed submission:
s=list(input())


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

s = ''.join(s)


print(s)

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


a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  elif s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))

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

int a = 0
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  else s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))

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

int a
while a < 3:
  if s[a] == "1":
    s[a] = "9"
  else s[a] == "9":
    s[a] = "1"
  a += 1

print(int(s))
Problem p02879 (python)

Fixed submission:
a,b = (int(x) for x in input().split())
if a > 0 and a < 10:
    if b > 0 and b < 10:
        print(a*b)
    else:
         print(-1)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a,b = int(x) for x in input().split()
if a > 0 and a < 10:
    if b > 0 and b < 10:
        print(a*b)
     else:
         print(-1)
else:
    print(-1)
Problem p02951 (python)

Fixed submission:
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
#    a = int(sys.argv[1])
#    b = int(sys.argv[2])
#    c = int(sys.argv[3])
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    c = int(sys.argv[3])
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    c = int(sys.argv[3])
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)
    sys.exit(2)

if __name__ == "__main__":
    main()
Problem p02916 (python)

Fixed submission:
N = int(input())
As = list(map(int,input().split()))
Bs = list(map(int,input().split()))
Cs = [0] + list(map(int,input().split()))

score = 0
for i in range(N):
  score += Bs[As[i]-1]
  if i >= 1 and As[i]-1==As[i-1]:
    score += Cs[As[i]-1]
print(score)

Buggy submission (verdict: Runtime Error):
N = int(input())
As = map(int,input().split())
Bs = map(int,input().split())
Cs = map(int,input().split())

score = 0
for i in range(N):
  score += Bs[As[i]]
  if i >= 1 and As[i]==As[i-1]+1:
    score += Cs[As[i]]
print(score)
Problem p02987 (python)

Fixed submission:

s=input()
dic={}
for i in range(4):
    if s[i] in dic.keys():
        dic[s[i]]+=1
    else:
        dic[s[i]]=1
ans=0
for i in range(4):
    if dic[s[i]]!=2:
        ans=1
if ans==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

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-i+1) // (i * (i-1)))
	print(n % MOD)
Problem p02990 (python)

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-i+1) // (i * (i-1)))
	print(n % MOD)

Buggy submission (verdict: Runtime Error):

n,k=map(int,input().split())

maxi=min(k,n-k+1)
q=[]
q.append(n-k+1)
c1=n-k+1
c2=1

for i in range(2,maxi+1):

    c1*=(n-k+i)/i
    c2*=(k-i+1)/(i-1)
    q.append(int((c1-sum(q))*c2))
for i in q:
    print(i%(10**9+7))
Problem p02897 (python)

Fixed submission:
n = int(input())
if n == 1: 
    print (1)
elif n % 2 == 0:
    print(0.5)
else:
    print((n+1)/(2*n))

Buggy submission (verdict: Runtime Error):
n = int(input())
if n == 1: 
    print (1)
elif n % 2 == 0:
    print(0.5)
else
    print((n+1)/2*n)
Problem p02880 (python)

Fixed submission:
import sys

a = int(input())

for i in range(9):
    for j in range(9):
        if a == (i+1) * (j+1):
            print('Yes')
            sys.exit()
            
print('No')

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

if a >= 1 and a <= 9 and b >= 1 and b <= 9:
    print('Yes')
else:
    print('No')
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
    print(s)
else:
    print("red")

Buggy submission (verdict: Runtime Error):
a = input()
s = input()
if a >= 3200:
    print(s)
else:
    print("red")
Problem p02881 (python)

Fixed submission:
import math
n = int(input())
sep = []
for i in range(1,int(math.sqrt(n)+1)):
  if(n%i == 0):
    sep.append(i+int(n/i)-2)
sep.sort()
print(sep[0])

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
sep = []
for i in range(1,int(math.sqrt(n))):
  if(n%i == 0):
    sep.append(i+int(n/i)-2)
sep.sort()
print(sep[0])
Problem p02933 (python)

Fixed submission:
if(int(input())<3200):print("red")
else:print(input())

Buggy submission (verdict: Runtime Error):
if(int(input())<3200)print("red")
else print(input())
Problem p03011 (python)

Fixed submission:
n=[int(i) for i in input().split()]
n.sort()
print(n[0]+n[1])

Buggy submission (verdict: Runtime Error):
n=[int(i) for i in input().split]
n.sort()
print(n[0]+n[1])
Problem p03208 (python)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(int(input()))
array.sort()
ans=abs(array[0]-array[n[1]-1])
for i in range(n[0]-(n[1]-1)):
  if(ans>abs(array[i]-array[i+n[1]-1])):
    ans=abs(array[i]-array[i+n[1]-1])
print(ans)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
print(n)
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]-1):
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)
Problem p02879 (python)

Fixed submission:
a, b = list(map(int, input().split()))
if a >= 10 or b >= 10:
    print(-1)
else:
    print(a*b)

Buggy submission (verdict: Runtime Error):
a, b = list(map(int, input()))
if a >= 10 or b >= 10:
	print(-1)
else:
	print(a*b)
Problem p02935 (python)

Fixed submission:

n = int(input())
v = [int(i) for i in input().split()]
v.sort()
v1 = v.pop(0)
for i in range(n-1): 
  v2 = v.pop(0)
  v1 = (v1 + v2) / 2
print(v1)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
v = [int(i) for i in input().split()]
v.sort()
for i in range(n): 
  v1 = v.pop(-1)
  v2 = v.pop(-1)
  v3 = (v1 + v2) / 2
  v.append(v3)
  v.sort()
print(v[0])
Problem p02989 (python)

Fixed submission:
import numpy as np

N = int(input())
arr = [int(i) for i in input().split()]
arr = np.sort(arr)
m1 = arr[int(N / 2)-1]
m2 = arr[int(N / 2)]
print(m2 - m1)

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

N, *arr = map(int, input().split())
arr = np.array(arr)
arr.sort()
m1 = arr[int(N / 2 - 1)]
m2 = arr[int(N / 2)]
print(m2 - m1)
Problem p03011 (python)

Fixed submission:
l = input().split()
l.sort()
print(int(l[0])+int(l[1]))

Buggy submission (verdict: Runtime Error):
l = []
for i in range(3):
    l.append(int(input()))
l.sort()
print(l[0]+l[1])