Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input(). split ()))
 
a = 1
for i in l:
	a *= i
	if a > 1e18:
		a = -1
		break
print(a)

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

Buggy python submission (verdict: Runtime Error):
l = map(int, input())
 
a = 1
for i in l:
	a *= i
	if a > 1e18:
		a = -1
		break
print(a)

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

Buggy python submission (verdict: Runtime Error):
n, *l = map(int, open(0).read().split())

a = 1
for i in l:
	a *= i
	if a > 1e18:
		a =-1
		break
ptint(a)

Fixed submission:
A, B = map(int, input().split())
print(A * B)
Buggy python submission (verdict: Runtime Error):
n, *l = map(int, open(0).read.split())

a = 1
for i in l:
	a *= i
	if a > 1e18:
		a =-1
		break
print(a)
	

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
l.sort()
a = 1
for i in l:
	a *= i
	if a > 10**18:
		a = -1
		break
print(a)
Buggy python submission (verdict: Runtime Error):
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(math.floor(a*b))

Fixed submission:
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(floor(a*b))

Buggy python submission (verdict: Runtime Error):
from math import floor
a, b = input().split()
print(math.floor(a*b))

Fixed submission:
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(floor(a*b))

Buggy python submission (verdict: Runtime Error):
import math
a, b = input().split()
print(math.floor(a * b))

Fixed submission:
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(floor(a*b))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(math.floor(A * B))

Fixed submission:
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(floor(a*b))

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(math.floor(A * B))

Fixed submission:
from math import floor
from decimal import Decimal
a, b = map(Decimal, input().split())
print(floor(a*b))
Buggy python submission (verdict: Runtime Error):
n = int(input())
num = map (str(n))

if num[print(len(n))] == [2, 4, 5, 7, 9]:
	print("hon")
elif num[print(len(n))] == [0, 1, 6, 8]:
	print("pon")
else:
	print("bon")

Fixed submission:
n = str(input())
num = int(n[-1])

if num in [2, 4, 5, 7, 9]:
    print("hon")
elif num in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
Buggy python submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int, input().split())
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)

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

for i in range(A, B+1):
    if i%K ==0:
        num +=1

print('OK' if num >0 else 'NG')
Buggy python submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int, input().split())
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range (Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)

Fixed submission:
import itertools
N, M, Q = map(int, input().split())
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in itertools.combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)

Buggy python submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int, input().split())
a = [int(input()) for _ in range(Q)]
b = [int(input()) for _ in range(Q)]
c = [int(input()) for _ in range(Q)]
d = [int(input()) for _ in range(Q)]
for i in range (Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)

Fixed submission:
import itertools
N, M, Q = map(int, input().split())
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in itertools.combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)
Buggy python submission (verdict: Runtime Error):
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += f(d-1, g-s)
    return min(c, f(d-1,g))

print(dfs(D, G))

Fixed submission:
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += dfs(d-1, g-s)
    return min(c, dfs(d-1,g))

print(dfs(D, G))

Buggy python submission (verdict: Runtime Error):
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    # if(d == 0):
    #     return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += f(d-1, g-s)
    return min(c, f(d-1,g))

print(dfs(D, G))

Fixed submission:
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += dfs(d-1, g-s)
    return min(c, dfs(d-1,g))

print(dfs(D, G))

Buggy python submission (verdict: Runtime Error):
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]
print(1e9)

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += f(d-1, g-s)
    return min(c, f(d-1,g))

print(dfs(D, G))

Fixed submission:
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += dfs(d-1, g-s)
    return min(c, dfs(d-1,g))

print(dfs(D, G))

Buggy python submission (verdict: Runtime Error):
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]
print(1e9)

def dfs(d, g):
    # if(d == 0):
    #     return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += f(d-1, g-s)
    return min(c, f(d-1,g))

print(dfs(D, G))

Fixed submission:
D, G = map(int, input().split())
PC = [0]+[list(map(int,input().split())) for _ in range(D)]

