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

Fixed submission:
[a, b, c] = list(map(int, input().split(' ')))

if a  <  c and c < b:
    print("Yes")
elif b < c and c < a:
  	print("Yes")
else:
    print("No")

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

if a  <  c and c < b:
    print("Yes")
elif b < c and c < a:
else:
    print("No")
Problem p03623 (python)

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

x = lst[0]
a = lst[1]
b = lst[2]

if abs(b-x) > abs(a-x):
    print("A")
else:
    print("B")

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

x = lst[0]
a = lst[1]
b = lst[2]

if abs(b-x) > (a-x):
    return "A"
else:
    return "B"
Problem p03624 (python)

Fixed submission:
st = input()
hash_set = set()
for item in st:
    hash_set.add(item)

a = "abcdefghijklmnopqrstuvwxyz"

flag = False
for item in a:
    if not item in hash_set:
        print(item)
        flag = True
        break

if flag == False:
    print("None")

Buggy submission (verdict: Runtime Error):
st = input()
hash_set = set()
for item in st:
    hash_set.add(item)

a = "abcdefghijklmnopqrstuvwxyz"

flag = False
for item in a:
    if item in b:
        print(item)
        break

if flag == False:
    print("None")
Problem p02705 (python)

Fixed submission:
import math
i =int(input())
print(2*i*math.pi)

Buggy submission (verdict: Runtime Error):
i = list(map(int,input().split()))
j = list(map(int,input().split()))
S=sum(j)

  
if i[0]>=S:
	print(i[0]-S)
else:
	print("-1")
Problem p03087 (python)

Fixed submission:
N, Q = map(int, input().split())
S = input()
x = [0 for i in range(N)]
A = False
for i in range(len(S)):
    c = S[i]
    if c == 'A':
        A = True
    elif A and c == 'C':
        x[i] += 1
        A = False
    else:
        A = False
s = [0 for i in range(N+1)]
for i in range(N):
    s[i+1] = s[i]+x[i]
for i in range(Q):
    l, r = map(int, input().split())
    l -= 1
    if s[l] != s[l+1]:
        print(s[r]-s[l]-1)
    else:
        print(s[r]-s[l])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
x = [0 for i in range(N)]
T = ""
for i in range(len(S)):
    c = S[i]
    if c == 'A':
        A = True
    elif A and c == 'C':
        x[i] += 1
        A = False
    else:
        A = False
        T += c
s = [0 for i in range(N+1)]
for i in range(N):
    s[i+1] = s[i]+x[i]
for i in range(Q):
    l, r = map(int, input().split())
    l -= 1
    if s[l] != s[l+1]:
        print(s[r]-s[l]-1)
    else:
        print(s[r]-s[l])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
x = [0 for i in range(N)]
T = ""
for i in range(len(S)):
    c = S[i]
    if c == 'A':
        A = True
    elif A and c == 'C':
        x[i] += 1
        A = False
    else:
        A = False
        T += c
s = [0 for i in range(N+1)]
for i in range(N):
    s[i+1] = s[i]+x[i]
print(s)
for i in range(Q):
    l, r = map(int, input().split())
    l -= 1
    if s[l] != s[l+1]:
        print(s[r]-s[l]-1)
    else:
        print(s[r]-s[l])
Problem p03088 (python)

Fixed submission:
N = int(input())
dp = [[[[0 for l in range(4)] for k in range(4)]
       for j in range(4)] for i in range(N)]
for j in range(4):
    for k in range(4):
        for l in range(4):
            if not (j == 0 and k == 1 and l == 2)\
                    and not(j == 0 and k == 2 and l == 1)\
                    and not (j == 2 and k == 0 and l == 1):
                dp[2][j][k][l] = 1
for i in range(2, N-1):
    for j in range(4):
        for k in range(4):
            for l in range(4):
                dp[i][j][k][l] %= 10**9+7
                dp[i+1][k][l][0] += dp[i][j][k][l]
                # 0123: ACGT
                # AG?
                # ?GA
                # A?G
                # ?AG
                if not (j == 0 and k == 2) \
                   and not (k == 2 and l == 0)\
                   and not (j == 0 and l == 2)\
                   and not (k == 0 and l == 2):
                    dp[i+1][k][l][1] += dp[i][j][k][l]
                # ?AC
                if not (k == 0 and l == 1):
                    dp[i+1][k][l][2] += dp[i][j][k][l]
                dp[i+1][k][l][3] += dp[i][j][k][l]
