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

Fixed submission:
A = [int(i) for i in input().split()]
A.sort()
s,m,l = A
count = 0
ls = l-s
lm = l-m
count += ls//2
count += lm//2
if ls%2 == 0 and lm%2 == 0:
  print(count)
  exit()
elif ls%2 == 1 and lm%2 == 1:
  count += 1
  print(count)
else:
  count += 2
  print(count)

Buggy submission (verdict: Runtime Error):
A = []
A = list(map(int, input().split()))
s,m,l = A.sort()
count = 0
difs = l-s
difm = l-m
count += difs//2 + difm//2
if difs%2 == 0 and difm%2 == 0:
  print(count)
elif difs%2 == 0 and difm%2 == 1:
  count += 2
  print(count)
else:
  count += 1
  print(count)

Buggy submission (verdict: Runtime Error):
A = []
A = list(map(int, input().split()))
s = A.sort()[0]
m = A.sort()[1]
l = A.sort()[2]
count = 0
difs = l-s
difm = l-m
count += difs//2 + difm//2
if difs%2 == 0 and difm%2 == 0:
  print(count)
elif difs%2 == 0 and difm%2 == 1:
  count += 2
  print(count)
else:
  count += 1
  print(count)

Buggy submission (verdict: Runtime Error):
A = []
A = list(map(int, input().split()))
s = A.sort()[0]
m = A.sort()[1]
l = A.sort()[2]
count = 0
difs = l-s
difm = l-m
count += difs//2 + difm//2
if difs%2 == 0 and difm%2 == 0:
  print(count)
elif difs%2 == 0 and difm%2 = 1:
  count += 2
  print(count)
else:
  count += 1
  print(count)
Problem p03408 (python)

Fixed submission:
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]

judge = 0
for i in range(N-1):
  count = 1
  for j in range(i+1,N):
    if s[i] == s[j]:
      count += 1
  for k in range(M):
    if s[i] == t[k]:
      count -= 1
  if count > judge:
    judge = count
print(judge)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]

judge = 0
for i in range(N):
  count = 0
  for j in range(i+1,N+1):
    for k in range(M):
      if s[i] == s[j]:
        count += 1
      if s[i] == t[k]:
        count -= 1
      if count > judge:
        judge = count
print(judge)
Problem p03416 (python)

Fixed submission:
A,B = map(int, input().split())
count = 0
for i in range(A,B+1):
  k = str(i)
  if k[0] == k[4] and k[1] == k[3]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
count = 0
for i in range(A,B+1):
  k = str(i)
  if k == k.reverse :
    count += 1
print(count)
Problem p03434 (python)

Fixed submission:
N = int(input())
cards = list(map(int, input().split()))
cards.sort(reverse=True) 
print(sum(cards[0::2])-sum(cards[1::2]))

Buggy submission (verdict: Runtime Error):
N = int(input())
cards = list(map(int, input().split()))
cards.reverse() 
print(cards[0::2]-cards[1::2])

Buggy submission (verdict: Runtime Error):
N = int(input())
cards = list(map(int, input().split()))
cardsrev = cards.reverse()
Alice = 0
Bob = 0
for i in range(N):
  if i % 2 == 0:
    Alice += cardsrev[i]
  else:
    Bob += cardsrev[i]
print(Alice-Bob)

Buggy submission (verdict: Runtime Error):
N = int(input())
cards = list(map(int, input().split()))
cards = cards.reverse()
Alice = 0
Bob = 0
for i in range(1,N+1):
  if i % 2 == 0:
    Alice += cards[i]
  else:
    Bob += cards[i]
print(Alice-Bob)
Problem p03435 (python)

Fixed submission:
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[2]+c3[1]
e = c1[1]+c2[0]+c3[2]
f = c1[2]+c2[1]+c3[0]
if a==b==c==d==e==f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c = []
for i in range(3):
  x,y,z = map(int, input().split())
  c.append([x,y,z])