def dfs(d, g):
    if(d == 0):
        return 1e9

    c = min(g//(100*d), PC[d][0])
    s = 100*d*c
    if c == PC[d][0]:
        s += PC[d][1]
    if s<g:
        c += dfs(d-1, g-s)
    return min(c, dfs(d-1,g))

print(dfs(D, G))
Buggy python submission (verdict: Runtime Error):
N =int(input())        
A =list(map(int, input(
                       
print(max(A)-min(A))

Fixed submission:
N =int(input())
A =list(map(int, input().split()))
print(max(A)-min(A))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S =list(input())
count = N
ans = []

for i in range(N):
    ans.append(S[0:i].count('W') + S[i+1:N].count('E'))
print(min(ans))

Fixed submission:
N = int(input())
S =list(input())
ans = N
W = 0
E = S.count('E')

for i in range(N):
    if S[i] =='E':
        E -= 1
    ans = min(ans, W+E)
    if S[i] == 'W':
        W += 1
print(ans)

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

for i in range(N):
    count = min(S[0:i].count('W') + S[i+1:N].count('E'), count)
print(count)

Fixed submission:
N = int(input())
S =list(input())
ans = N
W = 0
E = S.count('E')

for i in range(N):
    if S[i] =='E':
        E -= 1
    ans = min(ans, W+E)
    if S[i] == 'W':
        W += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S =list(input())
count = float("inf")

for i in range(N):
    count = min(S[0:i].count('W') + S[i+1:N].count('E'), count)
print(count)

Fixed submission:
N = int(input())
S =list(input())
ans = N
W = 0
E = S.count('E')

for i in range(N):
    if S[i] =='E':
        E -= 1
    ans = min(ans, W+E)
    if S[i] == 'W':
        W += 1
print(ans)

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

for i in xrange(N):
    count = min(S[0:i].count('W') + S[i+1:N].count('E'), count)
print(count)

Fixed submission:
N = int(input())
S =list(input())
ans = N
W = 0
E = S.count('E')

for i in range(N):
    if S[i] =='E':
        E -= 1
    ans = min(ans, W+E)
    if S[i] == 'W':
        W += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S =list(input())
count = float("INF")

for i in range(N):
    count = min(S[0:i].count('W') + S[i+1:N].count('E'), count)
print(count)

Fixed submission:
N = int(input())
S =list(input())
ans = N
W = 0
E = S.count('E')

for i in range(N):
    if S[i] =='E':
        E -= 1
    ans = min(ans, W+E)
    if S[i] == 'W':
        W += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
if ( N - A )% 500 == 0:
	print("Yes")
else:
	print("No")

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

Buggy python submission (verdict: Runtime Error):
N, A = map(int, input().split())
if ( N - A ) % 500 == 0:
	print("Yes")
else:
	print("No")

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

Buggy python submission (verdict: Runtime Error):
N, A = map(int, input().split())
if ( N - A ) % 5 == 0:
	print("Yes")
else:
	print("No")

Fixed submission:
n = int(input())
a = int(input())
if  n% 500 <= a:
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

if sorted(s) < list(reversed(t)):
    print('Yes')
else:
    print('No')

Fixed submission:
a, b = map(int, input().split())
import math
print(math.ceil((a + b)/2))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
element = [a, b, c]
marble = 0
for x in element:
	if x == 1:
		marble +=1
element = [a, b, c]
marble = 0
for x in element:
	if x == 1:
		marble +=1

Fixed submission:
s = input()
print(s.count('1'))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(input() for _ in range(N))

print(len([i for i in A if A.count(i)%2 != 0]))

Fixed submission:
import collections
N= int(input())
A = sorted(list(int(input()) for i in range(N)))
c = collections.Counter(A)
count = 0

for v in c.values():
    if v%2 !=0:
        count +=1 

print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
l = [0]*10**5+2

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1

print(max(l))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
l = [0]*(10**5+2)

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1

print(max(l))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int, input().split())
l = [0]*10**5+2
ans = 0
num = 0

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1


print(max(l))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
l = [0]*(10**5+2)

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1

print(max(l))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int, input().split())
l = [0]*10**5
ans = 0
num = 0

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1

print(max(l))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
l = [0]*(10**5+2)

for i in a:
    l[i] +=1
    l[i+1] +=1
    l[i+2] +=1

print(max(l))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
K, S = map(int, input().split())
ans = 0

for i in itertools.product(range(K+1), repeat=2):
    if (S - sum(i)>=0) and (S - sum(i)<=K):
        ans += 1
print(ans)

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

ans = 0
for x in range(K+1):
    for y in range (K+1):
        if  0 <= S - x- y <= K:
            ans +=1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
K, S = map(int, input().split())
ans = 0

for i in itertools.product(range(K+1), repeat=3):
    if sum(i) == S:
        ans += 1
print(ans)

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

ans = 0
for x in range(K+1):
    for y in range (K+1):
        if  0 <= S - x- y <= K:
            ans +=1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
K, S = map(int, input().split())
ans = 0

for i in itertools.product(range(K+1), repeat=3):
    if sum(i) == S:
        ans += 1
print(ans)

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

ans = 0
for x in range(K+1):
    for y in range (K+1):
        if  0 <= S - x- y <= K:
            ans +=1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
K, S = map(int, input().split())

ans = 0
for x in range(K+1):
    for y in range (K+1):
        for z in range(K+1):
            if x+y+z == S:
                ans +=1

print(ans)

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

ans = 0
for x in range(K+1):
    for y in range (K+1):
        if  0 <= S - x- y <= K:
            ans +=1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K=int(input())
def x():
    count=0
    for i in range(K):
        count+=(10**i)*7
        if count%K==0:
            return i+1
    return -1
x()
ans=x()
print(ans)

Fixed submission:
K=int(input())
def x():
    count=0
    for i in range(K):
        count =(10*count+7)%K#余りからいく
        if count==0:
            return i+1
    return -1    
print(x())
Buggy python submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
Ai=list(map(int,input().split()))
Bi=list(map(int,input().split()))
list=[]
for i in range(N+M):
    if A[i]>B[i]:
        list.append(B[i])
    else:
        list.append(A[i])
        if sum(list)>=K:
            break
print(len(list))

Fixed submission:
a=int(input())
print(a+(a**2)+(a**3))
Buggy python submission (verdict: Runtime Error):
N=int(input())
lis=[chr(i) for i in range(97, 97+26)]
ans=''
while N>0:
    N-=1
    ans+=lis[N%26]
    N=N//26
print(ans[::-1]

Fixed submission:
N=int(input())
lis=[chr(i) for i in range(97, 97+26)]
ans=''
while N>0:
    N-=1
    ans+=lis[N%26]
    N=N//26
print(ans[::-1])

Buggy python submission (verdict: Runtime Error):
N=int(input())
lis=[chr(i) for i in range(97, 97+26)]
ans=''
for i in range(100000):
    rem=N%26**(i+1)
    ans=ans+lis[rem-1-26*i]
    if 26**(i+1)>N:
        break
print(ans)

Fixed submission:
N=int(input())
lis=[chr(i) for i in range(97, 97+26)]
ans=''
while N>0:
    N-=1
    ans+=lis[N%26]
    N=N//26
print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[input().split() for l in range(M)]
tot_1=min(a)+min(b)
lis=[]
for i in range(M):
    tot=a[int(x[i][0])]+b[int(x[i][1])]-int(x[i][2])
    lis.append(tot)
if tot_1<=min(lis):
    print(tot_1)
else:
    print(min(lis))

Fixed submission:
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[input().split() for l in range(M)]
tot_1=min(a)+min(b)
lis=[]
for i in range(M):
    tot=a[int(x[i][0])-1]+b[int(x[i][1])-1]-int(x[i][2])
    lis.append(tot)
if tot_1<=min(lis):
    print(tot_1)
else:
    print(min(lis))
Buggy python submission (verdict: Runtime Error):
Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]='0'
if (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):
    print('Yes')
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Fixed submission:
Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]='0'
if Aij[0].count('0')==3 or Aij[1].count('0')==3 or Aij[2].count('0')==3:
    print('Yes')
elif Aij[0][0]=='0' and Aij[1][0]=='0' and Aij[2][0]=='0':
    print('Yes')
elif Aij[0][1]=='0' and Aij[1][1]=='0' and Aij[2][1]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][2]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]='0'
if (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Fixed submission:
Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]='0'
if Aij[0].count('0')==3 or Aij[1].count('0')==3 or Aij[2].count('0')==3:
    print('Yes')
