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

Fixed submission:
v=int(input())

v=v%10
if v==3:
    print("bon")
elif v==0 or v==1 or v==6 or v==8:
    print("pon")
else:
    print("hon")

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

v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
v=int(input())
while v<=10:
    v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
v=int(input())
while v<=10
    v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")
Problem p02724 (python)

Fixed submission:
x=int(input())
i=0
u=0
while 500<=x:
    x-=500
    i+=1
while x>=5:
    x-=5
    u+=1
print(1000*i+5*u)

Buggy submission (verdict: Runtime Error):
x=int(input())
i=0
u=0
while 500>=x:
    x-=500
    i+=1
while >=5:
    x-=5
    u+=1
print(5*i+u)
Problem p04044 (python)

Fixed submission:
N,L = map(int, input().split())
string_list = [input() for i in range(N)]
string_list.sort()
print(''.join(string_list))

Buggy submission (verdict: Runtime Error):
N,L = map(int, input().split())
string_list = [input() for i in range(N)]
string_list.sort()
print(''.join(string_list)
Problem p02613 (python)

Fixed submission:
a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		a+=1
	elif s=="WA":
		w+=1
	elif s=="TLE":
		t+=1
	else:
		r+=1
print("AC "+"x "+str(a))
print("WA "+"x "+str(w))
print("TLE "+"x "+str(t))
print("RE "+"x "+str(r))

Buggy submission (verdict: Runtime Error):
AC_Count = WA_Count = TLE_Count = RE_Count = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		AC_Count+=1
	elif s=="WA":
		WA_Count+=1
	elif s=="TLE":
		TLE_Count+=1
	else:
		RE_Count+=1
print("AC "+"x "+AC_count)
print("WA "+"x "+WA_count)
print("TLE "+"x "+TLE_count)
print("RE "+"x "+RE_count)

Buggy submission (verdict: Runtime Error):
AC_Count = WA_Count = TLE_Count = RE_Count = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
      AC_Count+=1
    elif s=="WA":
      WA_Count+=1
    elif s=="TLE":
      TLE_Count+=1
    else:
      RE_Count+=1
print("AC "+"x "+AC_count)
print("WA "+"x "+WA_count)
print("TLE "+"x "+TLE_count)
print("RE "+"x "+RE_count)
Problem p02743 (python)

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

Buggy submission (verdict: Runtime Error):
import math
a, b ,c = map(int, input().split())
aa = math.sqrt(a)
bb = math.sqrt(b)
cc = math.aqrt(c)
if (c-a-b-2*aa*bb)/(cc+aa+bb)>0:
    print('Yes')
else:
    print('No')
Problem p02756 (python)

Fixed submission:
S = list(map(str, input()))
q = int(input())
Q =[list(map(str, input().split())) for k in range(q)]
rev = False
f1 = []
f2 = []
def pls(n):
    global rev
    if n[0] == "1":
        rev = not rev
    else:
        if n[1] == "1":
            if rev:
                f2.append(n[2])
            else:
                f1.append(n[2])
        else:
            if rev:
                f1.append(n[2])
            else:
                f2.append(n[2])

for k in range(q):
    pls(Q[k])

if rev:
    S.reverse()
    f2.reverse()
    ans = f2 + S + f1
else:
    f1.reverse()
    ans = f1 + S + f2

print("".join(map(str, ans)))

Buggy submission (verdict: Runtime Error):
N, P = map(int, input().split())
d = list(map(int, input()))
ans =0
for k in range(0,N):
    for l in range(k+1,N+1):
        num = int("".join(map(str,d[k:l])))
        
        if num % P == 0:
            ans += 1

print(ans)
Problem p03470 (python)

Fixed submission:

N = int(input())
a = [int(input()) for i in range(N)]
a.sort()
for k in range(N-1):
    if a[k] == a[k+1]:
        a[k] =-1

b=[a[k] for k in range(N) if a[k] != -1]
print(len(b))

Buggy submission (verdict: Runtime Error):

N = int(input())
a = [int(input()) for i in range(N)]
a.sort()
for k in range(N-1):
    if a[k] == a[k+1]:
        a[k] =-1

b=[a[k] for k in range(N) if a[k] != -1]

a.remove(-1)
print(len(b))
Problem p03455 (python)

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

if (a*b) % 2 == 0:
  print('Even')
else:
  print('Odd')

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

if (a*b) % 2 == 0):
  print('Even')
else:
  print('Odd')

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

if((a*b) % 2 == 0){
  print('Even')
} else {
  print('Odd')
}
Problem p03457 (python)

