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

Fixed submission:
n = input()
dic = 'abcdefghijklmnopqrstuvwxyz'
for i in range(26):
  if n.count(str(dic[i]))%2!=0:
    print("No")
    exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
n = input()
dic = [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(26):
  if n.count(str(dic[i]))%2!=0:
    print("No")
    exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
n = input()
dic = [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(26):
  if n.count(dic[i])%2!=0:
    print("No")
    exit()
print("Yes")
Problem p04030 (python)

Fixed submission:
n = input()
a = ""
for i in n:
  if i =="0":
    a+=i
  elif i =="1":
    a+=i
  elif i =="B":
    a = a[:-1]
print(a)

Buggy submission (verdict: Runtime Error):
n = input()
a = ""
for i in range(n):
  if i =="0":
    a+=i
  elif i =="1":
    a+=i
  elif i =="B":
    a = a[:-1]
print(a)

Buggy submission (verdict: Runtime Error):
n = input()
a = []
for i in range(n):
  if i =="0":
    a.append("0")
  elif i =="1":
    a.append("1")
  elif i =="B":
    a.pop()
print(*a)

Buggy submission (verdict: Runtime Error):
n = input()
a = ""
for i in range(n):
  if i =="0":
    a.append(0)
  elif i =="1":
    a.append(1)
  elif i =="B":
    a.pop()
print(a)
Problem p03997 (python)

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

print(int((A+B)*C/2))

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
print((A+B)*C)
Problem p03061 (python)

Fixed submission:
import fractions as f

N = int(input())

A = list(map(int,input().split()))

rightGCD = [0]*N
leftGCD = [0]*N

for i in range(N-1):
    leftGCD[i+1] = f.gcd(leftGCD[i],A[i])
    rightGCD[-i-2] = f.gcd(rightGCD[-i-1],A[-i-1])

#print(leftGCD)
#print(rightGCD)

ans = 0

for i in range(N):
    ans = max(ans,f.gcd(rightGCD[i],leftGCD[i]))

print(ans)

Buggy submission (verdict: Runtime Error):
import fractions as f

N = int(input())

A = list(map(int,input().split()))

rightGCD = []
leftGCD = []

rightGCD.append(0)
rightGCD.append(A[0])
tmp = A[0]
for x in A[2:]:
    tmp = f.gcd(tmp,x)
    rightGCD.append(tmp)

leftGCD.insert(0,0)
leftGCD.insert(0,A[-1])
tmp = A[-1]
for x in A[1:N-3:-1]:
    tmp = f.gcd(tmp,x)
    leftGCD.insert(0,tmp)

ans = 0

for i in range(N):
    if i==0:
        ans = max(ans,leftGCD[i])
        continue
    if i==N-1:
        ans = max(ans,rightGCD[i])
        continue

    ans = max(ans,f.gcd(rightGCD[i],leftGCD[i]))

#print(leftGCD)
#print(rightGCD)
print(ans)
Problem p03071 (python)

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

if a==b : 
  print(a*2)
else :
  print(max(a,b)*2-1)

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

if a==b : 
  print(a*2)
else :
  print(max(a,b)*2-1)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())

if a==b : 
  print(a*2)
else :
  print(max(a,b)*2-1)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())

if a==b : 
    print(a*2)
else :
    print(max(a,b)*2-1)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())

if a==b : 
  print(a*2)
else :
  print(max(a,b)*2-1)
Problem p02801 (python)

Fixed submission:
V=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','y','z']
ch = input()
for i in range(25):
  if(ch==V[i]):
    print(V[i+1])

Buggy submission (verdict: Runtime Error):
V=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','y','z']
ch = input()
for i in range(26):
  if(ch==V[i]):
    print(V[i+1])
