Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys

N = int(input())
W = [input() for _ in range(N)]

if len(set(W)) != len(W):
    print('No')
    sys.exit(1)

prev = W[0][-1]
for w in W[1:]:
    print(w[0], prev)
    if prev != w[0]:
        print('No')
        sys.exit(1)
    prev = w[-1]

print('Yes')

Fixed submission:
import sys

N = int(input())
W = [input() for _ in range(N)]

if len(set(W)) != N:
    print('No')
    sys.exit()

prev = W[0][-1]
for w in W[1:]:
    if prev != w[0]:
        print('No')
        sys.exit()
    prev = w[-1]

print('Yes')
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
x = list(map(lambda x: int(x), input().split()))

for i in range(n-k+1):
    r = x[i+k-1]
    l = x[i]
    length = abs(r - l) + min(abs(l), abs(r))
    if length < ans:
        ans = length

print(ans)

Fixed submission:
N, K   = map(int, input().split())
x = list(map(int, input().split()))
 
m = min(b - a + min(abs(a), abs(b)) for a, b in zip(x, x[K-1:]))
print(m)

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

m = min(b - a + min(abs(a), bas(b)) for a, b in zip(x, x[k-1]))
print(m)

Fixed submission:
N, K   = map(int, input().split())
x = list(map(int, input().split()))
 
m = min(b - a + min(abs(a), abs(b)) for a, b in zip(x, x[K-1:]))
print(m)
Buggy python submission (verdict: Runtime Error):
n = int(input())

count = 0
for i in range(1, n+1, 2):
    n_divisor = 1
    for j in range(2, n+1):
        if i%j == 0:
            n_divisor += 1
    if n_divisor == 8:
        count += 1

print(count)

Fixed submission:
A, B = map(int, input().split())
s = (A * B) - (A + B - 1)
print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(26):
    for j in range(16):
        if i*$ + j*7 == n:
            print('Yes')
            exit()

print('No')

Fixed submission:
n = int(input())
for i in range(26):
    for j in range(16):
        if i*4 + j*7 == n:
            print('Yes')
            exit()

print('No')

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(26):
    for j in range(16):
        if i*$ + j*7 == n:
            print('Yes')
            exit()

print('No')

Fixed submission:
n = int(input())
for i in range(26):
    for j in range(16):
        if i*4 + j*7 == n:
            print('Yes')
            exit()

print('No')
Buggy python submission (verdict: Runtime Error):
s = input()

c1, c2, c3 = False, False, True

if s[0] == 'A':
    c1 = True

if s[2:-2].count('C') == 1:
    c2 = True

index = [i for i in range(1, len(s))]
for i, st in enumerate(s[1:]):
    if st == 'C':
        index.pop(i)

for idx in index:
    if s[idx].islower():
        continue
    else:
        c3 = False
        break

if c1 and c2 and c3:
    print('AC')
else:
    print('WA')

Fixed submission:
s = input()

c1, c2 = False, False

if s[0] == 'A':
    c1 = True

if s[2:-1].count('C') == 1:
    c2 = True

s_lower = s[1:].replace('C', 'c')
c3 = s_lower.islower()

if c1 and c2 and c3:
    print('AC')
else:
    print('WA')
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]
f = False
for i in range(n):
    for j in range(n):
        if a[i][j] == b[0][0]:
            for k in range(m):
                for l in range(1, m):
                    if a[i+k][j+l] != b[k][l]:
                        f = True
                        break
                if f:
                    break
            if not f:
                print('Yes')
                exit()

print('No')

Fixed submission:
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        f = True
        for k in range(m):
            if a[i+k][j:j+m] != b[k]:
                f = False
                break
        if f:
            print('Yes')
            exit()

print('No')

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]
f = False
for i in range(n):
    for j in range(n):
        if a[i][j] == b[0][0]:
            for k in range(m):
                for l in range(1, m):
                    if a[i+k][j+l] != b[k][l]:
                        f = True
                        break
                if f:
                    break
                print('Yes')
                exit()

print('No')