Fixed submission:
_ = int(input())
bef_time = 0
bef_x = 0
bef_y = 0
ans = True

for i in range(_):
    next = input().split()
    next_time = int(next[0])
    next_x = int(next[1])
    next_y = int(next[2])
    time = next_time - bef_time
    range = abs(next_x - bef_x) + abs(next_y - bef_y)

    if (next_time - bef_time) < range:
        ans = False
        break

    if time % 2 == 0:
       if range % 2 != 0:
          ans = False
          break
    else:
       if range % 2 == 0 or range == 0:
          ans = False
          break

    bef_time = next_time
    bef_y = next_y
    bef_x = next_x



if ans == True:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
_ = int(input())
bef_time = 0
bef_x = 0
bef_y = 0
ans = True

for i in range(_):
    next = input().split()
    next_time = int(next[0])
    next_x = int(next[1])
    next_y = int(next[2])
    time = next_time - bef_time
    range = abs((next_x - bef_x)) + abs(next_y - bef_y))

    if (next_time - bef_time) < range:
        ans = False
        break

    if time % 2 == 0:
       if  range % 2 != 0:
           ans = False
           break
       else:
           if range % 2 == 0:
              ans = False
              break

    bef_time = next_time
    bef_y = next_y
    bef_x = next_x



if ans == True:
    print('YES')
else:
    print('NO')
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
import math
N = int(inpit())
print math.pi*N
Problem p02760 (python)

Fixed submission:
ary=[list(map(int,input().split()))for p in range(3)]
for i in range(int(input())):
  data=int(input())
  for j in range(3):
    for k in range(3):
      if ary[j][k]==data:
          ary[j][k]=0
ans="No"
for i in range(3):
  if ary[i][0]==ary[i][1]==ary[i][2]==0 or ary[0][i]==ary[1][i]==ary[2][i]==0:
      ans="Yes"
if ary[0][0]==ary[1][1]==ary[2][2]==0 or ary[2][0]==ary[1][1]==ary[0][2]==0:
    ans="Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
a = [0]*3
b = [[0]*3]*3
for i in range(3):
	a[i] = list(map(int,input().split()))

n = int(input())

for i in range(n):
  tmp = int(input())
  for j in range(3):
    for k in range(3):
      if a[i][j] == tmp:
        b[i][j] = 1
        if b[i][0]==1 and b[i][1]==1 and b[i][2]==1:
          print('Yes')
          exit()
        elif b[0][j]==1 and b[1][j]==1 and b[2][j] ==1:
          print('Yes')
          exit()
        elif b[0][0]==1 and b[1][1]==1 and b[2][2] ==1:
          print('Yes')
          exit()
        elif b[0][2]==1 and b[1][1]==1 and b[2][0] ==1:
          print('Yes')
          exit()
print('No')
Problem p02841 (python)

Fixed submission:
import sys
m,d = input().split()
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
  else:
    print('0')
elif m == '2':
  if d == '28':
    print('1')
  else:
    print('0')
else:
  if d == '30':
    print('1')
  else:
    print('0')

Buggy submission (verdict: Runtime Error):
import sys
m,d = int(input().split())
if m in ('1','3','5','7','8','10','12'):
  if d == '31':
    print('1')
elif m == '2':
  if d == '28':
    print('1')
else:
  print('0')
Problem p02843 (python)

Fixed submission:
x=int(input())
n=x//100
if x<100:
    print('0')
else:
    if 100*n<=x and 105*n>=x:
        print('1')
    else:
        print('0')

Buggy submission (verdict: Runtime Error):
import sys
n = int(input())
if n%105==0 or n%104==0 or n%103==0 or n%102==0 or n%101==0 or n%100==0:
	print('1')
    sys.exit()

ans = n%615
if ans < 100:
  ans+=615
for i in range(7):
   for j in range(7):
       for k in range(7):
           for l in range(7):
              for m in range(7):
                   for n in range(7):
                       tmp = 100*i + 101*j + 102*k + 103*l + 104*m + 105*n
                       if ans == tmp:
                            print('1')
                            sys.exit()
                        elif ans < tmp:break
print('0')

