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

Fixed submission:
s = input()
a= ""
for i in range(len(s)):
    if i % 2 == 0:
        a += s[i]
print(a)

Buggy submission (verdict: Runtime Error):
s = input()
list= []
for i in range(s):
    if i % 2 == 1:
        list += i
print(list)
Problem p03636 (python)

Fixed submission:
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
a = len(s)-2
print(s[0]+a+s[-1])
Problem p03673 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if n%2 ==0:
    b = a[1::2][::-1]+a[::2]
    print(*b)
else:
    b =a[::2][::-1]+a[1::2]
    print(*b)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
if n%2 ==0:
    b = a[1::2][::-1]+a[::2]
    print(*b)
else:
    b =a[::2][::-1]*a[1::2]
    print(*b)
Problem p03680 (python)

Fixed submission:
n = int(input())
l = [int(input())-1 for i in range(n)]

a = l[0]
for i in range(n):
    if a == 1:
        print(i+1)
        exit()
    a = l[a]
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [int(input()-1 for i in range(n))]

a = l[0]
for i in range(n):
    if a == 1:
        print(i+1)
        exit()
    a = l[a]
else:
    print(-1)
Problem p03695 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
l =[]
for i in a:
    l.append(i//400)
x = set()
y = 0
for i in l:
    if i<= 7:
        x.add(i)
    else:
        y +=1
x = len(x)
if x:
    mi =x
else:
    mi =1
ma = x+y
print('{} {}'.format(mi, ma))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
l =[]
for i in a:
    l.append(i//400)
x = set()
y = 0
for i in l:
    if i< 7:
        x.add(i)
    else:
        y +=1
x = len(x)
if x:
    mi =x
else:
    mi =1
ma =x+y
print('{} {}'.format(mi.ma))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
l =[]
for i in a:
    l.append(i//400)
x = set()
y = 0
for i in l:
    if i< 7:
        x.add(i)
    else:
        y +=1
x = len(x)
if x:
    mi =x
else:
    mi =1
ma =x+y
print('{}{}'.format(mi.ma))
Problem p03721 (python)

Fixed submission:
n,k = map(int, input().split())
ab = sorted([list(map(int,input().split())) for _ in range(n)])
i = 0
c = ab[0][1]
while c < k:
    i += 1
    c += ab[i][1]
print(ab[i][0])

Buggy submission (verdict: Runtime Error):
n,k = map(int(input().split()))
ab = [list(map(int,input().split()))for i in range(n)]

ab.sort()
i = 0
c = ab[0][1]
while c < k:
    i +=1
    c += ab[i][1]
print(ab[i][0])

Buggy submission (verdict: Runtime Error):
n,k = map(int(input().split()))
ab = [list(map(int,input().split()))for i in range(n)]

ab.sort()
c = 0
for i in range(n):
    c += ab[i][1]
    if c >= k:
        print(ab[i][0])
        exit()
Problem p03737 (python)

Fixed submission:
a,b,c = input().split()
print((a[0]+b[0]+c[0]).upper())

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
print((a[0]+b[1]+c[2]).upper())
Problem p03844 (python)

Fixed submission:
a,b,c = input().split()
if b == '+':
    print(int(a)+int(c))
else:
    print(int(a)-int(c))

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
if b == '+':
    print(a+c)
else:
    print(a-c)

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
if b == '+':
    print(a+c)
else:
    print(a-c)
Problem p03845 (python)

Fixed submission:
n = int(input())
t = list(map(int,input().split()))
m = int(input())
for i in range(m):
    p,x = map(int,input().split())
    print(sum(t)-t[p-1]+x)

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int,input().split()))
m = int(input())
for i in range(m):
    p,x = map(int,input().split())
print(sum[t]-t[p-1]+x)

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int,input().split()))
m = int(input())
for i in range(m):
    p,x = map(int,input().split())
print(sum[t]-t[m-1]+x)
Problem p03860 (python)

Fixed submission:
a,b,c = input().split()
print('A'+b[0]+'C')

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
print("A"+B[0]+"Ç")
Problem p04043 (python)

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a == [5,5,7]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
a.sort()
if a == [5,5,7]:
    print("YES")
else:
    print("NO")
Problem p02730 (python)