ans = 0
for j in range(4):
    for k in range(4):
        for l in range(4):
            ans += dp[N-1][j][k][l]
ans %= 10**9+7
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
dp = [[[[0 for l in range(4)] for k in range(4)]
       for j in range(4)] for i in range(N)]
for j in range(4):
    for k in range(4):
        for l in range(4):
            if not (j == 0 and k == 1 and l == 2)\
                    and not(j == 0 and k == 2 and l == 1)\
                    and not (j == 2 and k == 0 and l == 1):
                dp[2][j][k][l] = 1
for i in range(2, N-1):
    for j in range(4):
        for k in range(4):
            for l in range(4):
                dp[i][j][k][l] %= 10**9+7
                dp[i+1][k][l][0] += dp[i][j][k][l]
                # 0123: ACGT
                # AG?
                # ?GA
                # A?G
                # ?AG
                if not (j == 0 and k == 2) \
                   and not (k == 2 and l3 == 0)\
                   and not (j == 0 and l == 2)\
                   and not (k == 0 and l == 2):
                    dp[i+1][k][l][1] += dp[i][j][k][l]
                # ?AC
                if not (k == 0 and l == 1):
                    dp[i+1][k][l][2] += dp[i][j][k][l]
                dp[i+1][k][l][3] += dp[i][j][k][l]
ans = 0
for j in range(4):
    for k in range(4):
        for l in range(4):
            ans += dp[N-1][j][k][l]
ans %= 10**9+7
print(ans)
Problem p03369 (python)

Fixed submission:
S = input()
l = list(S)
print(700+l.count('o')*100)

Buggy submission (verdict: Runtime Error):
S = input()
l = list(S)
print(700+l.count('o')*100)
@
Problem p03485 (python)