Buggy submission (verdict: Runtime Error):
import sys
n = int(input()
ans = n%615
for i in range(7):
    for j in range(7):
        for k in range(7):
            for l in range(7):
                for m in range(7):
                    for n in range(7):
                        tmp = 100*i+101*j + 102*k + 103*l * 104*m + 105*n
                        if ans == tmp:
                            print('1')
                            sys.exit()
                        elif m < tmp:break
print('0')
Problem p02845 (python)

Fixed submission:
N=int(input())
A=map(int,input().split())
m=10**9+7
r=1
C=[0,0,0]
for a in A:
    try:
        i=C.index(a)
        r=r*sum([1 if c==a else 0 for c in C])%m
        C[i]+=1
    except:
        print(0)
        exit()
print(r)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=map(int,input().split())
m=10**9+7
r=1
C=[0,0,0]
for a in A:
  i=C.index(a)
  r=r*sum([1 if c==a else 0 for c in C])%m
  C[i]+=1
print(r)
Problem p02848 (python)

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

print(S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N])))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = inut()
alp = 'ABCDEFGHJKLMNOPQRSTUVWXYZ'
print(a.tanslate(str.maketrans(alp , alp[:n] + alp[n:])))
Problem p02888 (python)

Fixed submission:
import bisect

n = int(input())
s = list(map(int,input().split()))
l = sorted(s)
count = 0
for i in range(n-1):
    for j in range(i+1,n):
        limit = l[i] + l[j]
        count += bisect.bisect_left(l,limit) - (j+1)

print(count)

Buggy submission (verdict: Runtime Error):
import bisect

n = int(input())
s = list(map(int,input().split()))
l = sorted(s)
count = 0
for i in range(n-1):
    for j in range(i+1,n):
        limit = l[i] + l[j]
        count += bisect.bisect_left((l,limit)) - (j+1)

print(count)
Problem p02922 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
ans = 1
if b>a:
  ans = b//a
  if b%a==0:
  else:
    ans+=1
print(ans)
Problem p03471 (python)

Fixed submission:
n,m = map(int,input().split())
for x in range(n+1):
  for y in range(n+1):
    z = n - x - y
    if (10000*x + 5000*y + 1000*z == m and x + y + z == n and 0 <= z <=n):
        print(x,y,z)
        exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