if (c[0][0]-c[1][0]=c[0][1]-c[1][1]=c[0][2]-c[1][2]) and (c[0][0]-c[2][0]=c[0][1]-c[2][1]=c[0][2]-c[2][2]):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[2]+c3[1]
e = c1[1]+c2[0]+c3[2]
f = c1[2]+c2[1]+c3[0]
if a=b and b=c and c=d and d=e and e=f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[2]+c3[1]
e = c1[1]+c2[0]+c3[2]
f = c1[2]+c2[1]+c3[0]
if a=b=c=d=e=f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[1]+c3[2]
e = c1[1]+c2[2]+c3[0]
f = c1[2]+c2[0]+c3[1]
if a=b=c=d=e=f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[1]+c3[2]
e = c1[1]+c2[2]+c3[0]
f = c1[2]+c2[0]+c3[1]
if a=b and b=c and c=d and d=e and e=f and f=a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
a = c1[0]+c2[1]+c3[2]
b = c1[1]+c2[2]+c3[0]
c = c1[2]+c2[0]+c3[1]
d = c1[0]+c2[1]+c3[2]
e = c1[1]+c2[2]+c3[0]
f = c1[2]+c2[0]+c3[1]
if a=b and b=c and c=d and d=e and e=f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
c1 = list(map(int,input().split()))
c2 = list(map(int,input().split()))
c3 = list(map(int,input().split()))
for i in range(6):
  k[i] = c1[i%3]+c2[(i+1)%3]+c3[(i+2)%3]
if k[0]=k[1] and k[1]=k[2] and k[2]=k[3] and k[3]=k[4] and k[4]=k[5]:
  print('Yes')
else:
  print('No')
Problem p03448 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
 
count = 0
for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500*i + 100*j + 50*k == X:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
for i in range(A):
  for j in range(B):
    for j in range(C):
      if 500*i + 100*j + 50*k == X:
        count += 1
print(count)
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):
t = [0]
x = [0]
y = [0]
N = int(input())
for i in range(N):
  ti, xi, yi = map(int,input().split())
  t.append(ti)
  x.append(xi)
  y.append(yi)
  
flg = True 
for i in range(1,N+1):
  if (t[i]-t[i-1] <　x[i]-x[i-1] + y[i]-y[i-1]):
    flg = False
  elif ((t[i]-t[i-1])%2 != (x[i]-x[i-1]+y[i]-y[i-1])%2):
    flg = False
if(flg):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
t = [0]
x = [0]
y = [0]
N = int(input())
for i in range(1,N+1):
  ti,xi,yi = map(int,input(),split())
  t.append(ti)
  x.append(xi)
  y.append(yi)
  
flg = True
 
for i in range(1,N-1):
  if t[i]-t[i-1] <　x[i]-x[i-1] + y[i]-y[i-1]:
    flg = False
  else (t[i]-t[i-1])%2 != (x[i]-x[i-1]+y[i]-y[i-1])%2:
    flg = False
if(flg):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
t = [0]
x = [0]
y = [0]
N = int(input())
for i in range(1,N+1):
  ti,xi,yi = map(int,input(),split())
  t.append(ti)
  x.append(xi)
  y.append(yi)
  
flg = True

for i in range(0,N):
  if t[i+1]-t[i] <　x[i+1]-x[i] + y[i+1]-y[i]:
    flg = False
  else (t[i+1]-t[i])%2 - (x[i+1]-x[i] + y[i+1]-y[i])%2==0:
    flg = False
if (flg):
  print('Yes')
else:
  print('No')

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

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

Buggy submission (verdict: Runtime Error):
S = list(str,input())
S[3] = str(8)
print(S)

Buggy submission (verdict: Runtime Error):
S = input()
S[3] = '8'
print(S)

Buggy submission (verdict: Runtime Error):
S = list(map(str, input().split()))
S[3] = '8'
print(S)

