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

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

print(X+Y//2)

Buggy submission (verdict: Runtime Error):
from operator import itemgetter

N, M = map(int, input().split())

ci = []
pi = [0] * N
for i in range(M):
    ci.append([i] + list(map(int, input().split())))

ci.sort(key=itemgetter(1,2))
for c in ci:
    pi[c[1]-1] += 1
    prestr = str(c[1]).zfill(6)
    bhstr = str(pi[c[1]-1]).zfill(6)
    c.append(''.join([prestr, bhstr]))

ci.sort()
for c in ci:
    print(c[3])
Problem p03288 (python)

Fixed submission:
R = int(input())

if R >= 2800:
    print('AGC')
elif R < 1200:
    print('ABC')
else:
    print('ARC')

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

if R >= 2800:
    print('AGC')
elif R < 1200:
    print('ABC')
else:a
    print('ARC')
Problem p03294 (python)

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

ans = 0
for a in ai:
    ans += a - 1

print(ans)

Buggy submission (verdict: Runtime Error):
import copy
N = int(input())
ai = list(map(int, input().split()))

def lcm_list(l):
    if len(l) <= 1:
        return l[0]
    
    a = l.pop(len(l)-1)
    b = l.pop(len(l)-1)
    ans = lcm(a, b)
    l.append(ans)
    return lcm_list(l)

def lcm(a, b):
    return a * b // gcd(a, b)

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a % b)

bi = copy.deepcopy(ai)
lcm_a = lcm_list(ai) - 1
ans = 0
for a in bi:
    ans += lcm_a % a

print(ans)

Buggy submission (verdict: Runtime Error):
7
994 518 941 851 647 2 581
Problem p03337 (python)

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

max = -1000
if A + B > max:
    max = A + B
if A - B > max:
    max = A - B
if A * B > max:
    max = A * B
print(max)

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

max = -1000
if A + B > max:
    max = A + B
if A - B > max:
    max = A - B
if A * B > max:
    max = A * B
print(max)
Problem p03565 (python)

Fixed submission:
S = input()
T = input()
c = 0
idx = 0
ans = []
for i, s in enumerate(S):
    if s == T[0] or s == '?':
        tmp = S[i:min(i+len(T), len(S))]
        flg = True
        if len(T) != len(tmp):
            continue
        for j, c in enumerate(tmp):
            if c != T[j] and c != '?':
                flg = False
                break
        if flg:
            ans.append((S[:i] + T + S[i+len(T):]).replace('?', 'a'))
if len(ans) == 0:
    print('UNRESTORABLE')
else:
    ans.sort()
    print(ans[0])

Buggy submission (verdict: Runtime Error):
SD = input()
T = input()

for i, ch in enumerate(T):
    if ch in SD:
        n = SD.find(ch)
        flag = True
        c = 0
        for j in range(n-1, n-i, -1):
            if j < 0:
                flag = False
                break
            if SD[j] != '?' and SD[j] != T[i-c]:
                flag = False
                break
            flag = True
            c += 1
        if flag:
            c = 0
            for j in range(n+1, n+len(T)-i):
                if j > len(SD)-1:
                    flag = False
                    break
                if SD[j] != '?' and SD[j] != T[i+c]:
                    flag = False
                    break
                flag = True
                c += 1
        if flag:
            remP = SD[:n-i]
            remA = SD[n+1+len(T)-i:]
            for j, rc in enumerate(remP):
                if rc == '?':
                    remP = remP[:j] + 'a' + remP[j+1:]
            for j, rc in enumerate(remA):
            	if rc == '?:
              		remA = remA[:j] + 'a' + remA[j+1:]
            print(remP+T+remA)
            quit()
print('UNRESTORABLE')

Buggy submission (verdict: Runtime Error):
SD = input()
T = input()

for i, ch in enumerate(T):
    if ch in SD:
        n = SD.find(ch)
        flag = True
        c = 0
        for j in range(n-1, n-i, -1):
            if j < 0:
                flag = False
                break
            if SD[j] != '?' and SD[j] != T[i-c]:
                flag = False
                break
            flag = True
            c += 1
        if flag:
            c = 0
            for j in range(n+1, n+len(T)-i):
                if j > len(SD)-1:
                    flag = False
                    break
                if SD[j] != '?' and SD[j] != T[i+c]:
                    flag = False
                    break
                flag = True
                c += 1
        if flag:
            remP = SD[:n-i]
            remA = SD[n+1+len(T)-i:]
            for j, rc in enumerate(remP):
                if rc == '?':
                    remP = remP[:j] + 'a' + remP[j+1:]
            for j, rc in enumerate(remA)
            	if rc == '?:
              		remA = remA[:j] + 'a' + remA[j+1:]
            print(remP+T+remA)
            quit()