n,y = map(int.input().split())
y //= 1000
k = min((n-y)//4,y//5)
if 9 * k > 2 * (n-y):
  x = (y-n) - 4 *k
  y = 9 * k - 2*(y-n)
  z = y -5*k
  print(x,y,z)
  exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
for x in range(n+1):
  for y in range(n+1):
    z = n - x - y
    if (10000*x + 5000*y + 1000*z == m and \
        x + y + z = m and \
        0 <= z <= n:
        print(x,y,z)
print('-1 -1 -1')
Problem p02612 (python)

Fixed submission:
print((10000-int(input()))%1000)

Buggy submission (verdict: Runtime Error):
N = input()
A = 0 if N%1000 == 0 else 1000 - N%1000
print(A)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = N%1000
A = 0 if X == 0 else A = 1000 - X
print(A)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = 0 if N%1000 == 0 else A = 1000-N%1000
print(A)

Buggy submission (verdict: Runtime Error):
N = input()
A = 0 if N%1000 == 0 else A = 1000-N%1000
print(A)

Buggy submission (verdict: Runtime Error):
N = input()
A = 0 if N%1000 == 0 else A = (1+N//1000)*1000-N
print(A)

Buggy submission (verdict: Runtime Error):
N=input()
print((1+int(N/1000))*1000-N)

Buggy submission (verdict: Runtime Error):
n=input()
print((1+int(n/1000))*1000-n)

Buggy submission (verdict: Runtime Error):
N=input()
print((1+int(N/1000))*1000-N)

Buggy submission (verdict: Runtime Error):
N=input()
print(1+N/1000)

Buggy submission (verdict: Runtime Error):
N = input()
print(1 + N/1000)
Problem p02817 (python)

Fixed submission:
a=input()
s,t = a.split()
print(t+s)

Buggy submission (verdict: Runtime Error):
s = input().strip()
t = input().strip()
print(t+s)

Buggy submission (verdict: Runtime Error):
s=input()
s=input()+s
ptint(s)
Problem p02921 (python)

Fixed submission:
s=input()
t=input()
c=0
for i in range(3):
  if s[i]==t[i]:c+=1
print(c)

Buggy submission (verdict: Runtime Error):
s,t=input().splitlines()
c=0
for i in range(3):
  if s[i]==t[i]:c+=1
print(c)

Buggy submission (verdict: Runtime Error):
s,t=input().split()
c=0
for i in range(3):
  if s[i]==t[i]:c+=1
print(c)
Problem p03478 (python)

Fixed submission:
def SUM(N):
  N=str(N)
  return sum(list(map(int,N)))

t=0
n,a,b=map(int, input().split())
for i in range(n+1):
  if a<=SUM(i)<=b:t+=i
print(t)

Buggy submission (verdict: Runtime Error):
def sum(N):
  N=str(N)
  return sum(list(map(int,N)))

t=0
n,a,b=map(int,input().split())
for i in range(n+1):
  if a<=sum(i)<=b:t+=i
print(t)

Buggy submission (verdict: Runtime Error):
def sum(n):
  n=str(n)
  return sum(list(map(int,n)))

t=0
n,a,b=map(int,input().split())
for i in range(n+1):
  if a<=sum(i)<=b:t+=i
print(t)

Buggy submission (verdict: Runtime Error):
def sum(n):
  n=str(n)
  return sum(list(map(int,n)))

t=0
n,a,b=map(int,input().split())
for i in range(0,n+1):
  print(i)
  if a<=sum(i)<=b:t+=i
print(t)

Buggy submission (verdict: Runtime Error):
def sum(n):
  n=str(n)
  return sum(list(map(int,n)))

t=0
n,a,b=map(int, input().split())
for i in range(0,n+1):
  print(i)
  if a<=sum(i)<=b:t+=i
print(t)
Problem p02660 (python)

Fixed submission:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def calcN(num):
    if num >= 45:
        return 9
    elif num >= 36:
        return 8
    elif num >= 28:
        return 7
    elif num >= 21:
        return 6
    elif num >= 15:
        return 5
    elif num >= 10:
        return 4
    elif num >= 6:
        return 3
    elif num >= 3:
        return 2
    elif num >= 1:
        return 1
    

A = int(input())
if A == 1:
    print(0)
else:
    insuu =  factorization(A)
    ret = 0
    for i in insuu:
        ret += calcN(i[1])
    print(ret)

Buggy submission (verdict: Runtime Error):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def calcN(num):
    if num >= 45:
        return 9
    elif num >= 36:
        return 8
    elif num >= 28:
        return 7
    elif num >= 21:
        return 6
    elif num >= 15:
        return 5
    elif num >= 10:
        return 4
    elif num >= 6:
        return 3
    elif num >= 3:
        return 2
    elif num >= 1:
        return 1
    

A = int(input().split())
insuu =  factorization(A)
ret = 0
for i in insuu:
    ret += calcN(i[1])
print(ret)
Problem p02720 (python)

Fixed submission:
import itertools
def addLunLun(str_num):
    last_digit = int(str_num[len(str_num)-1:])
    if last_digit == 0:
        return [str_num+"0",str_num+"1"]
    elif last_digit == 9:
        return [str_num+"8",str_num+"9"]
    else:
        return [str_num + str(last_digit-1),str_num + str(last_digit),str_num + str(last_digit+1)]
    
digits1 = [str(i) for i in range(1,10)]
digits2 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits1]))
digits3 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits2]))
digits4 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits3]))
digits5 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits4]))
digits6 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits5]))
digits7 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits6]))
digits8 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits7]))
digits9 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits8]))
digits10 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits9]))
index = digits1 + digits2 + digits3 + digits4 + digits5 + digits6 + digits7 + digits8 + digits9 + digits10
K = int(input())
print(index[K-1])

Buggy submission (verdict: Runtime Error):
import itertools
digits1 = [str(i) for i in range(1,10)]
digits2 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits1]))
digits3 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits2]))
digits4 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits3]))
digits5 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits4]))
digits6 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits5]))
digits7 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits6]))
digits8 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits7]))
digits9 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits8]))
digits10 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits9]))
index = digits1 + digits2 + digits3 + digits4 + digits5 + digits6 + digits7 + digits8 + digits9 + digits10
K = int(input())
print(index[K-1])
Problem p03193 (python)

Fixed submission:
n,h,w= map(int,input().split())
c = 0
for _ in range(n):
    a,b = map(int,input().split())
    if a>=h and b>=w:
        c+=1
print(c)