elif Aij[0][0]=='0' and Aij[1][0]=='0' and Aij[2][0]=='0':
    print('Yes')
elif Aij[0][1]=='0' and Aij[1][1]=='0' and Aij[2][1]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][2]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L= list(map(int,input().split()))
L_sorted=sorted(L,reverse=False)#昇順
count=0
for i in range(N):
    for j in range(i+1,N):
        a=L_sorted[i]
        b=L_sorted[j]
        n=a+b
        fin=N
        sta=0
        while sta+1<fin:
            m=((fin-sta)//2)+sta
            if L_sorted[m]<n:
                sta=m       
            else:
                fin=m   
        count+=sta-j
print(count)

Fixed submission:
N=int(input())
L= list(map(int,input().split()))
L_sorted=sorted(L,reverse=False)#昇順
count=0
for i in range(N):
    for j in range(i+1,N):
        a=L_sorted[i]
        b=L_sorted[j]
        n=a+b
        fin=N
        sta=0
        while sta+1<fin:
            m=((fin-sta)//2)+sta
            if L_sorted[m]<n:
                sta=m       
            else:
                fin=m   
        count+=sta-j
print(count)
Buggy python submission (verdict: Runtime Error):
S=input()
cnt=0
lis=[]
for i in range(len(S)):
    if S[i]=='A'or S[i]=='C' or S[i]=='G' or S[i]=='T':
        cnt+=1
        lis.append(cnt)
    else:
        cnt=0
print(max(lis))

Fixed submission:
S=input()
cnt=0
lis=[0]
for i in range(len(S)):
    if S[i]=='A'or S[i]=='C' or S[i]=='G' or S[i]=='T':
        cnt+=1
        lis.append(cnt)
    else:
        cnt=0
print(max(lis))
Buggy python submission (verdict: Runtime Error):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
Ai= [input().split() for l in range(N)]
count=0
tot=0
for i in range(N):
    for j in range(M):
        tot+=Ai[i][j]*B[i]
        if tot+C>0:
            count+=1
print(count)

Fixed submission:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
Ai= [input().split() for l in range(N)]
count=0
for i in range(N):
    tot=0
    for j in range(M):
        tot+=int(Ai[i][j])*B[j]
    if tot+C>0:
        count+=1  
print(count)
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())
counter=0

for a in range(A+1):
    a_total=a*500
    for b in range(B+1):
        b_total=b*100
        for c in range(C+1):
            c_total=c*50
            total_amount=(a_total+b_total+c_total)
            if X==total_amount:
                count=counter+1
print(count)

Fixed submission:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
counter=0

for a in range(A+1):
    a_total=a*500
    for b in range(B+1):
        b_total=b*100
        for c in range(C+1):
            c_total=c*50
            total_amount=(a_total+b_total+c_total)
            if X==total_amount:
                counter=counter+1
print(counter)
Buggy python submission (verdict: Runtime Error):
a,b=map(input().split())
c=a+b
c=int(c)**0.5
if isinstance(c, int)==True:
    print('Yes')
else:
    print('No')

Fixed submission:
a,b=map(str,input().split())
c=a+b
c=(int(c)**(1/2))
if (c.is_integer())==True:
    print('Yes')
else:
    print('No')