Fixed submission:
a = input()
for i in range(len(a) // 2):
    if a[i] != a[-(i+1)]:
        print("No")
        exit()
b = a[0:(len(a) - 1) // 2]
c = a[(len(a) + 3) // 2 - 1:len(a)]
for i in range(len(b) // 2):
    if b[i] != b[-(i+1)]:
        print("No")
        exit()
for i in range(len(c) // 2):
    if c[i] != c[-(i+1)]:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
a = input()
for i in range(len(a) // 2):
    if a[i] != b[-(i+1)]:
        print("No")
        exit()
b = a[0:(len(a) - 1) // 2]
c = a[(len(a) + 3) // 2 - 1:len(a)]
for i in range(len(b) // 2):
    if b[i] != b[-(i+1)]:
        print("No")
        exit()
for i in range(len(c) // 2):
    if c[i] != c[-(i+1)]:
        print("No")
        exit()
print("Yes")
Problem p02741 (python)

Fixed submission:
ar = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(ar[k-1])

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split(" "))
if h == 1 or w == 1:
    print(1)
    exit()
if h % 2 == 0:
    print((h // 2) * w)
else:
    if w % 2 == 0:
        print((h // 2) * w + (w // 2))
    else:
        print((h // 2) * w + (w // 2) + 1)
Problem p02988 (python)

Fixed submission:
a = int(input())
ar = list(map(int,input().split(" ")))
count = 0
for i in range(1,a-1):
  if ar[i] < ar[i-1] and ar[i] > ar[i+1]:
    count += 1
  elif ar[i] < ar[i+1] and ar[i] > ar[i-1]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(map(int,input().split(" ")))
count = 0
for i in range(1,a):
  if ar[i] < ar[i-1] and ar[i] > ar[i+1]:
    count += 1
  elif ar[i] < ar[i+1] and ar[i] > ar[i-1]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(map(int,input().split(" ")))
count = 0
for i in range(1,a):
  if ar[i] < ar[i-1] and ar > ar[i+1]:
    count += 1
  elif ar[i] < ar[i+1] and ar > ar[i-1]:
    count += 1
print(count)
Problem p03076 (python)

Fixed submission:
ar = []
br = []
cr = []
mn = 10
for i in range(5):
    l = input()
    if int(l) % 10 == 0:
        ar.append(int(l))
    else:
        br.append(int(l))
        if mn > int(l) % 10:
            mn = int(l) % 10
for r in br:
    if str(r)[-1] == str(mn) and len(cr) == 0:
        cr.append(r)
    else:
        r += 10 - (r % 10)
        ar.append(r)
if len(cr) == 1:
    print(sum(ar) + cr[0])
else:
    print(sum(ar))

Buggy submission (verdict: Runtime Error):
ar = []
br = []
cr = []
mn = 10
for i in range(5):
    l = input()
    if int(l) % 10 == 0:
        ar.append(int(l))
    else:
        br.append(int(l))
        if mn > int(l) % 10:
            mn = int(l) % 10
for r in br:
    if str(r)[-1] == str(mn) and len(cr) == 0:
        cr.append(r)
    else:
        r += 10 - (r % 10)
        ar.append(r)
print(sum(ar) + cr[0])
Problem p03086 (python)

Fixed submission:
a = input()
count = 0
mx = 0
for i in range(len(a)):
    if a[i] == "A" or a[i] == "C" or a[i] == "G" or a[i] == "T":
        count += 1
    else:
        count = 0
    if mx < count:
        mx = count
print(mx)

Buggy submission (verdict: Runtime Error):
a = input()
count = 0
mx = 0
for i in range(len(a)):
	if a[i] == "A" or a[i] == "C" or a[i] == "G" or a[i] == "T":
      count += 1
    else:
      count = 0
    if ma < count:
      mx = count
print(mx)
Problem p03260 (python)

Fixed submission:
a,b = map(int,input().split(" "))
if (a * b) % 2 == 1 or (a * b * 3) % 2 == 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a.b = map(int,input().split(" "))
if (a * b) % 2 == 1 or (a * b * 3) % 2 == 1:
  print("Yes")
else:
  print("No")
Problem p03285 (python)

Fixed submission:
a = int(input())
for i in range(a//4+1):
    for j in range(a//7+1):
        if i * 4 + j * 7 == a:
            print("Yes")
            exit()
print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
if a > 3:
	if a % 4 == 0 or a % 7 == 0 or a % 7 == 4 or a % 7 == 1 or a % 4 == 3:
        print("Yes")
    else:
        print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
if a > 3:
	if a % 4 == 0 or a % 7 == 0 or a % 7 == 4 or a % 7 == 1 or a % 4 == 3:
      print("Yes")
    else:
      print("No")
else:
  print("No")
Problem p03316 (python)

Fixed submission:
b = input()
a = int(b)
ar = list(b)
b = 0
for r in ar:
  b += int(r)
if a % b == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(input())
b = 0
for r in ar:
  b += int(r)
if a % b == 0:
  print("Yes")
else:
  print("No")
Problem p03319 (python)

Fixed submission:
n,m = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
i = ar.index(1)
if n <= m:
    print(1)
    exit()
count = 0
am = 0
count += i // (m - 1)
am += i % (m - 1)
count += (n - 1 - i) // (m - 1)
am += (n - 1 - i) % (m - 1)
if am <= m - 1 and am > 0:
    count += 1
if am > m - 1:
    count += 2
print(count)

Buggy submission (verdict: Runtime Error):
ar = list(map(int,input().split(" ")))
i = ar.index(1)
count = 0
am = 0
if i % (m - 1) == 0:
    count += i // (m - 1)
else:
    count += i // (m - 1) + 1
    am += i % (m - 1)
if (n - 1 - i) % (m - 1) == 0:
    count += (n - 1 - i) // (m - 1)
else:
    count += (n - 1 - i) // (m - 1) + 1
    am += (n - 1 - i) % (m - 1)
if am >= m - 1:
    count -= 1
print(count)
Problem p03325 (python)

Fixed submission:
a = int(input())
ar = list(map(int,input().split(" ")))
br = []
for r in ar:
    if r % 2 == 0:
        br.append(r)
count = 0
for r in br:
    while r % 2 != 1:
        r /= 2
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(map(int,input().split(" ")))
br = []
for r in ar:
    if r % 2 == 0:
        br.append(r)
count = 0
br.sort()
while len(br) != 0:
    t = len(br) - 1
    br = [j * 3 if i != t else j / 2 for i,j in enumerate(br)]
    count += 1
    if br[t] % 2 == 1:
        del br[t]
print(count)
Problem p03353 (python)

Fixed submission:
a = input()
b = int(input())
ar = set(list(a))
arr = sorted(ar)
br = []
for i in range(len(a)):
    if a[i] == arr[0]:
        try:
            for j in range(1,b+1):
                br.append(a[i:i+j])
        except indexError:
            break
cr = set(br)
if len(cr) < b:
    for i in range(len(a)):
        if a[i] == arr[1]:
            try:
                for j in range(1,b+1):
                    br.append(a[i:i+j])
            except indexError:
                break
dr = set(br)
er = sorted(dr)
print(er[b-1])

Buggy submission (verdict: Runtime Error):
a = input()
b = int(input())
ar = list(a)
ar.sort()
br = []
for i in range(len(a)):
    if a[i] == ar[0]:
        try:
            for j in range(1,b+1):
                br.append(a[i:i+j])
        except indexError:
            break
cr = set(br)
if len(cr) < b:
    for i in range(len(a)):
        if ar[i] == ar[1]:
            try:
                for j in range(1,b+1):
                    br.append(a[i:i+j])
            except indexError:
                break
dr = set(br)
er = sorted(dr)
print(er[b-1])
Problem p03359 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split(" "))
if a <= b:
  pritn(a)
else:
  print(a-1)
Problem p03385 (python)

Fixed submission:
ar = list(input())
if "a" in ar and "b" in ar and "c" in ar:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
ar = []
if a + c > b:
    d = b+1
else:
    d = a+c
for i in range(a,d):
    ar.append(i)
if b - c < a:
    e = a
else:
    e = b-c+1
for i in range(e,b+1):
    ar.append(i)
br = set(ar)
cr = sorted(br)
for i in cr:
    print(i)
Problem p03386 (python)

Fixed submission:
a,b,c = map(int,input().split())
ar = []
if a + c > b:
    d = b+1
else:
    d = a+c
for i in range(a,d):
    ar.append(i)
if b - c < a:
    e = a
else:
    e = b-c+1
for i in range(e,b+1):
    ar.append(i)
br = set(ar)
cr = sorted(br)
for i in cr:
    print(i)

Buggy submission (verdict: Runtime Error):
ar = []
if a + c > b:
    d = b+1
else:
    d = a+c
for i in range(a,d):
    ar.append(i)
if b - c < a:
    e = a
else:
    e = b-c+1
for i in range(e,b+1):
    ar.append(i)
br = set(ar)
cr = sorted(br)
for i in cr:
    print(i)
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
count = 0
if a >= b:
	count += b
else:
    count += a
if c >= d:
    count += d
else:
    count += c
print(count)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split(" ")
count = 0
if a >= b:
	count += b
else:
    count += a
if c >= d:
    count += d
else:
    count += c
print(count)
Problem p03434 (python)

Fixed submission:
a = int(input())
ar = list(map(int,input().split(" ")))
A = 0
B = 0
while True:
  A += max(ar)
  ar.remove(max(ar))
  if len(ar) == 0:
      break
  B += max(ar)
  ar.remove(max(ar))
  if len(ar) == 0:
      break
print(A - B)

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(map(int,input().split(" ")))
A = 0
B = 0
while len(ar) != 0:
  A += max(ar)
  ar.remove(max(ar))
  B += max(ar)
  ar.remove(max(ar))
print(A - B)
Problem p03469 (python)

Fixed submission:
a = list(input())
a[3] = '8'
print("".join(a))

Buggy submission (verdict: Runtime Error):
a = list(input())
a[3] = '8'
print("".join.(a))
Problem p03497 (python)

Fixed submission:
import collections
a,b = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
br = set(ar)
cr = collections.Counter(ar)
n = len(br) - b
dr = []
for v in cr.values():
    dr.append(v)
dr.sort()
count = 0
for i in range(n):
    count += dr[i]
print(count)

Buggy submission (verdict: Runtime Error):
import collections
a,b = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
br = set(ar)
cr = collections.Counter(ar)
n = len(br) - b
dr = []
for k in cr.keys():
    cr.append(k)
cr.sort()
count = 0
for i in range(n):
    count += cr[i]
Problem p03543 (python)

Fixed submission:
a = input()
if len(set(a[0:3])) == 1 or len(set(a[1:4])) == 1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = input()
if len(set(list(a[0:3]))) == 1 or len(set(list(a[1:4]))) = 1:
  print("Yes")
else:
  print("No")
Problem p03547 (python)

Fixed submission:
ar = ["A","B","C","D","E","F"]
a = input().split(" ")
if ar.index(a[0]) > ar.index(a[1]):
  print(">")
elif ar.index(a[0]) == ar.index(a[1]):
  print("=")
else:
  print("<")

Buggy submission (verdict: Runtime Error):
ar = ["A","B","C","D","E","F"]
a = input().split(" ")
if ar.index(a[0]) > ar.index([1]):
  print(">")
elif ar.index(a[0]) == ar.index(a[1]):
  print("=")
else:
  print("<")
Problem p03610 (python)

Fixed submission:
a = input()
ar = []
for i in range(len(a)):
  if i % 2 == 0:
    ar.append(a[i])
print("".join(ar))

Buggy submission (verdict: Runtime Error):
a = input()
ar = []
for i in range(len(a)):
  if i % 2 == 0:
    ar.append(i)
print("".join(ar))
Problem p03627 (python)

Fixed submission:
import collections
a = int(input())
ar = list(map(int,input().split(" ")))
br = collections.Counter(ar)
cr = []
for k,v in br.items():
    if v >= 4:
        cr.append(k)
        cr.append(k)
    elif v >= 2:
        cr.append(k)
cr = sorted(cr,reverse=True)
if len(cr) < 2:
    print(0)
else:
    print(cr[0] * cr[1])

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = list(map(int,input().split(" ")))
ar = sorted(ar,reverse=True)
A = 0
B = 0
j = 0
while True:
    if A != 0 and B != 0:
        break
    if j == a - 1:
        break
    if ar[j] == ar[j+1] and A == 0:
        A = ar[j]
        j += 1
    elif ar[j] == ar[j+1] and A != 0:
        B = ar[j]
        j += 1
    j += 1
    print(ar[j])
print(A * B)
Problem p03640 (python)

Fixed submission:
a,b= map(int,input().split(" "))
c = int(input())
ar = list(map(int,input().split(" ")))
br = [[0 for i in range(b)] for j in range(a)]
go = "M"
ap = 1
for i in range(a):
    if go == "M":
        for j in range(b):
            if ar[0] == 0:
                del ar[0]
                ap += 1
            br[i][j] = ap
            ar[0] -= 1
        go = "U"
    else:
        for j in range(b-1,-1,-1):
            if ar[0] == 0:
                del ar[0]
                ap += 1
            br[i][j] = ap
            ar[0] -= 1
        go = "M"
for r in br:
    for i in range(b-1):
        print(r[i],end=" ")
    print(r[b-1])

Buggy submission (verdict: Runtime Error):
a,b= map(int,input().split(" "))
b = int(input())
ar = list(map(int,input().split(" ")))
br = [[0 for i in range(b)] for j in range(a)]
go = "M"
ap = 1
for i in range(a):
    if go == "M":
        for j in range(b):
            if ar[0] == 0:
                del ar[0]
                ap += 1
            br[i][j] = ap
            ar[0] -= 1
        go = "U"
    else:
        for j in range(b-1,-1,-1):
            if ar[0] == 0:
                del ar[0]
                ap += 1
            br[i][j] = ap
            ar[0] -= 1
for r in br:
    for i in range(b-1):
        print(r[i],end=" ")
    print(r[b-1])
Problem p03760 (python)

Fixed submission:
a = list(input())
b = list(input())
ar = []
if len(a) == len(b):
    for i in range(len(a)):
        ar.append(a[i])
        ar.append(b[i])
else:
    for i in range(len(b)):
        ar.append(a[i])
        ar.append(b[i])
    ar.append(a[len(a)-1])
print("".join(ar))

Buggy submission (verdict: Runtime Error):
a = list(input())
b = list(input())
ar = []
if len(a) == len(b):
	for i in range(len(a)):
      ar.append(a[i])
      ar.append(b[i])
else:
  	for i in range(len(b)):
      ar.append(a[i])
      ar.append(a[i])
    ar.append(a[len(a)-1])
print("".join(ar))
Problem p03763 (python)

Fixed submission:
a = int(input())
ar = []
for i in range(a):
    l = input()
    ar.append(l)
br = set(list(ar[0]))
dr = []
for r in br:
    cr =[]
    count = 0
    for rr in ar:
        if rr.count(r) > 0:
            cr.append(rr.count(r))
            count += 1
        if count == a:
            for i in range(min(cr)):
                dr.append(r)
print("".join(sorted(dr)))

Buggy submission (verdict: Runtime Error):
a = int(input())
ar = []
l = 50
t = ''
for i in range(a):
    j = input()
    ar.append(j)
    if len(j) < l:
        l = len(j)
        t = j
ar.remove(t)
br = []
for i in range(l):
    count = 0
    for r in ar:
        if t[i] in r:
            count += 1
    if count == len(ar):
        br.append(t[i])
br.sort()
print("".join(br))
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
print((a + b) * c // 2)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split(" ")))
print((a[0] + a[1]) * a[2] // 2)
Problem p04019 (python)

Fixed submission:
ar = list(input())
br = set(ar)
if len(br) == 4:
    print("Yes")
elif len(br) == 1 or len(br) == 3:
    print("No")
else:
    if "N" in br and "S" in br:
        print("Yes")
    elif "E" in br and "W" in br:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
ar = list(input())
br = set(ar)
if br.count("N") == br.count("S") and br.count("W") == br.count("E"):
  print("Yes")
else:
  print("No")
Problem p04039 (python)

Fixed submission:
a,b = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
while True:
    count = 0
    br = list(str(a))
    for r in br:
        if int(r) in ar:
            count += 1
    if count == 0:
        print(a)
        break
    else:
        a += 1

Buggy submission (verdict: Runtime Error):
ar = list(map(int,input().split(" ")))
while True:
    count = 0
    br = list(str(a))
    for r in br:
        if int(r) in ar:
            count += 1
    if count == 0:
        print(a)
        break
    else:
        a += 1
Problem p02621 (python)

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

Buggy submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
A.insert(0,0)
B=list(map(int,input().split()))
B.insert(0,0)
best=0
for a in range(len(A)):
    atime=0
    btime=0
    for i in range(a+1):
        atime=atime+A[i]
        if atime>K:
          break
    else:
        for b in range(len(B)):
            btime=btime+B[b]
            if atime+btime>K:
                book=a+b-1
                if book>best:
                    best=book
                break
        else:
            book=a+b
            if book>best:
                best=book
print(best)
Problem p02939 (python)

Fixed submission:
s=input()
i=1
s0=s[0]
ct=1
while i<len(s)-1:
  if s0==s[i]:
    s0=s[i:i+2]
    i+=2
  else:
    s0=s[i]
    i+=1
  ct+=1
if i>=len(s):
  print(ct)
elif s0==s[i]:
  print(ct)
else:
  print(ct+1)

Buggy submission (verdict: Runtime Error):
s=input()
i=1
s0=s[0]
ct=1
while i<len(s)-1:
  if s0==s[i]:
    s0=s[i:i+2]
    i+=2
  else:
    s0=s[i]
    i+=1
  ct+=1
if i>len(s):
  print(ct)
elif s0==s[i]:
  print(ct)
else:
  print(ct+1)

Buggy submission (verdict: Runtime Error):
s=input()
i=1
s0=s[0]
ct=1
while i<len(s)-1:
  print(s0)
  if s0==s[i]:
    s0=s[i:i+2]
    i+=2
  else:
    s0=s[i]
    i+=1
  ct+=1
if i>len(s):
  print(ct)
elif s0==s[i]:
  print(ct)
else:
  print(ct+1)
Problem p02983 (python)

Fixed submission:
n,m=map(int,input().split())
a=n//2019
b=m//2019
if n*m%2019==0 or b-a>=1:
  print(0)
else:
  best=2018
  for c in range(n%2019,m%2019):
    for d in range(c+1,m%2019+1):
      if c*d%2019<best:
        best=c*d%2019
  print(best)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=n//2019
b=m//2019
if n*m%2019==0 or b-a>=1:
  print(0)
else:
  best=2018
  for c in range(n%2019,m%2019):
    for d in range(c+1,m%2019+1):
      if c*d%2019<best:
        best=c*d%2019
print(best)
Problem p03296 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
a=l[0]
b=0
c=[]
for i in range(1,n):
  if l[i]==a:
    b+=1
  else:
    c.append(b)
    b=0
  a=l[i]
c.append(b)
for i in range(len(c)):
  c[i]=(c[i]+1)//2
print(sum(c))

Buggy submission (verdict: Runtime Error):
5
1 1 1 1 1n=int(input())
l=list(map(int,input().split()))
a=l[0]
b=0
c=[]
for i in range(1,n):
  if l[i]==a:
    b+=1
  else:
    c.append(b)
    b=0
  a=l[i]
c.append(b)
for i in range(len(c)):
  c[i]=(c[i]+1)//2
print(sum(c))
Problem p03698 (python)

Fixed submission:
s=input()
print("yes" if len(s)==len(set(s)) else "no")

Buggy submission (verdict: Runtime Error):
s=input()
print("yes" if len(s)==len(set(s) else "no")
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
ans=[0 for _ in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  ans[a-1]+=1
  ans[b-1]+=1
for i in range(n):
  print(ans[i])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
ans=[0 for _ in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  ans[a-1]+=1
  ans[b-1]+=1
for i in range(n):
  print(a[i])
Problem p03813 (python)

Fixed submission:
print("ABC" if int(input())<1200 else "ARC")

Buggy submission (verdict: Runtime Error):
print("ABC" if input()<1200 else "ARC")
Problem p03860 (python)

Fixed submission:
s=input()
print(f"A{s[8]}C")

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
Problem p03962 (python)

Fixed submission:
s=set(map(int,input().split()))
print(len(s))

Buggy submission (verdict: Runtime Error):
s=set(int(input().split()))
print(len(s))