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

Fixed submission:
a = int(input())
print(a+ a**2 + a**3)

Buggy submission (verdict: Runtime Error):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
f = open('input.txt', 'r')
sys.stdin = f
N,M,K = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

ai =0
bi=0
st =0
c = 0
while True:
  if ai == N:
    if bi == M:
      break
    else:
      st += b[bi]
      if st > K:
        break
      bi += 1
      c +=1
  elif bi == M:
    if ai == N:
      break
    else:
      st += a[ai]
      if st > K:
        break
      ai += 1
      c += 1
  elif a[ai] > b[bi]:
    st += b[bi]
    if st > K:
      break
    bi +=1
    c +=1
  elif a[ai] < b[bi]:
    st += a[ai]
    if st > K:
      break
    ai +=1
    c +=1
  elif a[ai] == b[bi]:
    tmpst = st
    tmpc =0
    tmpai = ai
    tmpbi = bi
    while True:
      tmpst +=a[tmpai]
      if tmpai < N-1:
        tmpai+=1
      if tmpbi < M-1:
        tmpbi+=1
      if tmpst > K:
        st += a[ai]
        if st > K:
          print(c)
          exit()
        ai +=1
        c +=1
        #print(c+tmpc,'ja')
        #exit()
      if a[tmpai] > b[tmpbi]:
          st += b[bi]
          if st > K:
              print(c)
              exit()
          bi += 1
          c += 1
          break
      elif a[tmpai] < b[tmpbi]:
          st += a[ai]
          if st > K:
              print(c)
              exit()
          ai += 1
          c += 1
          break
      if tmpai == N-1 and tmpbi == M-1:
          print(N+M)
          exit()
      #print(tmpst)
      tmpc += 1
      #print(tmpai, tmpbi)
print(c)
Problem p02658 (python)

Fixed submission:
N = int(input())
li = input().split()
a = 1
sikataganai = False
try:
  h = li.index('0')
  print(0)
  sikataganai = True
except:
  for i in range(N):
    a *= int(li[i])
    if a > 10 ** 18:
      print(-1)
      exit()
  if not sikataganai :
    print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = 1
for i in range(N):
  a *= int(input())
if a > 10 ** 18:
  print(-1)
else:
  print(a)
Problem p02687 (python)

Fixed submission:
print('ARC' if input() == 'ABC' else 'ABC')

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int, input().split()))
AB = [sorted(list(map(int,input().split())))for i in range(M)]
AB.sort()
good = [True]*N
j = 0
for i in range(N):
    if not good[i]:
        continue
    while j < M:
        a,b = AB[j]
        if a+1 == i:
            if H[i] > H[b-1]:
                good[b-1] = False
            else:
                good[i] = False
            j +=1
        else:
            break
#print(good)
print(good.count(True))
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
import math
print(int(input()) * 2 * math.PI)
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))

d = sum(A)

if N < d:
  print(-1)
else:
  print(N-d)

Buggy submission (verdict: Runtime Error):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
f = open('input.txt', 'r')
sys.stdin = f

N, M = map(int, input().split())
As = list(map(int, input().split()))
d = sum(As)
if N < d:
    print(-1)
else:
    print(N-d)

Buggy submission (verdict: Runtime Error):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
f = open('input.txt', 'r')
sys.stdin = f

N, M = map(int, input().split())
As = list(map(int, input().split()))
d = sum(As)
if N < d:
    print(-1)
else:
    print(N-d)
Problem p02742 (python)

Fixed submission:
w, h = map(int,input().split())
 
if w == 1 or h == 1:
  print(1)
  exit()
  