Fixed submission:
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        f = True
        for k in range(m):
            if a[i+k][j:j+m] != b[k]:
                f = False
                break
        if f:
            print('Yes')
            exit()

print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import math

k, s = map(int, input().split())

ans = 0
for i in itertools.combinations_with_replacement(range(k+1), 3):
    if sum(i) == s:
        n_unique = len(set(i))
        if n_unique == 1:
            ans += 1
        elif n_unique == 2:
            ans += 3
        elif n_unique == 3:
            ans += 6
print(ans)

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

ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if (z >= 0) and (z <= k):
            ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())

a = input()
b = input()
c = input()

ans = 0

for count in range(n):
    tmp = 0
    if a[count] == b[count]:
        if a[count] != c[count]:
            tmp += 1
    else:
        tmp += 1
        if (a[count] != c[count]) & (b[count] != c[count]):
            tmp += 1
    ans += tmp
    
print(ans)


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

n = int(n)
a = int(a)
b = int(b)

ans_max = min(a,b)

if (a + b) > n:
    ans_min = a + b - n 
else:
    ans_min = 0


print(ans_max, end=" ")
print(ans_min)
Buggy python submission (verdict: Runtime Error):
n = int(input())

a = input()
b = input()
c = input()

ans = 0

if a == b & b == c:
    ans = 0
else:
    for count in range(n):
        tmp = 0
        if a[count] == b[count]:
            if a[count] != c[count]:
                tmp += 1
        else:
            tmp += 1
            if (a[count] != c[count]) & (b[count] != c[count]):
                tmp += 1
        ans += tmp
    
print(ans)


Fixed submission:
n = int(input())

a = input()
b = input()
c = input()

ans = 0

for count in range(n):
    tmp = 0
    if a[count] == b[count]:
        if a[count] != c[count]:
            tmp += 1
    else:
        tmp += 1
        if (a[count] != c[count]) & (b[count] != c[count]):
            tmp += 1
    ans += tmp
    
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
alice=[x for x in range(a,b+1)]
bob=[x for x in range(c,d+1)]
kaburi=list(set(alice) & set(bob))
if len(kaburi)<=1:
    print(0)
else:
    ans=kaburi[-1]-kaburi[0]
    print(ans)

Fixed submission:
num=list(str(input()))
num_new=num[::-1]
if num==num_new:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
alice=[x for x in range(a,b+1)]
bob=[x for x in range(c,d+1)]
kaburi=list(set(alice) & set(bob))
if len(kaburi)<=1:
    print(0)
else:
    ans=kaburi[-1]-kaburi[0]
    print(ans)

Fixed submission:
num=list(str(input()))
num_new=num[::-1]
if num==num_new:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n=input()
a=list(map(int,input().split()))
an=[]
def aaa(i):
        b=a[i:]
        c=a[:i]
        x=sum(b)
        y=sum(c)
        return x-y
for i in range(len(a)):
    an+=[aaa(i)]
an=[abs(x) for x in an]
print(min(an))


Fixed submission:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")
Buggy python submission (verdict: Runtime Error):
n=input()
a=list(map(int,input().split()))
a.sort()
print(a[-1]-a[0])

Fixed submission:
r,g,b=map(int,input().split())
x=r*100+g*10+b
if x%4==0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n=int(input())
pr=list(map(int,input().split()))
rate_color=[]
suge=0
for i in range(n):
    if pr[i]>=3200:
        suge+=1
def cl(x):
    if x<=399:
        return [0]
    elif 400<=x<=799:
        return [1]
    elif 800 <=x<=1199:
        return [2]
    elif 1200 <=x<=1599:
        return [3]
    elif 1600<=x<= 1999:
        return [4]
    elif 2000 <=x<=2399:
        return [5]
    elif 2400 <=x<=2799:
        return [6]
    elif 2800 <=x<=3199:
        return [7]

for i in range(n):
    x=pr[i]
    rate_color+=cl(x)
color=list(set(rate_color))
color_num=len(color)


max_num=color_num+suge
if color_num==0:
    mini_num=1
else:
    mini_num=color_num