Fixed submission:
a, b = map(int, input().split())
print((a+b)//2+(a+b) % 2)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
print((a+b)//2+(a+b) % 2))
Problem p03643 (python)

Fixed submission:
N = int(input())
print("ABC"+str(N))

Buggy submission (verdict: Runtime Error):
N = int(input())
print(f"ABC{N}")
Problem p02639 (python)

Fixed submission:
import numpy
input_x = [int(i) for i in input().split(" ")]
for i in range(5):
    if not i+1 in input_x:
        print(i+1)

Buggy submission (verdict: Runtime Error):
import numpy as np
X, N = map(int, input().split())
p_list = set([int(i) for i in input().split()])
set_all = set(np.arange(-100, 101))
ex_list = set_all-p_list
ex_list = list(ex_list)
diff_list = [np.abs(i-X) for i in ex_list]
min_index = np.argmin(diff_list)
print(ex_list[min_index])
Problem p02640 (python)

Fixed submission:
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t


for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
    if y in num_list[x]:
        print("Yes")
    else:
        print("No")
Problem p02641 (python)

Fixed submission:
import numpy as np
X, N = map(int, input().split())
p_list = set([int(i) for i in input().split()])
set_all = set(np.arange(-201, 201))
ex_list = set_all-p_list
ex_list = list(ex_list)
diff_list = [np.abs(i-X) for i in ex_list]
min_index = np.argmin(diff_list)
print(ex_list[min_index])

Buggy submission (verdict: Runtime Error):
X, N = map(int, input().split())
p_list = set([int(i) for i in input().split()])
set_all = set(np.arange(-100, 101))
ex_list = set_all-p_list
ex_list = list(ex_list)
diff_list = [np.abs(i-X) for i in ex_list]
min_index = np.argmin(diff_list)
print(ex_list[min_index])

Buggy submission (verdict: Runtime Error):
X, N = map(int, input().split())
p_list = set([int(i) for i in input().split()])
set_all = set(np.arange(0, 101))
ex_list = set_all-p_list
ex_list = list(ex_list)
diff_list = [np.abs(i-X) for i in ex_list]
min_index = np.argmin(diff_list)
print(ex_list[min_index])
Problem p02639 (python)

Fixed submission:
X = list(map(int, input().split()))
for i in range(len(X)):
  if X[i] == 0:
    print(i+1)
    break

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
count = 1
for i in range(N-1):
  flag = 1
  for j in range(N-1, i, -1):
    if A[i] % A[j] == 0:
      flag = 0
      break
  if flag:
      count += 1
if N == 1:
  print(0)
elif A[0] == A[1]:
  print(0)
else:
  print(count)
Problem p02675 (python)

Fixed submission:
N = list(input())

num = N[-1]

if num == '3':
  print('bon')
elif num == '0' or num=='1' or num=='6' or num=='8':
  print('pon')
else:
  print('hon')

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

if num == '3':
  print('bon')
elif num == '0' or num=='1' or num=='6' or num=='8':
  print('pon')
else:
  print('hon')
Problem p02678 (python)

Fixed submission:
from collections import deque

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

graph=[[] for i in range(n)]

roomSign=[-1]*n

for i in range(m):
    a,b=map(int,input().split())
    a-=1;b-=1
    graph[a].append(b)
    graph[b].append(a)

D=deque([0])

while D:
    v=D.popleft()
    for i in graph[v]:
        if roomSign[i] == -1:
          roomSign[i]=v
          D.append(i)

print("Yes")

for i in range(1,n):
    print(roomSign[i]+1)

Buggy submission (verdict: Runtime Error):
from collections import deque

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

graph=[[] for i in range(n)]

roomSign=[-1]*n

for i in range(m):
    a,b=map(int,input().split())
    a-=1;b-=1
    graph[a].append(b)
    graph[b].append(a)

D=deque([0])

while D:
    v=D.popleft()
    for i in graph[v]:
        if roomSign[i] == -1:
          roomSign[i]=v
          D.append(i)
          print(roomSign)

print("Yes")

for i in range(1,n):
    print(roomSign[i]+1)

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

A=[]
B=[]

for _ in range(M):
  n, m = map(int, input().split())
  A.append(n)
  B.append(m)

roomN = ['N' for _ in range(N)]
roomN[0] = 1
roomPN = [0 for _ in range(N)]

for order in range(2, N+1):
  if ! 'N' in roomN:
    break:
  if order-1 in roomN:
     pres = [i+1 for i,x in enumerate(roomN) if x == order-1]
  for pre in pres:
    if pre in A:
      indexs = [i for i,x in enumerate(A) if x == pre]
      for index in indexs:
        now = B[index] -1
        if roomN[now] == 'N':
          roomN[now] = order
          if roomPN[now] == 0:
            roomPN[now] = pre
    if pre in B:
      indexs = [i for i,x in enumerate(B) if x == pre]
      for index in indexs:
        now = A[index] -1
        if roomN[now] == 'N':
          roomN[now] = order
          if roomPN[now] == 0:
            roomPN[now] = pre

print('Yes')
for i in range(1, N):
  print(roomPN[i])
Problem p02681 (python)

Fixed submission:
S = list(input())
T = list(input())

T.pop(-1)
if S == T:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
li = list(map(int, input().split()))

i=1
k=0

while K > k:
  i = li[i-1]
  k = 1 + k

print(i)
Problem p02767 (python)

Fixed submission:
N = int(input())
X = list(map(int, input().split()))
costMin = 9999999999
for locate in range(1, 101):
  cost = 0
  for i in range(N):
    cost += (X[i]-locate)**2
  if cost < costMin:
    costMin = cost
print(costMin)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
Min = min(X)
Max = max(X)
disList = []
flag = 1
for ass in range(Min, Max):
  dis = 0
  for person in range(N):
    dis += (X[person] - ass) * (X[person] - ass)
  disList.append(dis)  
for i in range(N):
  if not X[i] == 1:
    flag=0
    break
if N == 1:
  print(X[0])
elif flag == 0:
  print(min(disList))
else:
  print(1)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
Min = min(X)
Max = max(X)
disList = []
for ass in range(Min, Max):
  dis = 0
  for person in range(N):
    dis += (X[person] - ass) * (X[person] - ass)
  disList.append(dis)
print(min(disList))
Problem p02657 (python)

Fixed submission:
s=input().split()
n,m=int(s[0]),int(s[1])
print(n*m)

Buggy submission (verdict: Runtime Error):
s=int(input())
n,m=int(s[0]),int(s[1])
print(n*m)
Problem p02639 (python)

Fixed submission:
l = input().split()

for i in range(5):
  if l[i] == "0":
    print(i+1)
    break

Buggy submission (verdict: Runtime Error):
l = int(input())
n = [int(i) for i in input().split()]
u = n.copy()
n.sort()
u.sort(reverse=True)

counter = 0

for j in range(l):
  for i in range(l):
    if n[i] == u[j]:
      pass
    elif u[j] % n[i] == 0:
      counter += 1
      break
    else:
      pass

print(l - counter)
Problem p02640 (python)

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

for i in range(l[0]+1):
  r = i * 2 + (l[0] - i) * 4
  if r == l[1]:
    print("Yes")
    break
  else:
    if (l[0] - i) == 0:
      print("No")

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

for i in range(l[0]+1):
  r = (i * 2 + (l[0] - i) * 4
  if r == l[1]:
    print("Yes")
    break
  else:
    if i == l[0]:
      print("No")
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
li = list(map(int,input().split()))
a = 1
for i in range(n):
  a *= li[i]
if a > 10**18:
  print("-1")
else:
  print(a)
Problem p02742 (python)

Fixed submission:
from math import floor,ceil
h,w=map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    m =ceil(w/2) * ceil(h/2) + floor(w/2) * floor(h/2)
    print(m)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
from math import ceil,floor
if h == 1 or w == 1:
    print(1)
else:
    m = math.ceil(w/2) * math.ceil(h/2) + math.floor(w/2) * math.floor(h/2)
    print(m)

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    m = math.ceil(w/2) * math.ceil(h/2) + math.floor(w/2) * math.floor(h/2)
    print(m)

Buggy submission (verdict: Runtime Error):
from math import ceil
n,m=map(int,input().split())
if n==1 or m==1:
  print(1)
  else:
    print(ceil(n/2)*ceil(m/2)+n//2*m//2)

Buggy submission (verdict: Runtime Error):
from math import ceil
a,b=map(int,input().split())
if a==1 or b==1:
  print(1)
else:
  print(ceil(n/2)*ceil(m/2)+n//2*m//2)
Problem p03161 (python)

Fixed submission:
def main():
	N, K = map(int, input().split())
	h = list(map(int, input().split()))
 
	dp=[0]*N
 
	for i in range(1,N):
		dp[i] = min(
			dp[g] + abs(h[i] - h[g]) for g in range(max(i-K,0), i)
		)
	print(dp[N-1])
main()

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
	h = list(map(int, input().split()))
 
	dp=[0]*N
 
	for i in range(1,N):
		dp[i] = min(
			dp[g] + abs(h[i] - h[g]) for g in range(max(i-K,0), i)
		)
	print(dp[N-1])
Problem p02639 (python)

Fixed submission:
ar=input().split()
print(ar.index('0')+1)

Buggy submission (verdict: Runtime Error):
ar=input().split()
    print(ar.index('0')+1)
Problem p02658 (python)

Fixed submission:
p=int(input())
ans=1
ar=list(map(int,input().split()))
if 0 in ar:ans=0
else:
    for i in range(p):
        if ans<1e18:ans*=ar[i]
        else:ans=-1;break
if ans>1e18:ans=-1
print(ans,end='')

Buggy submission (verdict: Runtime Error):
p=int(input())
ans=1
ar=[map(int,input().split())]
if 0 in ar:ans=0
else:
    for i in range(p):
        if ans<1e18:ans*=ar[i]
        else:ans=-1;break
    
print(ans,end='')
Problem p03971 (python)

Fixed submission:
n,a,b=map(int,input().split())
s=list(input())
nover=0
tot=0
for i in range(n):
    if tot<a+b:
        if s[i]=='a':
            print('Yes')
            tot+=1
        elif s[i]=='b' and nover<b:
            print('Yes')
            nover+=1
            tot+=1
        else:
            print('No')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
def main():
    n,a,b=mi()
    s=input()
    nover=0
    tot=0
    for i in range(n):
        if tot<a+b:
            if s[i]=='a':
                print('Yes')
                tot+=1
            elif s[i]=='b' and nover<b:
                print('Yes')
                nover+=1
                tot+=1
            else:
                print('No')
        else:
            print('No')
main()

Buggy submission (verdict: Runtime Error):
def main():
    n,a,b=mi()
    s=list(input())
    nover=0
    tot=0
    for i in range(n):
        if tot<a+b:
            if s[i]=='a':
                print('Yes')
                tot+=1
            elif s[i]=='b' and nover<b:
                print('Yes')
                nover+=1
                tot+=1
            else:
                print('No')
        else:
            print('No')
main()
Problem p02936 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,Q = map(int,readline().split())
ABPX = list(map(int,read().split()))
AB = iter(ABPX[:N+N-2])
PX = iter(ABPX[N+N-2:])

graph = [[] for _ in range(N+1)]
for a,b in zip(AB,AB):
    graph[a].append(b)
    graph[b].append(a)

val = [0] * (N+1)
for p,x in zip(PX,PX):
    val[p] += x

stack = [1]

parent = [0] * (N+1)
while stack:
    x = stack.pop()
    for y in graph[x]:
        if y == parent[x]:
            continue
        parent[y] = x
        stack.append(y)
        val[y] += val[x]

print(' '.join(map(str,val[1:])))

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,Q = map(int,readline().split())
ABPX = list(map(int,read().split()))
AB = iter(ABPX[:N+N-2])
PX = iter(ABPX[N+N-2:])

graph = [[] for _ in range(N+1)]
for a,b in zip(AB,AB):
    graph[a].append(b)
    graph[b].append(a)

val = [0] * (N+1)
for p,x in zip(PX,PX):
    val[p] += x

stack = [1]

parent = [0] * (N+1)
while stack:
    x = stack.pop()
    for y in graph[x]:
        if y == parent[x]:
            continue
        parent[y] = x
        stack.append(y)
        val[y] += val[x]

print(' '.join(map(ste,val[1:])))

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,Q = map(int,readline().split())
ABPX = list(map(int,read().split()))
AB = iter(ABPX[:N+N-2])
PX = iter(ABPX[N+N-2:])

graph = [[] for _ in range(N+1)]
for a,b in zip(AB,AB):
    graph[a].append(b)
    graph[b].append(a)

val = [0] * (N+1)
for p,x in zip(PX,PX):
    val[p] += x

stack = [1]

parent = [0] * (N+1)
while stack:
    x = stack.pop()
    for y in graph[x]:
        if y == parent[x]:
            continue
        parent[y] = x
        stack.append(y)
        val[y] += val[x]

print(' '.join(map(std,val[i:])))
Problem p03448 (python)

Fixed submission:
a,b,c,x = map(int,[input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500 + j*100 + k*50 == x:
                ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,[intut() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500 + j*100 + k*50 == x:
                ans +=1

print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x = map(int,[intut() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500 + j*100 + k*50 == x:
                ans +=1

print(ans)
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())
if(a*b)%2:
    print("Odd")
else:
    print("Even")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split)
if(a*b)%2:
    print("Odd")
else:
    print("Even")
Problem p03494 (python)

Fixed submission:
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
    ans = min(ans,len(bin(i))-bin(i).rfind("1")-1)
print(round(ans))

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int,input().split()))
ans = float("inf")
for i in a:
    ans = min(ans,len(bin(i))-bin(i).rfind("1")-1)
printf(round(ans))
Problem p02922 (python)

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

print(math.ceil((b-1)/(a-1)))

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>

using namespace std;

int main() {
	int A, B; cin >> A >> B;
	int ans = 0;
	int outlet = 1;
	while (outlet < B) {
		--outlet;
		outlet += A;
		++ans;
	}
	cout << ans << endl;
}
Problem p03238 (python)

Fixed submission:
n = int(input())

if n == 1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)

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

if n == 1:
  print('Hello World')
else:
  a = int(input()
  b = int(input()
  print(a+b)

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

if n == 1:
  print('Hello World')
else:
  a, b = map(int, input().split())
  print(a+b)
Problem p03563 (python)

Fixed submission:
r = int(input())
g = int(input())

print((g - r)*2 + r)

Buggy submission (verdict: Runtime Error):
r = int(input())
g = int(input())

print(abs(g - r)*2 + mint(g,r))
Problem p03671 (python)

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

print(a[0] + a[1])

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

print(a[0] + a[1])
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())

print((a+b)*h//2)

Buggy submission (verdict: Runtime Error):

b = int(input())
h = int(input())

print((a+b)*h/2)

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

print(a*b*h/2)a = int(input())
b = int(input())
h = int(input())

print((a+b)*h/2)
Problem p04011 (python)

Fixed submission:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n - k >= 0:
  print(k * x + (n-k) * y)
else:
  print(n * x)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n - k >= 0:
  print(k * x + (n-k) * y)
else
  print(k * x)
Problem p02639 (python)

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


i=1
for num in arr:
    if(num==0):
        print(i)
    else:
        i = i +1

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


i=1
for num in arr:
    if(num==0):
        print(i)
    else:
        i++;
Problem p02681 (python)

Fixed submission:
s = [input() for i in range(2)]

s_length = len(s[0])
s2_length = len(s[1])

if s2_length==s_length+1 and s[0]==s[1][:s_length]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = [input() for i in range(2)]

s_length = len(s[0])
s2_length = len(s[1])

if s2_length==s_length+1 and s[0]==s[1][:s_length]:
    print("Yes")
else:
    print("NO")_l