if (w * h) % 2 == 0:
  print(w * h // 2)
else:    
  a = w // 2 + 1
  s = a * (h // 2 + 1)
  b = w // 2
  s2 = b * (h //2)
  print(s + s2)

Buggy submission (verdict: Runtime Error):
w, h = x,y = map(int,input().split())

if w * h % 2 == 0:
  print(w * h // 2)
else:
  print(w * h // 2 + 1)
Problem p02743 (python)

Fixed submission:
a,b,c = map(int,input().split())
print('Yes' if 4*a*b < (c-a-b)**2 and c-a-b > 0 else 'No')

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

if N == 1:
  print('a')
elif N == 2:
  print('aa')
  print('ab')
elif N == 3:
  print('aaa')
  print('aab')
  print('aba')
  print('abb')
  print('abc')

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

if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
  print(Yes)
else:
  print(No)
Problem p02765 (python)

Fixed submission:
n,r = map(int, input().split())
 
if n >= 10:
  print(r)
else:
  print(r + 100 * (10-n))

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
X = list(map(int,input().split()))
med = int(sum(X)/N + 0.5)
c = 0
for i in range(N):
  c += (X[i] - med)**2
print(c)

Buggy submission (verdict: Runtime Error):
n,r = map(int, input.split())
 
if n >= 10:
  print(r)
else:
  print(r + 100 * (10-n))

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

if n >= 10:
  print(r)
else:
  print(n + 100 * (10-r))

Buggy submission (verdict: Runtime Error):
n, r = map(int, input().split())
if n >= 10:
  print(r)
else
  print(n + 100 * (10-r))
Problem p02772 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
r = 'APPROVED'
for i in range(N):
  if a[i] % 2 ==0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      r = 'DENIED'
      break
print(r)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input()))
r = 'APPROVED'
for i in range(N):
  if a[i] % 2 ==0:
    if a[i] % 3 != 0 and a[i] % 5 != 0:
      r = 'DENIED'
      break
print(r)
Problem p02778 (python)

Fixed submission:
s = input()
a = '' 
for i in range(len(s)):
  a = a + 'x'

print(a)

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

for i in len(s):
  print(x, '')
Problem p02783 (python)

Fixed submission:
import math
H, A = map(int, input().split())
 
print(math.ceil(H / A))

Buggy submission (verdict: Runtime Error):
import math
H, A map(int, input().split())

print(math.ceil(H / A))
Problem p02784 (python)

Fixed submission:
A, gomi = map(int, input().split())
print('Yes' if A <= sum(list(map(int,input().split()))) else 'No')

Buggy submission (verdict: Runtime Error):
A, gomi = map(int, input().split())
print('Yes' if A <= list(map(int,input().split())) else 'No')

Buggy submission (verdict: Runtime Error):
A, gomi = int(input().split())
print('Yes' if A <= list(map(int,input().split())) else 'No')
Problem p02789 (python)

Fixed submission:
N, M = input().split()
 
if N==M:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
P = list(map(int,input().split()))
count = 1
 
if N > 0:
  min = P[0]
  
for i in range(1, N): 
  if min >= P[i]:
    min = P[i]
    count += 1      
print(count)
Problem p02801 (python)

Fixed submission:
c =input()
l = 'abcdefghijklmnopqrstuvwxyz'
 
print(l[l.index(c) + 1])

Buggy submission (verdict: Runtime Error):
l = ['abcdefghijklmnopqrstuvwxyz']

print(l[l.index(input()) + 1])
Problem p02813 (python)

Fixed submission:
import itertools
N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))
ls = [i for i in range(1,N+1)]
A = list(itertools.permutations(ls))
 
print(abs(A.index(P) - A.index(Q)))

Buggy submission (verdict: Runtime Error):
N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))
ls = [i for i in range(1,N+1)]
A = list(permutations(ls))
 
print(abs(A.index(P) - A.index(Q)))
Problem p02823 (python)

