Harryxun/testdata huggingface dataset:
Buggy python 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)

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 python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())

# N, K = 3, 2

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

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


print(ans)

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 python 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)

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 python 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)


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 python 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)


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 python 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)


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 python 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)


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 python 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")

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 python 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")

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 python submission (verdict: Runtime Error):
A = [int(i) for i in input().split()]

print(A(max)-A(min))

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 python submission (verdict: Time Limit Exceeded):
import math

N = int(input())
a = [int(i) for i in input().split()]

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

koubai = 1
for i in range(N):
    koubai = lcm(koubai, a[i])

f = [0 for i in range(koubai)]

for i in range(len(f)):
    for j in range(N):
        f[i] += i % a[j]

print(max(f))

Fixed submission:
import math

N = int(input())
a = [int(i) for i in input().split()]

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

koubai = 1
for i in range(N):
    koubai = lcm(koubai, a[i])

# f = [0 for i in range(koubai)]

# for i in range(len(f)):
#     for j in range(N):
#         f[i] += i % a[j]

ans = 0
for i in range(N):
    ans += (koubai-1) % a[i]

print(ans)
Buggy python 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))


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

SS = S[::w]
print(SS)
Buggy python 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)

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 python 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)

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 python 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))


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

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

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

Buggy python 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))

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

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

Fixed submission:
A, B = (int(i) for i in input().split())
print(max(A + B, A - B, A * B))
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
K = int(input())

alphabet = ["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"]

count = 0

for alp in alphabet:
    ss = []
    # print(alp)
    if alp in s:
        pos = [i for i, x in enumerate(s) if x == alp]
        # print(pos)
        for i in pos:
            for j in range(1,len(s)-i+1):
                ss.append(s[i:i+j])
        ss = list(set(ss))
        ss.sort()
        # print(ss)
        if K - count <= len(ss):
            print(ss[K - count -1])
            break
        else:
            count += len(ss)

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

alphabet = ["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"]

count = 0

for alp in alphabet:
    ss = []
    # print(alp)
    if alp in s:
        pos = [i for i, x in enumerate(s) if x == alp]
        # print(pos)
        for i in pos:
            for j in range(1,6):
                if i+j == len(s) + 1:
                    break
                else:
                    ss.append(s[i:i+j])
        ss = list(set(ss))
        ss.sort()
        # print(ss)
        if K - count <= len(ss):
            print(ss[K - count -1])
            break
        else:
            count += len(ss)
Buggy python 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)

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 python 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)

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 python 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))


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 python 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))

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 python submission (verdict: Runtime Error):
N = int(input())
S = [int(i) for i in input().split()]

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

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

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

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

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

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

if "Y" in S:
    print("Four")
else:
    print("Three")
Buggy python 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")


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 python submission (verdict: Runtime Error):
N,A,B = map(int, input().split())

print(min(A*N),B)

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

print(min(A*N,B))
Buggy python 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")

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 python 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]))

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

l.sort(reverse=True)

print(sum(l[:K]))
Buggy python 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)

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 python 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)

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 python 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))

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 python submission (verdict: Runtime Error):
N,M = map(int,input().split())

a = [0 for i in range(N)]
b = [0 for i in range(N)]
c = [0 for i in range(M)]
d = [0 for i in range(M)]

for i in range(N):
    a[i],b[i] = map(int,input().split())

for i in range(M):
    c[i],d[i] = map(int,input().split())

for i in range(N):
    for j in range(M):
        dist = []
        tmp = abs(a[i]-c[i]) + abs(b[i]-d[i])
        dist.append(tmp)

    print(dist.index(min(dist)))

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

a = [0 for i in range(N)]
b = [0 for i in range(N)]
c = [0 for i in range(M)]
d = [0 for i in range(M)]

for i in range(N):
    a[i],b[i] = map(int,input().split())

for i in range(M):
    c[i],d[i] = map(int,input().split())

for i in range(N):
    dist = []

    for j in range(M):
        tmp = abs(a[i]-c[j]) + abs(b[i]-d[j])
        dist.append(tmp)

    print(dist.index(min(dist)) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)

        return divisor_list

A = make_divisor_list(N)

B = []
keta = []

for a in A:
    b = int(N/a)
    B.append(b)

    aa = len(str(a))
    bb = len(str(b))

    f = max(aa,bb)
    keta.append(f)

print(min(keta))

Fixed submission:
N = int(input())

def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if i > N/i:
                break
            if num % i == 0:
                divisor_list.append(i)

        return divisor_list

A = make_divisor_list(N)

B = []
ans = float("inf")

for a in A:
    b = int(N/a)
    c = max(a,b)
    ans = min(ans,len(str(c)))

print(ans)
Buggy python 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")

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 python submission (verdict: Runtime Error):
N = int(input())

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

print(ans)

Fixed submission:
N = int(input())

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

print(power)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

power = 1
for i in range(1,N+1):
    power *= i

ans = power % (10**9 + 7)

print(ans)

Fixed submission:
N = int(input())

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

print(power)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = (int(i) for i in input().split())

ans = 0
while True:
    if N >= 1 and M >= 2:
        N -= 1
        M -= 2
        ans += 1
    elif M >= 2:
        M -= 2
        N += 1
    else:
        break

print(ans)

Fixed submission:
N, M = (int(i) for i in input().split())

ans = 0

if M-2*N < 0:
    ans = M // 2
else:
    ans = N + (M-2*N) // 4

print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = (int(i) for i in input().split())
A = []
B = []
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())

for i in range(N-M+1):
    if B[0] in A[i]:
        pos = A[i].find(B[j])
        flag = 0
        for j in range(M):
            if A[i+j][pos:pos+M] == B[j]:
                pass
            else:
                flag = -1
                break
        if flag = 0:
            print("Yes")

print("No")

Fixed submission:
import sys

N, M = (int(i) for i in input().split())
A = []
B = []
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())

for i in range(N-M+1):
    if B[0] in A[i]:
        pos = A[i].find(B[0])
        flag = 0
        for j in range(M):
            if A[i+j][pos:pos+M] == B[j]:
                pass
            else:
                flag = -1
                break
        if flag == 0:
            print("Yes")
            sys.exit()

print("No")
Buggy python submission (verdict: Runtime Error):
from math import floor

N = int(input())
A = int(input())
B = int(input())

steps = floor(N / (A + B))
cap = steps * (A + B)
blue_balls = steps * A + min([N - cap, A])
print(blue_balls)

Fixed submission:
from math import floor

inp = input()
N, A, B = [int(x) for x in inp.split(" ")]

steps = floor(N / (A + B))
cap = steps * (A + B)
blue_balls = steps * A + min([N - cap, A])
print(blue_balls)
Buggy python submission (verdict: Runtime Error):
r = int(input())
print(3 * a ** 2)


Fixed submission:
r = int(input())
print(3 * r ** 2)
Buggy python 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)

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

print(min(n*a, b))
Buggy python submission (verdict: Runtime Error):
L = input()
 
intL = int(L)
L10 = int(L, 2)
sum_ = 0
for a in range(L10+1):
  for b in range(L10+1):
    if ((a + b) <= L10) and ((a + b) == (a ^ b)):
      sum_+=1
 
print(sum_ % (10**9 + 7))

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

calc_list = [P+Q, Q+R, R+P]

print(min(calc_list))
Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
s = input()

s = s[:k] + s[k].lower() + s[k+1:]
print(s)

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

s = s[:k-1] + s[k-1].lower() + s[k:]
print(s)
Buggy python 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))

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 python 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))

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 python 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))

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 python 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))

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)