print(mini_num,max_num)

Fixed submission:
n=int(input())
pr=list(map(int,input().split()))
rate_color=[]
suge=0
for i in range(n):
    if pr[i]>=3200:
        suge+=1
pr=[x for x in pr if x<=3199]

def cl(x):
    if x<=399:
        return [0]
    elif 400<=x<=799:
        return [1]
    elif 800 <=x<=1199:
        return [2]
    elif 1200 <=x<=1599:
        return [3]
    elif 1600<=x<= 1999:
        return [4]
    elif 2000 <=x<=2399:
        return [5]
    elif 2400 <=x<=2799:
        return [6]
    elif 2800 <=x<=3199:
        return [7]

for i in range(len(pr)):
    x=pr[i]
    rate_color+=cl(x)
color=list(set(rate_color))
color_num=len(color)


max_num=color_num+suge
if color_num==0:
    mini_num=1
else:
    mini_num=color_num
print(mini_num,max_num)
Buggy python submission (verdict: Runtime Error):
a = []
for i in (5):
  a += [int(input())]
k = int(input())
a.sort()
kekka = ":("
if a[4] - a[0] <= k:
  kekka = "Yay!"
print(kekka)

Fixed submission:
a = []
for i in range (5):
  a += [int(input())]
k = int(input())
a.sort()
kekka = ":("
if a[4] - a[0] <= k:
  kekka = "Yay!"
print(kekka)

Buggy python submission (verdict: Runtime Error):
a = []
for i in (5):
  a += [int(input())]
a.sort()
kekka = ":("
if a[4] - a[0] <= k:
  kekka = "Yay!"
print(kekka)

Fixed submission:
a = []
for i in range (5):
  a += [int(input())]
k = int(input())
a.sort()
kekka = ":("
if a[4] - a[0] <= k:
  kekka = "Yay!"
print(kekka)
Buggy python submission (verdict: Runtime Error):
x = int(input())
if x = 3 oe x = 5 or x= 7:
  print("YES")
else:
  print("NO")

Fixed submission:
x = int(input())
if x == 3 or x == 5 or x == 7:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a, b, t = (int(i) for i in input().split()) 

