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

Fixed submission:
A,B,C= map(int, input().split())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)
Problem p03086 (python)

Fixed submission:
s = input()
tgt = ['A', 'C', 'G', 'T']

lst = []
cnt = 0

for x in s:
  if x in tgt:
    cnt = cnt +1
  else:
    lst.append(cnt)
    cnt = 0
    
lst.append(cnt)

print(max(lst))

Buggy submission (verdict: Runtime Error):
s = input()
tgt = ['A', 'C', 'G', 'T']

lst = []
cnt = 0

for x in s:
  if x in tgt:
    cnt = cnt +1
  else:
    lst.append(cnt)
    cnt = 0

print(max(lst)

Buggy submission (verdict: Runtime Error):
s = input()
tgt = ['A', 'C', 'G', 'T', ]

lst = []
cnt = 0

for x in s:
  if x in tgt:
    cnt = cnt +1
  else:
    lst.append(cnt)
    cnt = 0

print(max(lst))
Problem p03086 (python)

Fixed submission:
def main():
    *S, = input()
    count = 0
    maximum = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if maximum < count:
                maximum = count
            count = 0
    print(max(count, maximum))
main()

Buggy submission (verdict: Runtime Error):
def main():
    *S, = input()
    count = 0
    max = 0
    for i in S:
        if i == "A" or i == "C" or i == "G" or i == "T":
            count += 1
        else:
            if max < count:
                max = count
            count = 0
    print(max(count, max))
main()
Problem p03106 (python)

Fixed submission:
def main():
    A, B, K = map(int, input().split())
    CDD = []
    maxi = max(A,B)
    mini = min(A,B)
    for i in reversed(range(1, mini + 1)):
        if mini % i == 0:
            if maxi % i == 0:
                CDD.append(i)
    print(CDD[K - 1])
main()

Buggy submission (verdict: Runtime Error):
def main():
    A, B, K = map(int, input().split())
    CDD = []
    maxi = max(A,B)
    mini = min(A,B)
    for i in range(1, mini + 1):
        if mini % i == 0:
            if maxi % i == 0:
                CDD.append(i)
    print(CDD)
    print(CDD[-K:-K + 1][0])
main()
Problem p03126 (python)

Fixed submission:
K = [None]*30
A = [None]*30
Ms = [0]*31
def main():
    N, M = map(int, input().split())
    for i in range(N):
        K[i], *A[i], = map(int, input().split())
    for i in A:
        if i == None:
            break
        for j in i:
            Ms[j] += 1
    print(Ms.count(N))

main()

Buggy submission (verdict: Runtime Error):
K = [None]*30
A = [None]*30
Ms = [0]*30
def main():
    N, M = map(int, input().split())
    for i in range(N):
        K[i], *A[i], = map(int, input().split())
    for i in A:
        if i == None:
            break
        for j in i:
            Ms[j] += 1
    print(Ms.count(N))

main()
Problem p03244 (python)

Fixed submission:
from operator import itemgetter
from collections import Counter
def main():
    va = []
    vb = []
    n = int(input())
    *v, = map(int, input().split())
    for i in range(len(v)):
        if i % 2 == 0:
            va.append(v[i])
        else:
            vb.append(v[i])
    a1 = Counter(va).most_common()
    a2 = Counter(vb).most_common()
    how_many_a1 = a1[0][1]
    how_many_a2 = a2[0][1]
    if a1[0][0] != a2[0][0]:
        print(n - how_many_a1 - how_many_a2)
    else:
        if len(a1) == 1 and len(a2) == 1:
            print(int(n/2))
        elif len(a1) == 1:
            print(len(vb) - a2[1][1])
        elif  len(a2) == 1:
            print(len(va) - how_many_a1)
        elif (len(va) - how_many_a1) + (len(vb) - a2[1][1])  > (len(vb) - how_many_a2) + (len(va) - a1[1][1]):
            print((len(vb) - how_many_a2) + (len(va) - a1[1][1]))
        else:
            print((len(va) - how_many_a1) + (len(vb) - a2[1][1]))
main()

Buggy submission (verdict: Runtime Error):
from operator import itemgetter
from collections import Counter
def main():
    va = []
    vb = []
    n = int(input())
    *v, = map(int, input().split())
    for i in range(len(v)):
        if i % 2 == 0:
            va.append(v[i])
        else:
            vb.append(v[i])
    a1 = Counter(va).most_common()
    a2 = Counter(vb).most_common()
    how_many_a1 = a1[0][1]
    how_many_a2 = a2[0][1]
    if a1[0][0] != a2[0][0]:
        print(n - how_many_a1 - how_many_a2)
    else:
        if (len(va) - how_many_a1) + (len(vb) - how_many_a2[0][1])  > (len(vb) - how_many_a2) + (len(va) - how_many_a1[0][1]):
            print((len(vb) - how_many_a2) + (len(va) - how_many_a1[0][1]))
        else:
            print((len(va) - how_many_a1) + (len(vb) - how_many_a2[0][1]))
main()
Problem p03086 (python)

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

Buggy submission (verdict: Runtime Error):
S = input()
Slist =　list(S)

i = 0
max = 0
for s in Slist:
  if s == "A" or "C" or "G" or "T":
    i += 1
    if i >= max:
      max = i
  elif:
    i = 0
    
print(max)
Problem p03145 (python)

Fixed submission:
x,y,z= map(int,input().split())
print(int(x*y/2))

Buggy submission (verdict: Runtime Error):
|AB|,|BC|,|CA|= map(int,input().split())
print(|AB|*|BC|/2)
Problem p03210 (python)

Fixed submission:
a=int(input())
if a==3 or a==5 or a==7:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a=int(input())
if a ==7or5or3:
  print('YES')
else:
  print('NO')
Problem p03238 (python)

Fixed submission:
x=int(input())
if x == 1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
x=int(input())
if x == 1:
  print('Hello World')
else:
  a,b=map(int,input().split())
  print(a+b)

Buggy submission (verdict: Runtime Error):
x=int(input())
if x == 1:
  print('Hello World')
elif x == 2:
  a,b=map(int,input().split())
  print(int(a+b))

Buggy submission (verdict: Runtime Error):
x=int(input())
a,b=map(int,input().split())
if x == 1:
  print('Hello World')
else:
  print(int(a+b))

Buggy submission (verdict: Runtime Error):
x=int(input())
if x == 1:
  print('Hello World')
else:
  a,b=map(int,input().split())
  print(int(a+b))
Problem p03264 (python)

Fixed submission:
K=int(input())
if K%2==0:
  print(int((K/2)**2))
else:
  print(int((K-1)/2*(K+1)/2))

Buggy submission (verdict: Runtime Error):
K=int(input()**2//4)

Buggy submission (verdict: Runtime Error):
K=int(input()//2**2)
Problem p03385 (python)

Fixed submission:
print('Yes' if ''.join(sorted(input()))=='abc' else 'No' )

Buggy submission (verdict: Runtime Error):
print('Yes' if ''join(sorted(input()))=='abc' else 'No' )

Buggy submission (verdict: Runtime Error):
print('Yes' if ''join(sorted.input())=='abc' else 'No' )

Buggy submission (verdict: Runtime Error):
print('Yes' if ''.join.sorted.input()=='abc' else 'No' )

Buggy submission (verdict: Runtime Error):
print('Yes' if sorted.input()=='abc' else 'No' )
Problem p03399 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
z=[a,b,c,d]
print(min(z[:2])+min(z[2:]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()));print(min(a[:2])+min(a[2:]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()));print(min(a[:1])+min(a[2:]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split());print(min(a[:1])+min(a[2:]))
Problem p03415 (python)

Fixed submission:
a=list(input())
b=list(input())
c=list(input())
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
a=[(input()) for i in range(9)]
print(a[0]+a[4]+a[8])
Problem p03433 (python)

Fixed submission:
a=int(input())
b=int(input())
print('Yes' if a%500<=b else 'No')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print('Yes' if a%500<=b else 'No')
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split());print('Even' if a*b%2==0 else 'Odd')

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

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

Buggy submission (verdict: Runtime Error):
s=list(input())
s[3]=8
print(''.join(s))
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(int,input().split());print('Left' if a+b>c+d elif a+b<c+d 'Right' else 'Balanced')
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
map(int,input().split());print(-(-(a+b)//2))

Buggy submission (verdict: Runtime Error):
print(-(-(a+b)//2))
Problem p03501 (python)

Fixed submission:
a,b,c=map(int,input().split());print(min([a*b,c]))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split());print(min[a*b,c])
Problem p03543 (python)

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

Buggy submission (verdict: Runtime Error):
print('Yes' if len(set(input()[:3]))==1 else 'Yes' if len(set(input()[1:]))==1 else 'No')

Buggy submission (verdict: Runtime Error):
print('Yes' if len(set(input()[:3]))==1 or len(set(input()[1:]))==1 else 'No')

Buggy submission (verdict: Runtime Error):
print('Yes' if len(set(list(input()))))<3 else 'No')
Problem p03547 (python)

Fixed submission:
a,b=input().split();print('>' if a>b else '<' if a<b else '=')

Buggy submission (verdict: Runtime Error):
a,b=input();print('>' if a>b else '<' if a<b else '=')

Buggy submission (verdict: Runtime Error):
a,b=input();print('>' if a>b else '<' if a<b else '=')

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

Fixed submission:
a,b=map(int,input().split());print(a-b if a>=b else 0)

Buggy submission (verdict: Runtime Error):
print(max(int(input())-int(input())),0)
Problem p03657 (python)

Fixed submission:
a,b=map(int,input().split());print('Possible' if a%3==0 else 'Possible' if b%3==0 else 'Possible' if (a+b)%3==0 else 'Impossible')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split());print('Possible' if a%3==0 else 'Possible' if b%3==0 else 'Possible' (a+b)%3==0 else 'Impossible')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split());print('Possible' if a%3==0 else 'Possible' if b%3==0 else 'Possible' a+b%3==0 else 'Impossible')
Problem p03844 (python)

Fixed submission:
a,b,c=input().split()
print(eval(a+b+c))

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

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
print(eval(abc))

Buggy submission (verdict: Runtime Error):
print(eval(*input()))
Problem p03845 (python)

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

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

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

Fixed submission:
a,b,h=[int(input()) for i in range(3)];print(int((a+b)*h/2))

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

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

Fixed submission:
# https://atcoder.jp/contests/dp/tasks/dp_g
import sys
input = sys.stdin.readline

N, M = [int(x) for x in input().split()]

# メモ化再帰版
# E = [[] for _ in range(N)]
# for i in range(M):
#     e = tuple([int(x) for x in input().split()])
#     E[e[0] - 1].append(e[1] - 1)
#
# dp = [-1] * N
# def rec(v):
#     if dp[v] != -1:
#         return dp[v]
#
#     res = 0
#     for n in E[v]:
#         res = max(res, rec(n) + 1)
#     dp[v] = res
#     return res
#
# res = 0
# for n in range(N):
#     res = max(res, rec(n))
#
# print(res)

# BFS版
from collections import deque


deg = [0] * N  # 各頂点の入力数
dp = [0] * N   # 各頂点のスタートからの距離

E = [[] for _ in range(N)]
for i in range(M):
    e = tuple([int(x) - 1 for x in input().split()])
    E[e[0]].append(e[1])
    deg[e[1]] += 1

que = deque([i for i, v in enumerate(deg) if v == 0])

while len(que) > 0:
    v = que.popleft()
    for to in E[v]:
        deg[to] -= 1
        if deg[to] == 0:
            que.append(to)
            dp[to] = max(dp[to], dp[v] + 1)

print(max(dp))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N, M = [int(x) for x in input().split()]
E = [[] for _ in range(N)]
for i in range(M):
    e = tuple([int(x) for x in input().split()])
    E[e[0] - 1].append(e[1] - 1)

dp = [-1] * N


def rec(v):
    if dp[v] != -1:
        return dp[v]

    res = 0
    for n in E[v]:
        res = max(res, rec(n) + 1)
    dp[v] = res
    return res


res = 0
for n in range(N):
    res = max(res, rec(n))

print(res)
Problem p03085 (python)

Fixed submission:
b = input()
dict = {"A":"T", "T":"A", "C":"G", "G":"C"}
print(dict[b])

Buggy submission (verdict: Runtime Error):
def how_many_AC(count_summary, str):
  index = str.find('AC')
  if index == -1:
  	return (count_summary, "")
  else:
    return (count_summary+1, str[index+2:])

def how_many_AC_recursive(count1, str1):
  (count2, str2) = how_many_AC(count1, str1)
  if len(str2) <= 1:
    return count2
  else:
    x = how_many_AC_recursive(count2, str2)
    return x

import sys
sys.setrecursionlimit(1000000)
(N, Q) = input().split()
S = input()
for i in range(1, int(Q)+1):
  (l_str, r_str) = input().split()
  l = int(l_str)
  r = int(r_str)
  substr = S[l-1:r]
  out = how_many_AC_recursive(0, substr)
  print(out)

Buggy submission (verdict: Runtime Error):
def how_many_AC(count_summary, str):
  index = str.find('AC')
  if index == -1:
  	return (count_summary, "")
  else:
    return (count_summary+1, str[index+2:])

def how_many_AC_recursive(count1, str1):
  (count2, str2) = how_many_AC(count1, str1)
  if len(str2) <= 1:
    return count2
  else:
    x = how_many_AC_recursive(count2, str2)
    return x

import sys
sys.setrecursionlimit(10000000)
(N, Q) = input().split()
S = input()
for i in range(1, int(Q)+1):
  (l_str, r_str) = input().split()
  l = int(l_str)
  r = int(r_str)
  substr = S[l-1:r]
  out = how_many_AC_recursive(0, substr)
  print(out)

Buggy submission (verdict: Runtime Error):
i = input()
dict = {"A":"C", "C":"A", "G":"T", "T":"G"}
o = dict[i[b]]
print(o)

Buggy submission (verdict: Runtime Error):
dict = {"A":"C", "C":"A", "G":"T", "T":"G"}
print(dict[b])
Problem p03125 (python)

Fixed submission:
#encoding: utf-8

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

print(A + B if B % A == 0 else B - A)

Buggy submission (verdict: Runtime Error):
#encoding: utf-8

N, M = map(int, input().split())
A = list(map(int, input().split()))
match = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

A.sort()
A.reverse()

dp = [-1] * (N + 1)
dp[0] = 0

for i in range(N + 1):
    for a in A:
        if i - match[a] >= 0:
            dp[i] = max(dp[i - match[a]] * 10 + a, dp[i])

print(dp[N])
Problem p03128 (python)

Fixed submission:
#encoding: utf-8

N, M = map(int, input().split())
A = list(map(int, input().split()))
match = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

A.sort()
A.reverse()

dp = [-1] * (N + 1)
dp[0] = 0

for i in range(N + 1):
    for a in A:
        if i - match[a] >= 0:
            dp[i] = max(dp[i - match[a]] * 10 + a, dp[i])

print(dp[N])

Buggy submission (verdict: Runtime Error):
#encoding: utf-8

N, M = map(int, input().split())
A = list(map(int, input().split()))
match = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

A.sort()
A.reverse()

dp = [-1] * (N + 1)
dp[0] = 0

for i in range(N + 1):
    for a in A:
        if i - match[a] >= 0:
            dp[i] = max(dp[i - match[a]] * 10 + a, dp[i])
    print(dp)

print(dp[N])
Problem p03085 (python)

Fixed submission:
Dict = {'A':'T','C':'G','T':'A','G':'C'}
tmp = input()
print(Dict[tmp])

Buggy submission (verdict: Runtime Error):
Dict = {'A':'T','C':'G','T':'A','G':'C'}
tmp = input()
print(Dict(tmp))
Problem p03087 (python)

Fixed submission:
N,Q = map(int,input().split())
S = input()
point = [list(map(int,input().split())) for i in range(Q)]
ac_list = [0]*(N+1)
 
for i in range(N):
  if S[i:i+2] == 'AC':
    ac_list[i+1] = ac_list[i] + 1
  else:
    ac_list[i+1] = ac_list[i]
 
 
for i in range(Q):
  print(ac_list[point[i][1]-1] - ac_list[point[i][0]-1])

Buggy submission (verdict: Runtime Error):
import sys
from itertools import accumulate

N, Q = map(int, input().split())
S = input()
lr = []
for i in range(Q):
    l, r = map(int, input().split())
    lr.append([l-1, r])

t = [0] * N

for i in range(1, N):
    s = S[i-1:i+1]
    if s == 'AC':
        t[i] += 1

T = list(accumulate(t))
 
for i in lr:
    print(T[i[1]] - T[i[0]])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1]

Buggy submission (verdict: Runtime Error):
AC = 'AC'
qlist = []
S =  input()
N, Q = map(int, input().split())

for i in range(Q):
    s, e = map(int, input().split())
    qlist.append([s-1, e])

for q in qlist:
    tmp = S[q[0]:q[1]]
    print(tmp.count(AC))
Problem p03125 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if b%a==0:
  print(a+b)
else:
    print(b-a)
Problem p03447 (python)

Fixed submission:
X=int(input())
A=int(input())
B=int(input())
print((X-A)%B)

Buggy submission (verdict: Runtime Error):
X=int,(input())
A=int,(input())
B=int,(input())
print((X-A)%B)

Buggy submission (verdict: Runtime Error):
X=int,input()
A=int,input()
B=int,input()
print((X-A)%B)

Buggy submission (verdict: Runtime Error):
X=(int,input())
A=(int,input())
B=(int,input())
print((X-A)%B)

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

Buggy submission (verdict: Runtime Error):
oppai,tintin,manman=map(int,input().split())
print((oppai-tintin)%manman)
Problem p03826 (python)

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

Buggy submission (verdict: Runtime Error):
A,B,C,D=(int (i) for i in input() split())
print(max(A*B,C*D))
Problem p03085 (python)

Fixed submission:
code = input()
if code == 'A':
	print('T')
elif code == 'T':
    print('A')
elif code == 'G':
    print('C')
elif code == 'C':
    print('G')

Buggy submission (verdict: Runtime Error):
code = input()
if code = 'A':
	print('T')
elif code = 'T':
	print('A')
elif code = 'G':
	print('C')
elif code = 'C':
	print('G')

Buggy submission (verdict: Runtime Error):
code = input()
if code = 'A':
	print('T')
elif code = 'T':
    print('A')
elif code = 'G':
    print('C')
elif code = 'C':
    print('G')

Buggy submission (verdict: Runtime Error):
code = str(input())
if code = 'A':
	print('T')
elif code = 'T':
    print('A')
elif code = 'G':
    print('C')
elif code = 'C':
    print('G')
Problem p03086 (python)

Fixed submission:
str = input()
ans = []
allow = ["A","C","G","T"]
count = 0
for s in str:
  if s in allow:
    count = count + 1
    ans.append(count)
  else:
    count = 0
    
if len(ans) == 0:
  print(0)
else:
  print(sorted(ans)[-1])

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
count = 0
for s in str:
  if s in allow:
    count = count + 1
    ans.append(count)
  else:
    count = 0
  
print(sorted(ans)[-1])

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
count = 0
for index in range(len(str)):
  if str[index] in allow:
    count = count + 1
  else:
    ans.append(count)
    count = 0
print(sorted(ans)[-1])

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
ans_str = ""
for index in range(len(str)):
  if str[index] in allow:
    ans_str = ans_str + str[index]
  else:
    ans.append(ans_str)
    ans_str = ""
print(len(sorted(ans, key=len)[-1]))

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
ans_str = ""
for index in range(len(str)):
  if str[index] in allow:
    ans_str = ans_str + str[index]
  else:
    ans.append(ans_str)
    ans_str = ""
    continue
 
print(len(sorted(ans, key=len)[-1]))

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
ans_str = ""
for index in range(len(str)):
  if str[index] in allow:
    ans_str = ans_str + str[index]
  else:
    ans.append(ans_str)
    ans_str = ""
    continue

print(len(sorted(ans, key=len)[-1]))

Buggy submission (verdict: Runtime Error):
str = input()
ans = []
allow = ["A","C","G","T"]
ans_str = ""
for index in range(len(str)):
  if str[index] in allow:
    ans_str = ans_str + str[index]
  else:
    ans.append(ans_str)
    ans_str = ""
    continue

print(sorted(ans, key=len)[-1])
Problem p03085 (python)

Fixed submission:
s = input()
if s == 'A':
	print('T')
elif s == 'T':
    print('A')
elif s == 'G':
	print('C')
elif s == 'C':
	print('G')

Buggy submission (verdict: Runtime Error):
s = input()
if s == 'A':
	print('T')
else if s == 'T':
	print('A')
else if s == 'G':
	print('C')
else if s == 'C':
	print('G')
Problem p03086 (python)

Fixed submission:
S = list(input())

count = 0
max = 0

for moji in S:
    if moji == "A"or moji == "T"or moji == "G"or moji == "C":
        count += 1
        if count > max:
            max = count
    else:
        count = 0
print(max)

Buggy submission (verdict: Runtime Error):
S=list(input())

count=0
max=0

for moji in list:
  if moji==("A"or"T"or"G"or"C"):
    count+=1
    if count>max:
      max=count
  else:
    count=0
print(max)
Problem p03145 (python)

Fixed submission:
A, B, C = map(int, input().split())
print(min(A, B, C)*(A+B+C-max(A, B, C)-min(A, B, C))//2)

Buggy submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
print(min(S,B,C)*(A+B+C-max(A,B,C)-min(A,B,C))//2)
Problem p03206 (python)

Fixed submission:
D = int(input())
str = "Christmas"
while D < 25:
    str += " Eve"
    D += 1
print(str)

Buggy submission (verdict: Runtime Error):
D=int(input())
str="Christmas"
while D<25:
  	str+=" EVE"
    D+=1
print(str)
Problem p03085 (python)

Fixed submission:
b = input()
if b=='A':
  print ('T')
elif b=='T':
  print ('A')
elif b=='C':
  print ('G')
elif b=='G':
  print ('C')

Buggy submission (verdict: Runtime Error):
first_line = input()
N, Q = first_line.split(' ')
N = int(N) #length of the input sentence
Q = int(Q) #num of the questions

S = input() #input sentence

numbers_of_AC = []

question_atributes = []
for _ in range(Q):
    start, end = (input().split(' '))
    start = int(start)
    end = int(end)
    
    for c in S:
		if c == 'A':
			count+=1
		else:
			numbers_of_AC.append(count)
    		count = 0
	numbers_of_AC.append(count)