Fixed submission:
N, A, B = map(int, input().split())
if abs(A - B) % 2 == 0:
  print (abs(A - B) // 2)
else:
  hajiniyoru = min(min(A - 1, B - 1), min(N - A, N - B))
  print(hajiniyoru  + 1 + (abs(A - B) - 1) // 2)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
if (A - B) % 2 == 0 :
  print (abs(A - B) // 2)
else:
  print(min(max(A, B) - 1, N - min(A, B))
Problem p02842 (python)

Fixed submission:
import math
N = int(input())
zeinuki = math.floor(N / 1.08)
if N != math.floor(zeinuki * 1.08):
  if N != math.floor((zeinuki + 1) * 1.08):
    print(':(')
  else:
    print(zeinuki + 1)
else:
  print(zeinuki)

Buggy submission (verdict: Runtime Error):
N = int(input())
zeinuki = math.floor(N / 1.08)
print(':('if N != math.floor(zeinuki * 1.08) else zeinuki)
Problem p02921 (python)

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

c = 0

for i in range(len(S)):
  if S[i] == T[i]:
    c +=1
print(c)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
print(N*(N-1)/2)
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):
import math
A,B = map(int,input().split())

print(mach.ceil((B-1)/(A-1)))
Problem p02923 (python)

Fixed submission:
N = int(input())
H = list(map(int,input().split()))
m = 0
c = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    c+=1
  else:
    m = max(m,c)
    c = 0
m = max(m,c)
print(m)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = map(int,input().split())
m = 0
c = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    c+=1
  else:
    m = max(m,c)
    c = 0
print(m)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = map(int,input().split())
m = 0
c = 0
for i in range(H-1):
  if H[i] >= H[i+1]:
    c+=1
  else:
    m = max(m,c)
    c = 0
print(m)
Problem p02999 (python)

Fixed submission:
X,Y = map(int,input().split())
if X < Y:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
W,H,X,Y = map(int,input().split())
if W/2 == X and H/2 == Y:
    f = 1
else:
    f = 0
print(W*H/2, f)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
a = list(map(int,input().split()))
c = 0
r = [0]*N
r[0] = a[0]
minus = 0
minusidx = 0
start = 0
if r[0] >= K:
    c+=N
    minus += r[0]
    minusidx += 1
    start = 1
for i in range(1,N):
    r[i] = r[i-1] + a[i]
    if r[i]-minus >= K:
        c+= N-i
        for j in range(i):
            minus = r[minusidx]
            minusidx += 1
            if r[i] - minus >= K:
                c += N - i
            else:
                break
print(c)
Problem p03067 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a<b:
	if a<c and c<b:
		print("Yes")
	else:
		print("No")
elif b<a:
	if b<c and c<a:
		 print("Yes")
	else:
		 print("No")
else:
	 print("No")

Buggy submission (verdict: Runtime Error):
if a<b:
	if a<c and c<b:
		print("Yes")
	else:
		print("No")
elif b<a:
	if b<c and c<a:
		 print("Yes")
	else:
		 print("No")
else:
	 print("No")

Buggy submission (verdict: Runtime Error):
>>> a,b,c=map(int,input().split())
 
>>> if a<b:
      if a<c and c<b:
          print("Yes")
      else:
          print("No")
    
	elif b<a:
		if b<c and c<a:
			print("Yes")
        else:
        	print("No")
	else:
		print("No")

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

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

Buggy submission (verdict: Runtime Error):
>>> a,b,c=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=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=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=map(int,input().split())
if a<c and c<b:
	print('Yes')
elif b<c and c<a:
  print('Yes')
else
	print('No')
Problem p03071 (python)

Fixed submission:
A, B = input().split()
coin = 0
A = int(A)
B = int(B)
for i in range(2):
    if A > B:
        coin = coin + A
        A = A - 1
    else:
        coin = coin + B
        B = B - 1
print(coin)

Buggy submission (verdict: Runtime Error):
A, B = input().split()
coin = 0
for i in range(2):
    if A > B:
        coin = coin + A
        A = A - 1
    else:
        coin = coin + B
        B = B - 1
print(coin)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
x = 0

for num in range(1)
	if A < B;
		x = x + A
		A = A - 1
    else
    	x = x + B
      	B = B - 1
print(x)
Problem p03282 (python)

Fixed submission:
S = input()
K = int(input())

ind = -1
for i in range(len(S)):
  if S[i] == '1':
    ind = i
  else:
    break

if ind == -1:
  print(S[0])
elif ind + 1 >= K:
  print(1)
else:
  print(S[ind+1])

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())

ind = -1
for i in range(len(S)):
  if S[i] == 1
    ind = i
  else:
    break

if ind == -1:
  print(S[0])
elif ind + 1 >= K:
  print(1)
else:
  print(S[ind+1])
Problem p03456 (python)

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

gosei = int(a+b)

tekito = math.ceil(gosei)

r = 'No'
for i in range(1,tekito+1):
  if gosei % i == 0 and i == gosei // i:
    r = 'Yes'
    break
print(r)

Buggy submission (verdict: Runtime Error):
import math
a,b= input().split()
gosei = int(a+b)
tekito = math.ceil(mast.sqrt(100100))
r = 'No'
for i in range(1,tekito+1):
  if i**2 == gosei:
    r = 'Yes'
    break
print(r)
Problem p03738 (python)

Fixed submission:
A = input()
B = input()

if len(A) > len(B):
  print('GREATER')
elif len(A) < len(B):
  print('LESS')
else:
  for i in range(len(A)):
    if int(A[i]) > int(B[i]):
      print('GREATER')
      exit()
    elif int(A[i]) < int(B[i]):
      print('LESS')
      exit()
  print('EQUAL')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print('GREATER'if a > b 'EQUAL' elif a == b else 'LESS')
Problem p03760 (python)

Fixed submission:
O = input()
E = input()

s=''
for i in range(len(O)):
  s += O[i]
  if i < len(E):
    s+= E[i]
print(s)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()

s=''
try:
  for i in range(len(O)):
    s += O[i]
    s+= E[i]
finally:
  print(s)
Problem p03838 (python)

Fixed submission:
x,y = map(int, input().split())
if x == y :
    print(0)
elif (-x) == y:
    print(1)
elif x >= 0 and x < y: # 0 1
    print(y-x)
elif x >= 0 and x > y: # 5 4 5 -7
    if x <= (-y): #10 -11
        print(abs(x-(-y))+1)
    else: # 10 -9
        print(min(abs(y-(-x))+1,abs(x-y)+2))
elif x < 0 and x > y: # -1 -3
    print(min(abs(x-y)+2, -y -x+1))
elif x < 0 and x < y: # -3 -1
    if y > 0: # -5 6
        print(min(abs(y-x),abs((-y)-x)+1))
    else:
        print(abs(y - x))

Buggy submission (verdict: Runtime Error):
x,y = map(int, input().split())
if x == y :
    print(0)
elif (-x) == y:
    print(1)
elif x >= 0 and x <= y:
    print(y-x)
elif x >= 0 and x > y:
    if x <= (-y): #10 -11
        print(abs(x-(-y))+1)
    else: # 10 -9
        print(abs(y-(-x))+1)
elif x < 0 and x > y: # -1 -3
    print(min(abs(x-y)+2, -y -x+1))
elif x < 0 and x < y: # -3 -1
    if (-x) < y: # -5 6
        print(min(abs(y-x),abs(y-(-x))+1))
    else:
        rint(abs(y - x))
Problem p04012 (python)

Fixed submission:
s = input()
ss = set(s)

r = 'Yes'
for w in ss:
  if s.count(w) % 2 == 1:
    r = 'No'
    break
print(r)

Buggy submission (verdict: Runtime Error):
print('Yes'if all(input().count(i)%2==0for i in set(s))else'No')
Problem p02641 (python)

Fixed submission:
def resolve():
    X, N = map(int, input().split())
    if N != 0:
        P = list(map(int, input().split()))
        S = []
        for _ in range(0, 102):
            if _ in P:
                continue
            else:
                S.append(_)
        if X in S:
            print(X)
        else:
            for i in range(1, 102):
                if X-i in S:
                    print(X-i)
                    exit()
                elif X+i in S:
                    print(X+i)
                    exit()
    else:
        print(X)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = [int(input()) for _ in range(N)]
    if X in P:
        for j in range(N):
            if X+j in P:
                continue
            else:
                print(X+j)
                exit()
            if X-j in P:
                continue
            else:
                print(X-j)
                exit()
    else:
        print(X)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = []
    for i in range(N):
        p = int(input())
        P.append(p)
    plus = 1
    while True:
        if X in P:
            if plus%2 == 1:
                X -= plus
            else:
                X += plus
        else:
            print(X)
            exit()
        plus += 1
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    X, N = map(int, input().split())
    P = []
    for i in range(N):
        p = int(input())
        P.append(p)
    plus = 1
    while True:
        if X in P:
            if plus%2 == 1:
                X -= plus
                plus +=1
            else:
                X += plus
                plus += 1
        else:
            print(X)
            exit()
resolve()
Problem p02657 (python)

Fixed submission:
def resolve():
    A, B = map(int, input().split())
    print(A*B)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1
    if A.count("0") != 0:
        print("0")
        exit()
    for i in A:
        ans *= i
        if ans > 10**18:
          print("-1")
          exit()
    print(ans)
    exit()
resolve()
Problem p02675 (python)

Fixed submission:
N = input()
print("hon" if N[-1] in "24579" else "pon" if N[-1] in "0168" else "bon")

Buggy submission (verdict: Runtime Error):
N = input()
print("bon" if N[-1] == 3 else "pon" if N[-1] in == 0 or N[-1] == 1 or N[-1] == 6 or N[-1] == 8 else "hon")
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
if S+T[-1] in T:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
if S+1 in T:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
if T[T-1] in S:
  print("Yes")
else:
  print("No")
Problem p02700 (python)

Fixed submission:
A, B, C, D = map(int, input().split())
Tcount = 0
Acount = 0
while C > 0:
  C = C -B
  Acount = Acount + 1
while A > 0:
  A = A - D
  Tcount = Tcount + 1
print("Yes" if Tcount >= Acount else "No")

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
while A*C > 0:
  C = C - B
  A = A - D
print("Yes" A>0 else "No")
Problem p02705 (python)

Fixed submission:
S = int(input())
print(S*2*3.14)

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N-1):
        print(A.count(i+1))
    print("0")
resolve()

Buggy submission (verdict: Runtime Error):
S = input()
print(S*2*3.14)

Buggy submission (verdict: Runtime Error):
S = imput()
print(S*2*3.14)

Buggy submission (verdict: Runtime Error):
import math
S = imput()
print(S*2*(math.pi))

Buggy submission (verdict: Runtime Error):
import math
S = imput()
print(S * 2 * math.pi)

Buggy submission (verdict: Runtime Error):
import math
S = imput()
print(S*2*math.pi)
Problem p02718 (python)

Fixed submission:
def resolve():
    N, M = map(int, input().split())
    vote = list(map(int, input().split()))
    bot = sorted(vote)
    print("Yes" if bot[M*-1] >= sum(vote)/(4*M) else "No")
resolve()

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
list = sorted(list(map(int, input().split())))
print("Yes" if list[-1*M] >= sum(list)/4M else("No"))
Problem p02730 (python)

Fixed submission:
S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")

Buggy submission (verdict: Runtime Error):
S = input()
Fi = S[:N-1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Buggy submission (verdict: Runtime Error):
S = input()
N = len(S)
Fi = S[:N--1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Buggy submission (verdict: Runtime Error):
S = input()
Fi = S[:N--1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Buggy submission (verdict: Runtime Error):
S = input()
Fi = S[:N+1/2]
Se = S[N+3/2:]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")
Problem p02742 (python)

Fixed submission:
def resolve():
    H, W = map(int, input().split())
    if H == 1 or W == 1:
        print("1")
    elif H%2 == 1 and W%2 == 1:
        print((H-1)*(W-1)//2+(H-1)//2+(W-1)//2+1)
    elif H%2 == 1 and W%2 == 0:
        print((H-1)*W//2+W//2)
    elif H%2 == 0 and W%2 == 1:
        print(H*(W-1)//2+H//2)
    else:
        print(H*W//2)
resolve()

Buggy submission (verdict: Runtime Error):

    H, W = map(int, input().split())
    if H == 1 or W == 1:
        print("1")
    elif H%2 == 1 and W%2 == 1:
        print((H-1)*(W-1)//2+(H-1)//2+(W-1)//2+1)
    elif H%2 == 1 and W%2 == 0:
        print((H-1)*W//2+W//2)
    elif H%2 == 0 and W%2 == 1:
        print(H*(W-1)//2+H//2)
    else:
        print(H*W//2)
resolve()
Problem p02765 (python)

Fixed submission:
N, R = map(int, input().split())
if N >= 10:
    print(R)
else:
    print(R + 100*(10-N))

Buggy submission (verdict: Runtime Error):
N, R = input().split()
print(R if 10>=N else R+100*(10-N))
Problem p02784 (python)

Fixed submission:
H, N = map(int, input().split())
PP = list(map(int, input().split()))
print("Yes" if sum(PP) >= H else "No")

Buggy submission (verdict: Runtime Error):
H, N = map(int, input().split())
PP = list(map(int, input().split()))
print("Yes" if sum(PP)>=H else(No))

Buggy submission (verdict: Runtime Error):
H, N = int(input())
PP = sum(map(int, input().split()))
print("Yes" if PP>=H else(No))

Buggy submission (verdict: Runtime Error):
H, N = int(input())
PP = list(map(int, input().split()))
print("Yes" if sum(PP)>=H else(No))
Problem p02789 (python)

Fixed submission:
N, M = map(int, input().split())
print("Yes" if N == M else "No")

Buggy submission (verdict: Runtime Error):
N, M = map(input().split())
print("Yes" if N == M else "No")

Buggy submission (verdict: Runtime Error):
N, M map(int, input().split())
print("Yes" if N==M else "No")
Problem p02818 (python)

Fixed submission:
A, B, K = map(int, input().split())
print(A-K, B) if A>=K else print(0, B-(K-A)) if K<=A+B else print(0, 0)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
print(A-K, B) if A>=K else print(0, B-(K-A)) if K<=A+B else print(0,0) if K>A+B
Problem p02885 (python)

Fixed submission:
A, B = map(int, input().split())
print(max(0, A-2*B))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input(),split())
print(max(0, A-2*B))
Problem p02909 (python)

Fixed submission:
S = input()
List = ["Sunny", "Cloudy", "Rainy"]
print(List[(List.index(S)+1)%3])

Buggy submission (verdict: Runtime Error):
S = input()
List = ["Sunny", "Cloudy", "Rainy"]
print(List.index((List.index(S)+1)%3))