Buggy submission (verdict: Runtime Error):
S = list(map(str, input().split()))
del S[2]
S.insert(2,7)
print(S)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
for x in range(N+1):
    for y in range(N-x+1):
        z = N-x-y
        if 10000*x+5000*y+1000*z == Y:
            print(x, y, z)
            exit()
print(-1, -1, -1)

Buggy submission (verdict: Runtime Error):
N,Y = map(int, input().split())
for i in range(N+1):
  for j in range(N+1-i):
    k = N-i-j
      if Y == 10000*i + 5000*j + 1000*k:
        print(i j k)
        sys.exit()
print(-1 -1 -1)
Problem p03471 (python)

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

def f():
  for i in range(N+1):
    for j in range(N+1-i):
      k = N-i-j
      if Y == 10000*i + 5000*j + 1000*k:
        return i,j,k
  return -1,-1,-1

a,b,c = f()
print(a,b,c)

Buggy submission (verdict: Runtime Error):
N,Y = map(int, input().split())
for i in range(N+1):
  for j in range(N+1-i):
    k = N-i-j
      if Y == 10000*i + 5000*j + 1000*k:
        print(i j k)
        sys.exit()
print(-1 -1 -1)

Buggy submission (verdict: Runtime Error):
N,Y = map(int, input().split())
for i in range(N+1):
  for j in range(N+1):
    for k in range(N+1):
      if Y == 10000*i + 5000*j + 1000*k:
        print(i j k)
        sys.exit()
print(-1 -1 -1)
Problem p03478 (python)

Fixed submission:
n,a,b = map(int, input().split())
total = 0
for i in range(1,n+1):
  array = list(map(int,str(i)))
  if a<= sum(array) and sum(array)<=b :
    total += i
print(total)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
total = 0
for i in range(1,n+1):
  array = list(map(int,str(i)))
  if a< sum(array) and sum(array)<b :
    sum += i
print(total)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
sum = 0
for i in range(1,n+1):
  str(i)
  if a< str(i) and str(i)<b :
    sum += i
print(sum)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
sum = 0
for i in range(10):
  for j in range(10):
    for k in range(10):
      for l in range(10):
   	    if 1000*i + 100*j + 10*k + l <= n and a<i+j+k+l and i+j+k+l<b :
   		  sum += 1000*i + 100*j + 10*k + l
print(sum)

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
sum = 0
for i in range(10):
  for j in range(10):
    for k in range(10):
      for l in range(10):
   	    if 1000*i + 100*j + 10*k + l <= n and a<i+j and i+j<b :
   		   sum += 1000*i + 100*j + 10*k + l
print(sum)
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
x = a + b
print(math.floor(x))
Problem p03493 (python)

Fixed submission:
s = input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
N=input()
list=list(map(int, input().split()))
m=0
while all(a%2==0 for a in list):
  list=[a/2 for a in list]
  m += 1
print(m)

Buggy submission (verdict: Runtime Error):
N = input()
list = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in list):
  list = [a/2 for a in list]
  count += 1
print(count)
Problem p03599 (python)

Fixed submission:
A,B,C,D,E,F = map(int, input().split())
W = set()
for a in range(0,F+1,100*A):
  for b in range(0,F+1,100*B):
    W.add(a+b)
S = set()
for c in range(0,F+1,C):
  for d in range(0,F+1,D):
    S.add(c+d)
rate = -1
for w in W:
  for s in S:
    if 0 < w+s <= F and s*100 <= E*w:
      if s/(s+w) > rate:
        rate = s/(s+w)
        ans = w+s,s
print(ans[0],ans[1])

Buggy submission (verdict: Runtime Error):
A,B,C,D,E,F = map(int, input().split())
sugar = 0
judge = 0
for i in range(31):
  for j in range(32):
    for k in range(31):
      for l in range(32):
        if i+j != 0:          
          x = 100*A*i + 100*B*j
          y = C*k + D*l
          if x+y <= F:
            per = 100*y/x
            if per <= E:
              if per > judge:
                judge = per
                sugar = y
                water = x