print('UNRESTORABLE')
Problem p03599 (python)

Fixed submission:
A, B, C, D, E, F = map(int, input().split())
ans = [[0, 0]]
for i in range(0, F//100):
    if 100*A*i > F:
        break
    for j in range(0, F//100):
        if 100*A*i+100*B*j > F:
            break
        if 100*A*i + 100*B*j == 0:
            continue
        for k in range(0, F//C+1):
            for l in range(0, F//D+1):
                if 100*A*i + 100*B*j + C*k + D*l > F:
                    break
                if  (C*k + D*l)/(100*A*i + 100*B*j) > E/100:
                    break
                ans.append([(100*A*i + 100*B*j + C*k + D*l), (C*k + D*l)])
ans = sorted(ans, key=lambda x: x[1]/x[0] if x[0] != 0 else 0)
print(ans[-1][0], ans[-1][1])

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

AQ = set()
for i in range(F):
    for j in range(F):
        if 100*A*i + 100*B*j <= F:
            AQ.add(100*A*i + 100*B*j)
        else:
            break

SG = set()
for i in range(F):
    for j in range(F):
        if C*i + D*j <= F:
            SG.add(C*i + D*j)
        else:
            break

ans = [0, 0]
maxc = None
for aq in AQ:
    for sg in SG:
        if aq == 0:
            continue
        if aq+sg > F or sg/aq > E/100:
            continue
        if maxc < sg/(aq+sg):
            ans = [aq, sg]
            maxc = sg/(aq+sg)
if maxc is None:
    print(0, 0)
else:
    print(ans[0]+ans[1], ans[1])
Problem p03777 (python)

Fixed submission:
a, b = map(str, input().split())
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Buggy submission (verdict: Runtime Error):
H H
Problem p03854 (python)

Fixed submission:
S = input()
P = ['dream', 'dreamer', 'erase', 'eraser']
s = S
for i in range(10**5):
    flg = True
    for p in P:
        if s[len(s)-len(p):] == p:
            s = s[:len(s)-len(p)]
            flg = False
            break
    if flg:
         print('NO')
         quit()
    if len(s) == 0:
        break
print('YES')

Buggy submission (verdict: Runtime Error):
S = input()
P = ['dream', 'dreamer', 'erase', 'eraser']

def makeS(T, flg):
    if len(T) > len(S):
        return 0
    
    for p in P:
        T += p
        if T == S:
            return 1
        else:
            flg += makeS(T, flg)
            T = T[:len(T)-len(p)]
    return flg

if makeS('', 0):
    print('YES')
else:
    print('NO')
Problem p03861 (python)

Fixed submission:
a, b, x = map(int, input().split())
print(b//x-(a-1)//x)

Buggy submission (verdict: Runtime Error):
9 9 2
Problem p03997 (python)

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

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

Fixed submission:
a = int(input())
b = a // 1000
c = (a - 1000 * b) // 100
d = a % 100 // 10
e=a%10
if ( b == c and c==d ):
        print('Yes')
elif(c==d and d==e):
        print('Yes')
else:
        print('No')

Buggy submission (verdict: Runtime Error):
while(True):
    a = int(input())
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10
    e=a%10
    if ( b == c and c==d ):
        print('Yes')
    elif(c==d and d==e):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
while(True):
    a = int(input())
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10
    e=a%10
    if (d == b == c or c==d==e):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
while(True):
    a = int(input())
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10

    if (d == b == c):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
while(True):
    a = int(input("Enter a number"))
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10

    if (d == b == c):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
while(True):
    a = int(input("Enter a number"))
    b = a // 1000
    c = (a - 1000 * b) // 100
    d = a % 100 // 10

    if (d == b == c):
        print('Yes')
    else:
        print('No')
Problem p02923 (python)

Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
count=0
flag=0
b=[]
maxi=0
for i in range(len(a)-1):
  if(a[i]>=a[i+1] and flag==0):
      count=1
      flag=1
      
  elif(a[i]>=a[i+1] and flag==1):
    count+=1
    if(maxi<count):
        maxi=count
        
  else:
    count=0
    flag=0
      
print(maxi)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
count=0
flag=0
b=[]
for i in range(len(a)-1):
  if(a[i]<=a[i+1]):
    flag=1
    count+=1
  else:
    flag=0
    b.append(count)
    count=0
print(max(b))
Problem p03086 (python)

Fixed submission:
S=input()
m=0
count=0
for s in S:
    if(s=="A" or s=="C" or s=="G" or s=="T"):count+=1
    else:count=0
    m=max(m,count)
print(m)

Buggy submission (verdict: Runtime Error):
S=input()
m=0
count=0
for s in S:
    if(s=="A" OR s=="C" OR s=="G" OR s=="T"):count+=1
    else:count=0
    m=max(m,count)
print(m)

Buggy submission (verdict: Runtime Error):
S=input()
m=0
count=0
for s in S:
    if(s=="A" OR s=="C" OR s=="G" or s=="T"):count+=1
    else:count=0
    m=max(m,count)
print(m)
Problem p03146 (python)

Fixed submission:
s=[int(input())]
while len(s)==len(set(s)):
  if(s[-1]%2==0):
    s.append(s[-1]//2)
  else:
    s.append(3*s[-1]+1)
print(len(s))

Buggy submission (verdict: Runtime Error):
a=input()
cnt=1
while a!=1
  if(a%2==0):
    a//=2
    cnt+=1
  else:
    a=3a+1
    cnt+=1
print(cnt=+3)
Problem p03399 (python)

Fixed submission:
a=list(int(input()) for _ in range(4))
print(min([a[0]+a[2],a[1]+a[2],a[0]+a[3],a[1]+a[3]]))

Buggy submission (verdict: Runtime Error):
*a=list(map(int, input());
print(a)
Problem p03672 (python)

Fixed submission:
s=input()
l=len(s)
for _ in range(l):
  s=s[:-1]
  if(len(s)%2==1):
    continue
  if(s[:len(s)//2]*2==s):
    print(len(s))
    break

Buggy submission (verdict: Runtime Error):
s=input()
l=len(s)
for _ in range(l)
  s.pop(l-1)
  if(s[:l//2]*2==s)
  print(l)
Problem p03680 (python)

Fixed submission:
n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[a]-1
  if a==1:
    print(x+1)
    break
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
l=[int(input()) for _ in range(int(input()))]
x=l[0]
cnt=1
while l[x]!=2:
  if(l[x]==0 or len(l)==cnt):
    print(-1)
    exit()
  index=l[x]
  l[x]=0
  x=int(index-1)
  cnt+=1
print(cnt)
Problem p03738 (python)

Fixed submission:
a,b=map(int, open(0))
print('GREATER' if(a>b) else 'LESS' if(b>a) else 'EQUAL')

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
print('GREATER' if(a>b) else 'LESS' if(b<a) else 'EQUAL')
Problem p04044 (python)

Fixed submission:
n=int(input().split()[0])
print(''.join(sorted([input()for _ in[0]*n])))

Buggy submission (verdict: Runtime Error):
n=int(input().split()[0])
print(join(sorted([input()for _ in[0]*n])))
Problem p02917 (python)

Fixed submission:
n=int(input())
b=[int(x) for x in input().split()]
a=[0]*n
for i in range(n-1):
	if(i==0):
		a[0]=b[0]
		a[1]=b[0]
	else:	
		if(b[i]>=b[i-1]):
			a[i+1]=b[i]
		if(b[i]<b[i-1]):		
			a[i]=b[i]
			a[i+1]=b[i]
print(sum(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
b=[int(x) for x in input().split()]
a=[0]*n
for i in range(n-1):
	if(i==0):
		a[0]=b[0]
		a[1]=b[1]
    else:    
      if(b[i]>=b[i-1]):
          a[i+1]=b[i]
      if(b[i]<b[i-1]):		
          a[i]=b[i]
          a[i+1]=b[i]
print(sum(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
b=[int(x) for x in input().split()]
a=[0]*n
for i in range(n-1):
	if(i==0):
		a[0]=b[0]
		a[1]=b[1]
	elif(b[i]>=b[i-1]):
		a[i+1]=b[i]
	elif(b[i]<b[i-1]):		
		a[i]=b[i]
		a[i+1]=b[i]
print(sum(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
b=[int(x) for x in input().split()]
a=[0]*n
for i in range(n-1):
	if(i==0):
		a[0]=b[0]
		a[1]=b[1]
	if(b[i]>=b[i-1]):
		a[i+1]=b[i]
	if(b[i]<b[i-1]):		
		a[i]=b[i]
		a[i+1]=b[i]
print(sum(a))
Problem p02934 (python)

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

inv_sum = 0
for a in A:
    inv_sum += 1 / a

print(1 / inv_sum)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = np.array(list(map(int, input().split(' '))))

A_inv = 1 / A
print(1 / np.sum(A_inv))
Problem p02917 (python)

Fixed submission:
N = int(input())
B = list(map(int, input().split()))
sum = 0
 
for i in range(1,N-1):
  sum += min(B[i], B[i-1])
print(sum + B[N-2] + B[0])

Buggy submission (verdict: Runtime Error):
N = input(int(N))
B = list(map(int, input().split()))
sum = B[0]

for i in range(1,N-1):
  sum += max(B[i-1], B[i])
print(sum)

Buggy submission (verdict: Runtime Error):
N = input(int(N))
B = list(map(int, input().split()))
sum = B[0]

for i in range(1,N):
  sum += max(B[i-1], B[i])
print(sum)
Problem p02921 (python)

Fixed submission:
S = input()
C = input()
cnt = 0
 
for i in range(3):
  if S[i] == C[i]:
  	cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
S = input()
C = input()
cnt = 0

for i in range(3):
  if S[i] == C[i]
  cnt++
print(cnt)
Problem p02923 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split())).reverse()
max = 0
cnt = 0

for i in range(N):
  if H[i] <= H[i+1]:
    cnt += 1
  elif cnt > max:
    max = cnt
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] <= H[now+1]:
      now += 1
      cnt += 1
      if now > N-1:
        break
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] <= H[now-1]:
      now -= 1
      cnt += 1
      if now < 0:
        break
    if max < cnt:
      max = cnt
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] <= H[now+1]:
      now += 1
      cnt += 1
      if now < 0:
        break
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] <= H[now-1]:
      now -= 1
      cnt += 1
      if now > N-1:
        break
    if max < cnt:
      max = cnt
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] <= H[now+1]:
      now += 1
      cnt += 1
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] <= H[now-1]:
      now -= 1
      cnt += 1
    if max < cnt:
      max = cnt
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] < H[now+1]:
      now += 1
      cnt += 1
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] < H[now-1]:
      now -= 1
      cnt += 1
    if max < cnt:
      max = cnt
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
max = 0

for i in range(N):
  cnt = 0
  if i != N-1:
    now = i
    while H[now] < H[now+1]:
      now += 1
      cnt += 1
    if max < cnt:
      max = cnt
  cnt = 0
  if i != 0:
    now = i
    while H[now] < H[now-1]:
      now -= 1
      cnt += 1
    if max < cnt:
      max = cnt
print(max)
Problem p02921 (python)

Fixed submission:
forcast = input()
reality = input()

count = 0
for f, r in zip(forcast, reality):
  if f == r:
    count = count+1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
print( int( n * (n+1)/2 - n) )
Problem p02923 (python)

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

count, ans = 0, 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count = count + 1
    ans = max(count, ans)
  else:
    count = 0
print(ans)

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

count, ans = 0, 0
for i in range(n):
  if h[i] >= h[i+1]:
    count = count + 1
  else:
    ans = max(count, ans)
    count = 0
print(ans)
Problem p02924 (python)

Fixed submission:
n = int(input())
print( ((n * (n+1))//2) - n )

Buggy submission (verdict: Runtime Error):
n = int(input())
return sum(range(n))
Problem p03067 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(input())
S=str(input())
m=1000
for  i in range(N):
  a=S[:i].count("#")
  b=S[i:].count(".")
  c=a+b
  if m>=c:
    m=c
print(m)
Problem p03068 (python)

Fixed submission:
N=int(input())
S=str(input())
n=int(input())
d=S[n-1]
a=""
for i in S:
    if i!=d:
        a+="*"
    elif i==d:
        a+=i
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=str(input())
n=int(input())
d=S[n]
a=""
for i in S:
    if i!=d:
        a+="*"
    elif i==d:
        a+=i
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=str(input())
n=int(input())
d=S[n]
a=""
for i in S:
    if i!=d:
        a+="*"
    elif i==d:
        a+=i
print(a)
Problem p03102 (python)

Fixed submission:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
X=0
for i in range(N):
  A=list(map(int,input().split()))
  Y=0
  for i in range(M):
    Y+=A[i]*B[i]
  Y=Y+C
  if Y>0:
    X+=1
  else:
    pass
print(X)

Buggy submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
X=0
Y=0
for i in range(N):
  A=list(map(int,input().split()))
  for i in range(N):
    Y+=A[i]*B[i]
  Y=Y+C
  if Y>0:
    X+=1
print(X)
Problem p03106 (python)

Fixed submission:
a, b, k = map(int, input().split())
a, b = max(a,b), min(a,b)
c = []
for i in range(1, b+1):
    if (a % i == 0) & (b % i == 0):
        c.append(i)
print(c[-k])

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
a, b = max(a,b), min(a,b)
c = []
for i in range(1, b+1):
    if (a % i == 0) & (b % i == 0):
        c.append(i)
print(c[k])
Problem p03502 (python)

Fixed submission:
N = str(input())
SUM = 0
for i in N:
    SUM += int(i)
print('Yes') if int(N) % SUM == 0 else print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
n=len(str(N))
ans=0
for i in range(n):
  b=10**(n-i)
  a=N//b
  ans+=a
if 12%ans==0:
  print("Yes")
else:
  print("No")
Problem p03719 (python)

Fixed submission:
A,B,C=map(int, input().split())
if A<=C and C<=B:
  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)
else:
  print(No)

Buggy submission (verdict: Runtime Error):
A,B,C=map(int, input().split())
if A<C and C<B:
  print(Yes)
else:
  print(No)
Problem p03861 (python)

Fixed submission:
a, b, x = [int(x) for x in input().split()]
print((b//x)-((a-1)//x))

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
c=0
for i in range(a,b+1):
  if x%i==0:
    c+=1
print(a)
Problem p04030 (python)

Fixed submission:
A=str(input())
A=list(A)
B=[]
for i in A:
  if i=="0":
    B.append("0")
  elif i=="1":
    B.append("1")
  elif i=="B":
    B=B[:-1]
print(''.join(B))

Buggy submission (verdict: Runtime Error):
A=str(input())
A=list(A)
B=[]
for i in A:
  if i=="0":
    B.append("0")
  elif i=="1":
    B.append("1")
  elif i=="B":
    B.pop(-1)
print(''.join(B))
Problem p02993 (python)

Fixed submission:
S=input()
a = [int(c) for c in S]

if (a[0]-a[1]) * (a[1]-a[2]) * (a[2] - a[3]) ==0:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
S=input()
a = [int(c) for c in s]

if (a[0]-a[1]) * (a[1]-a[2]) * (a[2] - a[3]) ==0:
    print('Bad')
else:
    print('Good')
Problem p03060 (python)

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

sum = 0

for i in range(N):
  if int(a[i]) > int(b[i]):
    sum += int(a[i]) -int(b[i])

print(sum)

Buggy submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]
b = [input() for i in range(N)]

sum = 0

for i in range(N):
  if a[i] > b[i]:
    sum += a[i] -b[i]

print(sum)
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
print(sum(s[i] == t[i] for i in range(3)))

Buggy submission (verdict: Runtime Error):
s = list(input())
t = list(input())
print(sum[s[i] == t[i] for i in range(3)])

Buggy submission (verdict: Runtime Error):
s = input().split()
t = input().split()
print(sum[s[i] == t[i] for i in range(3)])

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
print(sum[s[i] == t[i] for i in range(3)])

Buggy submission (verdict: Runtime Error):
s, t = input()
print(sum(s[i] == t[i] for i in range(3)))

Buggy submission (verdict: Runtime Error):
s, t = input()
print(sum(i == j for i, j in zip(s, t)))
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 = input()
b = input()
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())
if (a + b) % 2 == 0:
  print((a + b) / 2)
else:
  print('IMPOSSIBLE')
Problem p02993 (python)

Fixed submission:
a, b, c, d = map(int, list(input()))
if (a + b) / 2 == a:
  print('Bad')
elif (b + c) / 2 == b:
  print('Bad')
elif (c + d) / 2 == c:
  print('Bad')
else:
  print('Good')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if (a + b) / 2 == a:
  print('Bad')
elif (b + c) / 2 == b:
  print('Bad')
elif (c + d) / 2 == c:
  print('Bad')
else:
  print('Good')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if (a + b) // 2 == a:
  print('Bad')
elif (b + c) // 2 == b:
  print('Bad')
elif (c + d) // 2 == c:
  print('Bad')
else:
  print('Good')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if (a + b) // 2 == a;
  print('Bad')
elif (b + c) // 2 == b;
  print('Bad')
elif (c + d) // 2 == c;
  print('Bad')
else;
  print('Good')
Problem p02999 (python)

Fixed submission:
x, a = map(int, input().split())
print(int('100'[x < a::2]))

Buggy submission (verdict: Runtime Error):
x, a = list(input())
print('100'[x >= a::2])

Buggy submission (verdict: Runtime Error):
x, a = list(input())
print('100'[if x >= a::2])