Problem p02922 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input)
print(-((-b+1)//(a-1)))
Problem p02765 (python)

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

if N >= 10:
  print(R)
else:
  print(R + 100*(10-N))

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

if N => 10
print(R)
else
print(R - 100*(10-N))
Problem p02767 (python)

Fixed submission:
N = int(input())
X=list(map(int, input().split())) 
X_max = max(X)
X_min = min(X)
 
answerlist = []
for i in range(X_min,X_max+1):
  newX = [(n-i)**2 for n in X]
  total = sum(newX)
  answerlist.append(total)
  
print(min(answerlist))

Buggy submission (verdict: Runtime Error):
N = int(input())
X=list(map(int, input().split())) 
print(X)
X_max = max(X)
X_min = min(X)

answerlist = []
for i in range(X_min,X_max):
  newX = [(n-i)**2 for n in X]
  print(newX)
  total = sum(newX)
  answerlist.append(total)
  
print(min(answerlist))

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

X_max = max(X)
X_min = min(X)

answerlist = []
for x in range(X_min,X_max):
  newX = [(n-x)^2 for n in X]
  sum = sum(str(newX))
  answerlist.append(sum)
  
print(max(answerlist))

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

X_max = max(X)
X_min = min(X)

answerlist = []
for x in range(X_min,X_max):
  newX = [(n-x)^2 for n in X]
  sum = sum(newX)
  answerlist.append(sum)
  
print(max(answerlist))
Problem p02772 (python)

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

flag = 0

for i in li:
  if i%2 ==0:
    if i%3 != 0 and i%5 != 0:
      print('DENIED')
      flag = 1
      break
    else:
      continue
      
if flag == 0:
  print('APPROVED')

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

flag = 0

for i in li:
  if i%2 ==0:
    if i%3 != 0 and i%5 != 0:
      print('DENIED')
      flag = 1
      break
    else:
      continue
      
if flag = 0:
  print('APPROVED')

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

for i in li:
  if i%2 ==0:
    if i%3 == 0 or i%5 == 0:
    else:
      print('DENIED')
      break
  print('APPROVED')

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

for i in li:
  if i%2 ==0:
    if i%3 == 0 or i%5 == 0:
    else:
      print('DENIED')
      break

print('APPROVED')
Problem p02817 (python)

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

print(t+s)

Buggy submission (verdict: Runtime Error):
s,t = map(int, input().split())

print(t+s)
Problem p03076 (python)

Fixed submission:
def abc(n):
    if n % 10 == 0:
        return n
    else:
        return n + 10 - (n%10)

ans = 0
mods = []

for _ in range(5):
    tmp = int(input())
    ans += abc(tmp)
    mods.append(tmp%10)

if not set(mods) == {0}:
    while 0 in mods:
        mods.remove(0)
    ans -= 10
    ans += min(mods)

print(ans)

Buggy submission (verdict: Runtime Error):
def abc(n):
    if n % 10 == 0:
        return n
    else:
        return n + 10 - (n%10)

ans = 0
mods = []

for _ in range(5):
    tmp = int(input())
    ans += abc(tmp)
    if tmp%10 != 0:
        mods.append(tmp%10)

ans -= 10
ans += min(mods)
print(ans)
Problem p03147 (python)

Fixed submission:
N = int(input())

h = list(map(int,input().split()))

ans = 0
minh = min(h)
ans += min(h)

h = list(map(lambda x: x-minh, h))

if set(h) == {0}:
    print(ans)

else:
    while True:
        rightflag = False

        for i in range(N):
            if h[i] == 0:
                continue
            else:
                left = i
                break

        for j in range(left,N):
            if h[j] != 0:
                continue
            else:
                right = j-1
                rightflag = True
                break

        if not rightflag:
            right = N-1

        # print(left,right)

        tmp = min(h[left:right+1])
        ans += tmp

        for pos in range(left,right+1):
            h[pos] -= tmp

        # print(h)
        if set(h) == {0}:
            break

    print(ans)

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

h = list(map(int,input().split()))

ans = 0
minh = min(h)
ans += min(h)

h = list(map(lambda x: x-minh, h))

while True:
    rightflag = False

    for i in range(N):
        if h[i] == 0:
            continue
        else:
            left = i
            break

    for j in range(left,N):
        if h[j] != 0:
            continue
        else:
            right = j-1
            rightflag = True
            break

    if not rightflag:
        right = N-1

    # print(left,right)

    tmp = min(h[left:right+1])
    ans += tmp

    for pos in range(left,right+1):
        h[pos] -= tmp

    # print(h)
    if set(h) == {0}:
        break

print(ans)
Problem p03214 (python)

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

a = list(map(lambda x: int(abs(N*x-sum(a))), a))

print(a.index(min(a)))

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

mean = sum(a)/N

a = map(lambda x: abs(x-mean), a)

print(min(a).index)
Problem p03220 (python)

Fixed submission:
N = int(input())
T,A = map(int, input().split())
H = [int(i) for i in input().split()]

dif = float("inf")

for i in range(N):
    temp = T - H[i] * 0.006
    dif2 = abs(A-temp)
    if dif2 < dif:
        dif = dif2
        ans = i

print(ans+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
T,A = map(int, input().split())
H = [int(i) for i in input().split]

dif = float("inf")

for i in range(N):
    temp = T - H[i] * 0.006
    dif2 = abs(A-temp)
    if dif2 < dif:
        dif = dif2
        ans = i

print(ans)
Problem p03266 (python)

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

# N, K = 3, 2

if K % 2 != 0:
    ans = (N // K)**3
else:
    full = []
    half = []
    for i in range(int(K/2), N+1, int(K/2)):
        if i % K == 0:
            full.append(i)
        else:
            half.append(i)

    ans = len(half) ** 3 + len(full) ** 3

print(ans)

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

# N, K = 3, 2

if K % 2 != 0:
    ans = (N // K)**3
else:
    full = []
    half = []
    for i in range(int(K/2), N+1, int(K/2)):
        if i % K == 0:
            full.append(i)
        else:
            half.append(i)

    ans += len(half) ** 3 + len(full) ** 3

print(ans)

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

if K % 2 != 0:
    ans = (N // K)**3
else:
    full = []
    for i in range(K, N, K):
        full.append(i)
        ans = len(full) ** 3

    half = []
    for i in range(int(K/2), N, int(K/2)):
        half.append(i)
        half = list(set(half) - set(full))
        ans += len(half) ** 3

print(ans)
Problem p03282 (python)

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

# S = "111111111"
# K = 6565

ans = 1
ones = -1

for i in range(len(S)):
    if int(S[i]) == 1:
        pass
    else:
        ans = int(S[i])
        ones = i
        break

if ones == -1:
    ones = len(S) + 1

if K <= ones:
    ans = 1

print(ans)

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

ans = 1

for i in range(len(S)):
    if int(S[i]) == 1:
        pass
    else:
        ans = int(S[i])
        ones = i
        break

if not ones:
    ones = len(S) + 1
elif K <= ones:
    ans = 1

print(ans)

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

# S = "9999"
# K = 1

ans = 1

for i in range(len(S)):
    if int(S[i]) == 1:
        pass
    else:
        ans = int(S[i])
        ones = i
        break

if not ones:
    ans = 1
elif K <= ones:
    ans = 1

print(ans)

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

# S = "11132"
# K = 2

ans = 1

for i in range(len(S)):
    if int(S[i]) == 1:
        pass
    else:
        ans = int(S[i])
        ones = i
        break

if K <= ones:
    ans = 1

print(ans)

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

ans = 1

for i in range(K):
    if S[i] == 1:
        pass
    else:
        ans = S[i]

print(ans)
Problem p03289 (python)

Fixed submission:
import sys
S = list(input())
# S = "Atcoder"
# S = list(S)

if S[0] != "A":
    print("WA")
    sys.exit()
elif S[1].isupper():
    print("WA")
    sys.exit()
elif S[-1].isupper():
    print("WA")
    sys.exit()
elif "C" in S[2:-1]:
    S.remove("C")
    del S[0]
    S = str(S)
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
import sys
S = list(input())
# S = "Atcoder"
# S = list(S)

if S[0] != "A":
    print("WA")
    sys.exit()
elif S[1].isupper():
    print("WA")
    sys.exit()
elif S[-1].isupper():
    print("WA")
    sys.exit()
elif "C" in S[2:-1]:
    S.remove("C")
    S.remove(0)
    S = str(S)
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
import sys
S = input()

if S[0] != "A":
    print("WA")
    sys.exit()

SS = S[2:-2]
if "C" in SS:
    SS.pop("C")
    if SS.islower():
        print("AC")
    else:
        print("WA")

else:
    print("WA")
Problem p03292 (python)

Fixed submission:
A = [int(i) for i in input().split()]

ans = 0

A.sort()

for i in range(len(A)-1):
    ans += A[i+1] - A[i]

print(ans)

Buggy submission (verdict: Runtime Error):
A = [int(i) for i in input().split()]

print(A(max)-A(min))
Problem p03303 (python)

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

SS = S[::w]
print(SS)

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

Ans = []
for i in range((len(S) // w) + 1):
    Ans.append(S[int(i*w)])

print("".join(Ans))
Problem p03324 (python)

Fixed submission:
D, N = (int(i) for i in input().split())
# D = 2
# N = 100

if N != 100:
    if D == 0:
        print(int(1*N))
    elif D == 1:
        print(int(100*N))
    elif D == 2:
        print(int(10000 * N))

else:
    if D == 0:
        print(101)
    elif D == 1:
        print(10100)
    elif D == 2:
        print(1010000)

Buggy submission (verdict: Runtime Error):
D, N = (int(i) for i in input().split())
if D == 0:
    print(int(1*N)
elif D == 1:
    print(int(100*N)
elif D == 2:
    print(int(10000 * N)
Problem p03328 (python)

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

A = [1]
for i in range(2,1000):
    tmp = A[-1] + i
    A.append(tmp)

dif = b-a
pos = dif - 2

print(A[pos] - a)

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

A = [1]
for i in range(2,11):
    tmp = A[-1] + i
    A.append(tmp)

dif = b-a
pos = dif - 2

print(A[pos] - a)
Problem p03337 (python)

Fixed submission:
A, B = (int(i) for i in input().split())
print(max(A + B, A - B, A * B))

Buggy submission (verdict: Runtime Error):
A,B = (int(i) for i in input().split())  
A = l[0]
B = l[1]
print(max(A + B, A - B, A * B))

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
A = l[0]
B = l[1]
print(max(A + B,A - B,A * B))

Buggy submission (verdict: Runtime Error):
A,B = map(int, raw_input().split())
A = l[0]
B = l[1]
print(max(A + B,A - B,A * B))

Buggy submission (verdict: Runtime Error):
l = map(int, raw_input().split())
A = l[0]
B = l[1]
print(max(A + B,A - B,A * B))
Problem p03400 (python)

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

A = []
for _ in range(N):
    A.append(int(input()))

ans = X

for i in range(1, D+1):
    for j in A:
        if j == 1:
            ans += 1
        elif i % j == 1:
            ans += 1

print(ans)

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

A = []
for _ in range(N):
    A.append(int(input()))

ans = X

for i in range(1, D+1):
    for j in A:
        if j == 1:
            ans += 1
        eliaf i % j == 1:
            ans += 1

print(ans)

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

A = []
for _ in range(N):
    A.append(int(input().split()))

ans = X

for i in range(1, D+1):
    for j in A:
        if i % j == 1:
            ans += 1

print(ans)
Problem p03408 (python)

Fixed submission:
N = int(input())
s = []
for _ in range(N):
    s.append(input())

M = int(input())
t = []
for _ in range(M):
    t.append(input())

sets = set(s)

ans = [0]
for word in sets:
    tmp = 0
    tmp += s.count(word)
    tmp -= t.count(word)
    ans.append(tmp)

print(max(ans))

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

s = []
t = []
for _ in range(N):
    s.append(input())

for _ in range(N):
    t.append(input())

sets = set(s)

ans = []
for word in sets:
    tmp = 0
    tmp += s.count(word)
    tmp -= t.count(word)
    ans.append(tmp)

print(max(ans))

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

s = []
t = []
for _ in range(N):
    s.append(input())

for _ in range(N):
    t.append(input())

sets = set(s)

ans = []
for word in sets:
    tmp += s.count(word)
    tmp -= t.count(word)
    ans.append(tmp)

print(min(ans))
Problem p03424 (python)

Fixed submission:
N = int(input())
S = [i for i in input().split()]

if "Y" in S:
    print("Four")
else:
    print("Three")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [int(i) for i in input().split()]

if "Y" in S:
    print("Four")
else:
    print("Three")

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

if "Y" in S:
    print("Four")
else:
    print("Three")
Problem p03477 (python)

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

if A + B > C + D:
    print("Left")
elif A + B == C + D:
    print("Balanced")
else:
    print("Right")

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

if A + B > C + D:
    print("Left")
elif A + B == C + D:
    print("Balanced")
else:
    print("Right")
Problem p03501 (python)

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

print(min(A*N,B))

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

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

Fixed submission:
N = input()
Nint = int(N)
fN = 0

for i in range(len(N)):
    fN += int(N[i])

if Nint % fN == 0:
    print("Yes")
else:
    print("No")

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

for i in range(len(N)):
    fN += int(N[i])

if Nint % fN == 0:
    print("Yes")
else:
    print("No")
Problem p03658 (python)

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

l.sort(reverse=True)

print(sum(l[:K]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
l = []
for i in range(N):
    l.append(int(input()))

l.sort(reverse=True)

print(sum(l[:K]))
Problem p03737 (python)

Fixed submission:
A, B, C = (i for i in input().split())

a = A[0]
b = B[0]
c = C[0]
ans = a+b+c
ANS = ans.upper()
print(ANS)

Buggy submission (verdict: Runtime Error):
A, B, C = (str(i).upper for i in input().split())

ans = A[0]+B[0]+C[0]
# ANS = ans.upper()
print(ans)

Buggy submission (verdict: Runtime Error):
A, B, C = (i.upper for i in input().split())

ans = A[0]+B[0]+C[0]
# ANS = ans.upper()
print(ans)
Problem p03760 (python)

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

ans = []
while True:
    if O == []:
        break
    ans.append(O.pop(0))
    if E == []:
        break
    ans.append(E.pop(0))

print("".join(ans))

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

ans = []
while True:
    if O == []:
        break
    ans.append(O.pop(0))
    if E == []:
        break
    ans.append(E.pop(0))

print("".join(ans))
Problem p03777 (python)

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

ans = 1

if a == "D":
    ans *= -1
if b == "D":
    ans *= -1

if ans == 1:
    print("H")
else:
    print("D")

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

ans = 1

if a == "D":
    ans *= -1
if b == "D":
    ans *= -1

if ans = 1:
    print("H")
else:
    print("D")
Problem p03796 (python)

Fixed submission:
N = int(input())

power = 1
for i in range(1,N+1):
    power *= i
    power %= 10**9 + 7

print(power)

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

power = 1
for i in range(1,N+1):
    power *= i
    power %= (10**9 + 7)

print(ans)
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
r = int(input())
print(3 * a ** 2)
Problem p02981 (python)

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

print(min(n*a, b))

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

r = min(r, l = 4038);
ans = 2018
for i in range(l, r + 1):
    for j in range(i + 1, r + 1):
        x = i * j % 2019
        ans = min(ans, x)

print(ans)
Problem p03086 (python)

Fixed submission:
# AtCorder

s = input()

a = "ACGT"
v = 0
ans = 0

for i in s:
    if i in a:
        v += 1
        ans = max(ans, v)
    else:
        v = 0

print(ans)

Buggy submission (verdict: Runtime Error):
# AtCorder

s = input() + ""

a = "ACGT"
v = 0
ans = []

for i in s:
    if i in a:
        v += 1
    else:
        if v != 1:
            ans.append(v)
        v = 0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# AtCorder

s = input()

a = "ACGT"
v = 0
ans = []

for i in s:
    if i in a:
        v += 1
    else:
        if v != 1:
            ans.append(v)
        v = 0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# AtCorder

s = input()

a = ["A","C","G","T"]
ans = []
v = 0
for i in s:
    if i in a:
        v += 1
    else:
        if v != 1:
            ans.append(v)
        v = 0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# AtCorder

s = input()

a = ["A","C","G","T"]
ans = []
v = 0
for i in s:
    if i in a:
        v += 1
    else:
        ans.append(v)
        v = 0

print(max(ans))
Problem p03369 (python)

Fixed submission:
S = input()
price = 700 + sum(100 if c == 'o' else 0 for c in S)
print(price)

Buggy submission (verdict: Runtime Error):
S = raw_input()
price = 700 + sum(100 if c == 'o' else 0 for c in S)
print(price)
Problem p03385 (python)

Fixed submission:
# PROBLEM A
s = input()
letters = set(s)
perm_abc = len(letters) == 3 and all(c in letters for c in 'abc')
if perm_abc:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
# PROBLEM A
s = input()
letters = set(s)
perm_abc = len(letters) == 3 and all(c in letters for c in 'abc')
if perm_abc:
    print 'Yes'
else:
    print 'No'
Problem p03399 (python)

Fixed submission:
# PROBLEM A
a, b, c, d = [int(input()) for _ in range(4)]
sol = min(a, b) + min(c, d)
print(sol)

Buggy submission (verdict: Runtime Error):
# PROBLEM A
a, b, c, d = [int(v) for v in input().split()]
sol = max(a, b) + max(c, d)
print(sol)
Problem p02830 (python)

Fixed submission:
n = int(input())
s, t = input().split()

ans = ''
i = 0
flag = True

while i < n:
  if flag:
    ans += s[i]
  else:
    ans += t[i]
    i += 1
  flag = not flag
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s, t = input().split()
 
ans = ''
i = j = 0
flag = True
while j < N:
    if flag:
	    ans += s[i]
        i += 1
    else:
        ans += t[j]
        j += 1
    flag = not flag

Buggy submission (verdict: Runtime Error):
N = int(input())
s, t = input().split()
 
ans = ''
i = j = 0
flag = True
while j < N:
	if flag:
		ans += s[i]
      	i += 1
	else:
    	ans += t[j]
    	j += 1
  
	flag = not flag
else:
	print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s, t = input().split()

ans = ''
i = j = 0
flag = True
while j < N:
  if flag:
	  ans += s[i]
      i += 1
  else:
      ans += t[j]
      j += 1
  
  flag = not flag