Buggy submission (verdict: Runtime Error):
n,h,w= map(int,input().split())
c = 0
for _ in range(int(input()):
	a,b = map(int,input().split())
    if a >= h and b >= w:
		c += 1
print(c)
Problem p03220 (python)

Fixed submission:
n = int(input())
t,a = map(int,input().split())
ar = list(map(int,input().split()))
mxt,tt,ind = 100000000, 0,0
for i in range(n):
    tt = t - ar[i]*0.006
    f = 0
    if a<0 and tt < 0:
        f, a,tt =1, abs(a),abs(tt)
    if abs(a-tt) < mxt:
        mxt = abs(a-tt)
        ind = i
    if f == 1:
        a = -a
print(ind+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
t,a = map(int,input().split())
ar = list(map(int,input().split()))
mxt,tt,ind = 100000000, 0,0
for i in range(n):
    tt = t - ar[i]*0.006
    f = 0
    if a<0 and tt < 0:
        f a,tt =1, abs(a),abs(tt)
    if abs(a-tt) < mxt:
        mxt = abs(a-tt)
        ind = i
    if f == 1:
        a = -a
print(ind+1)
Problem p03262 (python)

Fixed submission:
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)
n,X = map(int,input().split())
x = [abs(X-int(i)) for i in input().split()]
g = x[0]
for i in range(1,n):
    g = gcd(g,x[i])
print(g)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_right
n,X = map(int,input().split())
a = sorted(list(map(int,input().split())))
ind = bisect_right(a,X)
if ind == 0:
    print(a[1]-X)
elif ind == n:
    print(X-a[ind-1])
else:
    print(min(a[ind]-X,X-a[ind-1]))

Buggy submission (verdict: Runtime Error):
from bisect import bisect_right
n,X = map(int,input().split())
a = list(map(int,input().split()))
ind = bisect_right(a,X)
if ind == 0:
    print(a[1]-X)
else:
    print(min(a[ind]-X,X-a[ind-1]))
Problem p03035 (python)

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

if A >= 13:
    print(B)
elif A <= 5:
    print(0)
else:    
    print(B//2)

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

print(int(B) if A >= 13 else 0 if A <= 5 else int(B//2)
Problem p03424 (python)

Fixed submission:
input()
print("Four" if "Y" in input() else "Three")

Buggy submission (verdict: Runtime Error):
N = int(input())
D = [input() for _ in range(N)]
print('Four' if len(set(D))==4 else 'Three')
Problem p03447 (python)

Fixed submission:
X,A,B = (int(input()) for i in range(3))

print((X-A) % B)

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

print(a - b - (c *((a-b) // c)))
Problem p03448 (python)

Fixed submission:
A, B, C, D = [int(input()) for i in range(4)]
print(sum([500*a+100*b+50*c == D for a in range(A+1) for b in range(B+1) for c in range(C+1)]))

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
print(sum(500*i+100*j+50*k==D for i in range(A+1) for j in range(B+1) for k in range(C+1)))

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
print(sum(500*i+100*j+50*k==d for i in range(A+1) for j in range(B+1) for k in range(C+1)))
Problem p03470 (python)

Fixed submission:
N = int(input())
D = [int(input()) for _ in range(N)]
print(len(set(D)))

Buggy submission (verdict: Runtime Error):
N = int(input())
D = [int(input()) for _ in range(n)]
print(len(set(D)))
Problem p03474 (python)

Fixed submission:
import re

A, B = map(int, input().split())
S = input()
print ('Yes' if re.search(r'\A\d{{{}}}-\d{{{}}}\Z'.format(A, B), S) else 'No')

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
S = input()
print ('Yes' if re.search(r'\A\d{{{}}}-\d{{{}}}\Z'.format(A, B), S) else 'No')
Problem p03485 (python)

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

print((A+B+1)//2)

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

print(min(N*A,B))
Problem p03501 (python)

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

print(N*A if N*A < B else B)

Buggy submission (verdict: Runtime Error):
N=input()
print("No" if int(N) % sum(map(int, N)) else "Yes")
Problem p02887 (python)

Fixed submission:
N = int(input())
s = list(input())
ans = 0
for i in range(len(s)-1):
    if s[i] != s[i+1]:
        ans += 1
    else:
        ans = ans
ans += 1
print(ans)

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

ans = 0
for i in range(len(s)-1):
    if s[i] !== s[i+1]:
        ans += 1
    else:
        ans = ans

ans += 1

print(ans)
Problem p02934 (python)

Fixed submission:
N = int(input())
A = map(int, input().split())
print(1 / sum(1 / x for x in A))

Buggy submission (verdict: Runtime Error):
N = int(input())
l = list(map(int, input().split()))
sum = 0
for i in l:
  sum = sum + 1/l
print(1/sum)
Problem p02945 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
print(max[a+b, a-b, a*b])
Problem p02957 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
K = (a + b) / 2
if (type(K) is int):
  print(K)
else:
  print(IMPOSSIBLE)
Problem p03000 (python)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))

cnt = 1
D = 0
for i in L:
    D += i
    if D > X:
        break
    else:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))
c = 0
for i in L:
  if L <= X:
    c = c + 1
  elif L > X:
    print(c)
Problem p03060 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
v_l = [int(input()) for i in range(N)]
c_l = [int(input()) for i in range(N)]
net = [v_l[i] - c_l[i] for i in range(N)]
max = 0
for i in range(N):
  if net[i] > 0:
    max = max + net[i]
  else:
    max = max
print(max)