print(water+sugar,sugar)
Problem p03610 (python)

Fixed submission:
s = list(input())
l = len(s)
a = ''
if l%2 != 0:
    for i in range(l//2+1):
        a = a + "".join(s[2*i])
else:
    for i in range(l//2):
        a = a + "".join(s[2*i])
print(a)

Buggy submission (verdict: Runtime Error):
s = list(input())
l = len(s)
for i in range(l//2+1):
  a = "".join(s[2*i])
print(a)
Problem p03624 (python)

Fixed submission:
S = list(map(str, input()))
S = set(S)
a = set(list('abcdefghijklmnopqrstuvwxyz'))
if len(list(a-S)) == 0:
  print('None')
else:
  print(sorted(list(a-S))[0])

Buggy submission (verdict: Runtime Error):
Sold = list(map(str, input()))
Snew = set(S)
alph = set(list('abcdefghijklmnopqrstuvwxyz'))
if len(list(Snew-alph))==0:
  print('none')
else:
  print(sorted(list(Snew-alph))[0])

Buggy submission (verdict: Runtime Error):
Sold = list(map(str, input()))
Snew = list(set(S))
alfa = [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
for i in range(27):
  if Snew[i] != alfa[i]:
    print(alfa[i])
    exit()
print('None')
Problem p03658 (python)

Fixed submission:
N,K = map(int, input().split())
l = list(map(int,input().split()))
l.sort()
lrev = l[::-1]
print(sum(lrev[:K]))

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
l = input()
lrev = l[::-1]
print(sum(lrev[:K]))

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
l = [input()]
l.sort(reverse = True)
print(sum(l[0::K]))

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
l = [input()]
l.sort(reverse = True)
toral = 0
for i in range(K):
  total += l[i]
print(total)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
toral = 0
for i in range(K):
  total += l[i]
print(total)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
l = [int(i) for i in input().split()]
ls = l.sort(reverse = True)
toral = 0
for i in range(K):
  total += ls[i]
print(total)
Problem p03720 (python)

Fixed submission:
N,M = map(int, input().split())
x = [0]*N
for i in range(M):
  a,b = map(int, input().split())
  x[a-1] += 1
  x[b-1] += 1
for i in range(N):
  print(x[i])

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
x = []
for i in range(M):
  a,b = map(int, input().split())
  x[a-1] += 1
  x[b-1] += 1
for i in range(N):
  print(x[i])

Buggy submission (verdict: Runtime Error):
N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(1,M+1):
  print(S.count(i))

Buggy submission (verdict: Runtime Error):
N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(1,M+1):
  print(S.count('i'))

Buggy submission (verdict: Runtime Error):
N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(M):
  print(S.count('i'))
Problem p03854 (python)

Fixed submission:
S = input()
Srev = S[::-1]
while True: 
  if Srev.startswith('maerd'):
    Srev = Srev[5::]
    continue
  elif Srev.startswith('remaerd'):
    Srev = Srev[7::]
    continue
  elif Srev.startswith('esare'):
    Srev = Srev[5::]
    continue
  elif Srev.startswith('resare'):
    Srev = Srev[6::]
    continue
  elif Srev == '':
    print('YES')
    break
  else:
    print('NO')
    break

Buggy submission (verdict: Runtime Error):
S = input()
Srev = S[::-1]
 
if Srev.startswith('maerd'):
  Srev = Srev[5::]
  continue
elif Srev.startswith('remaerd'):
  Srev = Srev[7::]
  continue
elif Srev.startswith('esare'):
  Srev = Srev[5::]
  continue
elif Srev.startswith('resare'):
  Srev = Srev[6::]
  continue
elif Srev == '':
  print('YES')
  break
else:
  print('NO')
  break

Buggy submission (verdict: Runtime Error):
S = input()
Srev = S.sort(reverse = True)

if Srev.startswith('maerd'):
  Srev = Srev[5::]
  continue
elif Srev.startswith('remaerd'):
  Srev = Srev[7::]
  continue
elif Srev.startswith('esare'):
  Srev = Srev[5::]
  continue
elif Srev.startswith('resare'):
  Srev = Srev[6::]
  continue
elif Srev == '':
  print('YES')
  break
else:
  print('NO')
  break
Problem p03944 (python)

Fixed submission:
W,H,N = map(int,input().split())
p = 0
q = W
l = 0
m = H

for i in range(N):
  x,y,a = map(int, input().split())
  if a == 1:
    p = max(p,x)
  if a == 2:
    q = min(q,x)
  if a == 3:
    l = max(l,y)
  if a == 4:
    m = min(m,y)
if (q-p)<0 or (m-l)<0:
  print(0)
  exit()
else:
  S = (q-p)*(m-l)
  print(S)

Buggy submission (verdict: Runtime Error):
W,H,N = int(input())
p = 0
q = W
l = 0
m = H

for i in range(N):
  x,y,a = map(int.split())
  if a == 1:
    p = max(p,x)
  if a == 2:
    q = min(q,x)
  if a == 3:
    l = max(l,y)
  if a == 4:
    m = min(m,y)
S = (q-p)*(m-l)
print(S)

Buggy submission (verdict: Runtime Error):
W,H,N = int(input())
p = 0
q = W
l = 0
m = H

for i in range(N):
  x,y,a = map(int.split())
  if a == 1:
    p = max(p,x)
  if a == 2:
    q = min(q,x)
  if a == 3:
    l = max(l,y)
  if a == 4:
    m = min(m,x)
S = (q-p)*(l-m)
print(S)
Problem p04044 (python)

Fixed submission:
N,L = map(int, input().split())
S = []
for i in range(N):
  S.append(input())
S.sort()
ans = ''
for i in range(N):
  ans += S[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N,L = map(int, input().split())
S = []
for i in range(N):
  S.append(input())
S.sort()
ans = ''
for i in range(N):
  ans += ans + S[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N,L = map(int, input().split())
S = [list(map(str, input().split())) for i in range(N)]
S.sort()
ans = ''
for i in range(N):
  ans += ans + S[i]
print(ans)
Problem p02608 (python)

Fixed submission:
N=int(input())

a=[0]*N

x=1
while x*x<=N:
    y=1
    while x*x+y*y+x*y<=N:
        z=1
        while z*z+x*x+y*y+x*y+z*y+z*x<=N:
            a[z*z+x*x+y*y+x*y+z*y+z*x-1]+=1
            z+=1
        y+=1
    x+=1

for n in a:
    print(n)

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

a=[0]*N

x=1
while x*x<=N:
    y=1
    while x*x+y*y+x*y<=N:
        z=1
        while z*z+x*x+y*y+x*y+z*y+z*x<=N:
            a[z*z+x*x+y*y+x*y+z*y+z*x]+=1
            z+=1
        y+=1
    x+=1

for n in a:
    print(n)
Problem p02606 (python)

Fixed submission:
L,R,d = (input().split())
L = int(L)
R = int(R)
d = int(d)
count = 0
for i in range(L,R+1):
  if i%d==0:
    count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
L,R,d = (input().split())
count = 0
for i range(L,R+1):
  if i%d==0:
    count = count + 1
print("count")

Buggy submission (verdict: Runtime Error):
L,R,d = int(input().split())
count = 0
for i range(L,R+1):
  if i%d==0:
    count = count + 1
return count

Buggy submission (verdict: Runtime Error):
l = map(int,input().split())
L = l[0]
R = l[1]
d = l[2]
count=0
for i in range(L,R+1):
  if i%d==0:
    count=count + 1
return count
Problem p02607 (python)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
count = 0
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    count = count + 1

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    m.append(l[i])
print(count(m))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    l[i].append(m)
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = map(int,input().split())
m = []
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    l[i].append(m)
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = map(int,input().split())
m = []
for i in range(1,n):
  if i%2!=0 and l[i-1]%2!=0:
    l[i-1].append(m)
print(m)
Problem p02922 (python)

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

if b==1:
	c =0
else:
	while 1+(a-1)*c<b:
		c=c+1


print(c)

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

if b<=1:
	print("0")
else:
	while 1+(a-1)*c<b:
		c=c+1


print(c)
Problem p02923 (python)

Fixed submission:
n = int(input())
h = [int (i) for i in input().split()]
ans=0

l=[]

if n==1:
	l.append(ans)

else:
	for i in range(1,n):
		if h[i-1] >= h[i]:

			ans+=1

			if i==n-1:
				l.append(ans)

		else:

			l.append(ans)

			ans=0

print(max(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = [int (i) for i in input().split()]
ans=0

l=[]

if n==1:
	print("0")

else:
	for i in range(1,n):
		if h[i-1] >= h[i]:

			ans+=1

			if i==n-1:
				l.append(ans)

		else:

			l.append(ans)

			ans=0

print(max(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = [int (i) for i in input().split()]
ans=0

l=[]

for i in range(1,n):
	if h[i-1] >= h[i]:

		ans+=1

		if i==n-1:
			l.append(ans)

	else:

		l.append(ans)

		ans=0

print(max(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int (i) for i in input().split()]
ans=[]
b =0
for i in range(1,n):
	for j in range(i+1,n):
		if a[j-1]>=a[j]:
			b+=1
	ans.append(b)
	b=0

print(max(ans))
Problem p02939 (python)

Fixed submission:
s = list(input())
ans = 0
length = 1
Si = s[0]
loop = [0]
for i in loop:
	Si_1 = ""
	for j in range(0,length):
		Si_1 += s[i+1+j]
	if Si == Si_1:
		length += 1
		i -= 1
		loop.append(i+1)
	else:
		ans += 1
		i += length - 1
		length = 1
		Si = Si_1
		loop.append(i+1)
	if i + length + 1 == len(s):
		ans += 1
		break
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
n = len(s)
for i in range(0,n-1):
	if i == n-2:
		if s[i] == s[i+1]:
			n-=1
		break
	if s[i]==s[i+1]:
		s[i+1]+=s[i+2]
		s.pop(i+2)
		n-=1
print(n)8

Buggy submission (verdict: Runtime Error):
s = list(input())
n = len(s)
for i in range(0,n-2):
	if i == n-2:
		if s[i] == s[i+1]:
			n-=1
		break
	if s[i]==s[i+1]:
		s[i+1]+=s[i+2]
		s.pop(i+2)
		n-=1
print(n)
Problem p03047 (python)

Fixed submission:
N, K = map(int, input().split(" "))
ans = N-K+1
print(ans)

Buggy submission (verdict: Runtime Error):
N,K=map(int, input().split(" "))
ans = N - K + 1
input(ans)
Problem p03494 (python)

Fixed submission:
N = int(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):
N = int(input())
a = list(map(int, input().split(" ")))

ans = float("ïnf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") -1)

print(ans)
Problem p02608 (python)

Fixed submission:
import math
N = int(input())
fn = {i+1:0 for i in range(N)}
rtN = int(math.sqrt(N))+1

def n(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

for x in range(1, rtN):
    for y in range(1, rtN):
        for z in range(1, rtN):
            n_ = n(x,y,z)
            try:
                fn[n_] += 1
            except KeyError:
                pass

for k in fn.values():
    print(k)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
fn = {i+1:0 for i in range(N)}
rtN = int(math.sqrt(N))+1

def n(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

for x in range(1, rtN):
    for y in range(1, rtN):
        for z in range(1, rtN):
            n_ = n(x,y,z)
            try:
                f[n_] += 1
            except KeyError:
                pass

for k in fn.values():
    print(k)