return ((t + 0.5) // a) * b

Fixed submission:
a, b, t = (int(i) for i in input().split()) 

print((t // a) * b)
Buggy python submission (verdict: Runtime Error):
S = input()
l = []
for i in S:
    l.append(i)

c = 0
cnt = []
for j in range(len(l)):
    if l[j] == 'A' or l[j] == 'T' or l[j] == 'C' or l[j] == 'G':
        c+=1
    else:
        cnt.append(c)
        c = 0

print(max(cnt))

Fixed submission:
S = input()
l = []
for i in S:
    l.append(i)

c = 0
cnt = []
for j in range(len(l)):
    if l[j] == 'A' or l[j] == 'T' or l[j] == 'C' or l[j] == 'G':
        c+=1
        cnt.append(c)
    else:
        cnt.append(c)
        c = 0

#print(cnt)
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
S = input()
l = []
for i in S:
    l.append(i)

c = 0
cnt = []
for j in range(len(l)):
    if l[j] == 'A' or l[j] == 'T' or l[j] == 'C' or l[j] == 'G':
        c+=1
    else:
        cnt.append(c)
        c = 0

print(max(cnt))

Fixed submission:
S = input()
l = []
for i in S:
    l.append(i)

c = 0
cnt = []
for j in range(len(l)):
    if l[j] == 'A' or l[j] == 'T' or l[j] == 'C' or l[j] == 'G':
        c+=1
        cnt.append(c)
    else:
        cnt.append(c)
        c = 0

#print(cnt)
print(max(cnt))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input()
a = []
if S[0] == '0':
    a.append(0)
cnt = 1
for i in range(1, N):
    if S[i] != S[i - 1]:
        a.append(cnt)
        cnt = 1
    else:
        cnt += 1

a.append(cnt)
a.append(0)
a.append(0)

ans = s = sum(a[:2*K + 1])
for i in range(2*K + 2, len(a), 2):
    s += a[i] + a[i - 1] - a[i - 2*K - 1] - a[i - 2*K - 2]
    ans = max(ans, s)
print(ans)


Fixed submission:
input_ = list(map(int,input().split()))
x = input_[0]
y = input_[1]
point = max(x,y)
if point == x:
  x -= 1
else:
    y -= 1
point += max(x,y)
print(point)

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

Z = [j for j, s in enumerate(S) if (j > 0 and s == 0 and S[j] != S[j-1]) or (j == 0 and s == 0)] + [N]
Y = [j for j, s in enumerate(S) if (j > 0 and s == 1 and S[j] != S[j-1]) or (j == 0 and s == 1)]
result = 0
if len(Z) <= K:
  print(N)
else:
  for i in range(len(Z)-K):
    if i == 0:
      result = Z[i+K]
    else:
      result = max(result, Z[i+K] - Y[i if Y[0] < Z[0] else i-1])
    print(result)

Fixed submission:
input_ = list(map(int,input().split()))
x = input_[0]
y = input_[1]
point = max(x,y)
if point == x:
  x -= 1
else:
    y -= 1
point += max(x,y)
print(point)

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

Z = [j for j, s in enumerate(S) if (j > 0 and s == 0 and S[j] != S[j-1]) or (j == 0 and s == 0)] + [N]
Y = [j for j, s in enumerate(S) if (j > 0 and s == 1 and S[j] != S[j-1]) or (j == 0 and s == 1)]
result = 0
if len(Z) <= K:
  print(N)
else:
    for i in range(len(Z)-K):
      if i == 0:
        result = Z[i+K]
      else:
        result = max(result, Z[i+K] - Y[i if Y[0] < Z[0] else i-1])
    print(result)

Fixed submission:
input_ = list(map(int,input().split()))
x = input_[0]
y = input_[1]
point = max(x,y)
if point == x:
  x -= 1
else:
    y -= 1
point += max(x,y)
print(point)
Buggy python submission (verdict: Runtime Error):
def gcd(*A):
    if len(A) == 1:
        return A[0]
    elif len(A) == 2:
        a, b = A
        tmp = a % b
        while tmp != 0:
            a, b = b, tmp
            tmp = a % b
        return b
    elif len(A) > 2:
        return gcd(gcd(*A[:2]), *A[2:])

N = int(input())
A = list(map(int, input().split()))
print(max(gcd(*(A[j] for j in range(N) if i != j)) for i in range(N)))

Fixed submission:
def gcd(a, b):
    tmp = a % b
    while tmp != 0:
        a, b = b, tmp
        tmp = a % b
    return b

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

L = [0 for _ in range(N)]
R = [0 for _ in range(N)]

L[0], R[N - 1] = A[0], A[N - 1]

for i in range(N-1): # i=0,1,...N-2
    L[i + 1] = gcd(L[i], A[i + 1])
    R[N - i - 2] = gcd(R[N - i - 1], A[N - i - 2])

print(max(L[N-2], R[1], *(gcd(L[i], R[i+2]) for i in range(N-2))))

Buggy python submission (verdict: Runtime Error):
def gcd(*A):
    if len(A) == 2:
        a, b = A
        tmp = a % b
        while tmp != 0:
            a, b = b, tmp
            tmp = a % b
        return b
    else:
        return gcd(gcd(*A[:2]), *A[2:])

N = int(input())
A = list(map(int, input().split()))
print(max(gcd(*(A[j] for j in range(N) if i != j)) for i in range(N)))

Fixed submission:
def gcd(a, b):
    tmp = a % b
    while tmp != 0:
        a, b = b, tmp
        tmp = a % b
    return b

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

L = [0 for _ in range(N)]
R = [0 for _ in range(N)]

L[0], R[N - 1] = A[0], A[N - 1]

for i in range(N-1): # i=0,1,...N-2
    L[i + 1] = gcd(L[i], A[i + 1])
    R[N - i - 2] = gcd(R[N - i - 1], A[N - i - 2])

print(max(L[N-2], R[1], *(gcd(L[i], R[i+2]) for i in range(N-2))))

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(*A):
    A = set(A)
    tmp = min(A)
    B = {ai % tmp for ai in A if ai % tmp > 0}
    B.add(tmp)
    for _ in range(100000000000000):
        A = B
        tmp = min(A)
        B = {ai % tmp for ai in A if ai % tmp > 0}
        if len(B) == 0: break 
        B.add(tmp)
    return tmp    


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

print(max(gcd(*(A[j] for j in range(N) if i != j)) for i in range(N)))

Fixed submission:
def gcd(a, b):
    tmp = a % b
    while tmp != 0:
        a, b = b, tmp
        tmp = a % b
    return b

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

L = [0 for _ in range(N)]
R = [0 for _ in range(N)]

L[0], R[N - 1] = A[0], A[N - 1]

for i in range(N-1): # i=0,1,...N-2
    L[i + 1] = gcd(L[i], A[i + 1])
    R[N - i - 2] = gcd(R[N - i - 1], A[N - i - 2])

print(max(L[N-2], R[1], *(gcd(L[i], R[i+2]) for i in range(N-2))))
Buggy python submission (verdict: Runtime Error):
N = int(input())

A = list(map(int), input().split())
if N % 2 == 0:
    print(sum(map(abs, A)))
else:
    neg = [a for a in A if a < 0]
    c = max(neg) if len(neg) > 0 else 0
    print(sum(map(abs, A)) - 2 * c)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
neg = [a for a in A if a < 0]
A = list(map(abs, A))

if len(neg) % 2 == 0:
    print(sum(A))
else:
    print(sum(A) - 2 * min(A))

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

A = list(map(int), input().split())
if N % 2 == 0:
    print(sum(map(abs, A)))
else:
    print(sum(map(abs, A)) - 2 * max([a for a in A if a <= 0]))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
neg = [a for a in A if a < 0]
A = list(map(abs, A))

if len(neg) % 2 == 0:
    print(sum(A))
else:
    print(sum(A) - 2 * min(A))
Buggy python submission (verdict: Runtime Error):
a,b,t = map(int, input().split())
ans = ((T+0.5) // a)*b
print(int(ans))

Fixed submission:
a,b,t = map(int, input().split())
ans = ((t+0.5) // a)*b
print(int(ans))

Buggy python submission (verdict: Runtime Error):
a,b,t = map(int, input().split())
print(((T+0.5) // a)*b)

Fixed submission:
a,b,t = map(int, input().split())
ans = ((t+0.5) // a)*b
print(int(ans))

Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
inp_ints = list(map(int, input().split()))
# ints = list(set(inp_ints))

uniq_ints = list(set(inp_ints))
ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m)

gcd = 0
result = 1
for i in range(len(ints)):
    gcd = 0
    for m in ints[:i]:
        gcd = math.gcd(gcd, m)
    for m in ints[i+1:]:
        gcd = math.gcd(gcd, m)
    if gcd > result:
        result = gcd

print(result)

Fixed submission:
A, B, T = map(int, input().split())
result = T // A * B

print(result)

Buggy python submission (verdict: Runtime Error):
import fractions

N = int(input())
inp_ints = list(map(int, input().split()))
ints = list(set(inp_ints))
""" uniq_ints = list(set(inp_ints))

ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m) """

gcd = 0
result = 1
for i in range(len(ints)):
    gcd = 0
    for m in ints[:i]:
        gcd = fractions.gcd(gcd, m)
    for m in ints[i+1:]:
        gcd = fractions.gcd(gcd, m)
    if gcd > result:
        result = gcd

print(result)

Fixed submission:
A, B, T = map(int, input().split())
result = T // A * B

print(result)

Buggy python submission (verdict: Runtime Error):
import fractions

N = int(input())
inp_ints = list(map(int, input().split()))
ints = list(set(inp_ints))
""" uniq_ints = list(set(inp_ints))

ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m) """

gcd = 0
result = 1
holed_ints = []
for i in range(len(ints)):
    holed_ints = ints[:i] + ints[i+1:]
    gcd = 0
    for j in range(len(ints)-1):
        gcd = fractions.gcd(gcd, holed_ints[j])
    if gcd > result:
        result = gcd

print(result)

Fixed submission:
A, B, T = map(int, input().split())
result = T // A * B

print(result)
Buggy python submission (verdict: Runtime Error):
cooking_times = [int(input()) for i in range(5)]
fractional_times = []
result = 0

for time in cooking_times:
    if time % 10 == 0:
        result += time
    else:
        result += time - time % 10
        fractional_times.append(time % 10)

result += (len(fractional_times) - 1) * 10
result += min(fractional_times)

print(result)

Fixed submission:
cooking_times = [int(input()) for i in range(5)]
fractional_times = []
result = 0

for time in cooking_times:
    if time % 10 == 0:
        result += time
    else:
        result += time - time % 10
        fractional_times.append(time % 10)

if fractional_times != []:
    result += (len(fractional_times) - 1) * 10
    result += min(fractional_times)

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
def move_people(city, nums_city_people, nums_transportation_seat):
    if nums_city_people[city] - nums_transportation_seat[city] >= 0:
        nums_city_people[city] -= nums_transportation_seat[city]
        nums_city_people[city+1] += nums_transportation_seat[city]
    else:
        nums_city_people[city+1] += nums_city_people[city]
        nums_city_people[city] = 0


NUM_CITIES = 6
NUM_TRANSPORTATION = 5

nums_city_people = [int(input())] + [0] * (NUM_CITIES-1)
nums_people_having_moved = list(reversed(nums_city_people))
nums_transportation_seat = [int(input()) for i in range(NUM_TRANSPORTATION)]
result = 0

while nums_city_people != nums_people_having_moved:
    result += 1
    for city in reversed(range(NUM_CITIES-1)):
        move_people(city, nums_city_people, nums_transportation_seat)

print(result)

Fixed submission:
TRANSPORTATION_COUNT = 5

people_count = int(input())
capacity_counts = [int(input()) for i in range(TRANSPORTATION_COUNT)]
result = people_count // min(capacity_counts)

if people_count % min(capacity_counts) > 0:
    result += TRANSPORTATION_COUNT
else:
    result += TRANSPORTATION_COUNT - 1
    
print(result)
Buggy python submission (verdict: Runtime Error):
BASE_PAIRS = [['A', 'T'], ['C', 'G']]
base_b = input()
paired_base_index = ValueError
result = ''

for i in range(len(BASE_PAIRS)):
    paired_base_index = BASE_PAIRS[i].index(base_b)
    if paired_base_index != ValueError:
        result = BASE_PAIRS[i][(paired_base_index+1) % 2]
        break

print(result)


Fixed submission:
BASE_PAIRS = [['A', 'T'], ['C', 'G']]
base_b = input()
result = ''

for i in range(len(BASE_PAIRS)):
    if base_b in BASE_PAIRS[i]:
        paired_base_index = (BASE_PAIRS[i].index(base_b)+1) % 2
        result = BASE_PAIRS[i][paired_base_index]

print(result)

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


Fixed submission:
b = input()
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C')
else:
  pass
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np


A = list(map(int, input().split()))
K = A[0]
S = A[1]
counter = 0
for i in range(K+1):
	for j in range(K+1):
		for l in range(K+1):
			temp = i + j + l
			if(temp == S):
				counter = counter + 1

print(counter)
print("\n")

Fixed submission:
import numpy as np


A = list(map(int, input().split()))
K = A[0]
S = A[1]
counter = 0
for i in range(K+1):
	for j in range(K+1):
		sa = S - (i + j)
		if 0 <= sa and sa <= K:
			counter = counter + 1
			
			
print(counter)
print("\n")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split)
ans = 0
for i in range(2):
  if a >= b:
    ans += a
    a -= 1
  else:
    ans += b
    b -= 1
print(ans)

Fixed submission:
a, b = map(int, input().strip().split(' '))
ans = 0
for i in range(2):
    if a >= b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1

print(ans)