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

n = int(input())

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

#mid = n//2 + n%2

ans = [0]*n
for i, a in enumerate(an[::-1]):

#    ta = [x for ii,x in enumerate(an[i:]) if i % (n-(ii+i)) == 0]
#    t = sum(ta)
#    print(ta,t,i,a)
#    ans[-i] = t%2

    ans[-i] = sum([x for ii, x in enumerate(an[i::i]) if i % (n-(ii+i)) == 0])%2

m = sum(ans)
print(m)

if m > 0:
    print(*[x for x in ans if x >0])

Fixed submission:

n = int(input())

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

#mid = n//2 + n%2

#print(* range(10)[::2] )

ans = [0]*(n+1)

for _ in range(n):# 0 ... n-1
    i = n-_ # n ... 1

    ta = sum(ans[i::i])
    ans[i] = 0 if ta%2 == an[i-1] else 1

#    print(i, an[i-1::i])


m = sum(ans)
print(m)

if m > 0:
    print(*[i for i, x in enumerate(ans) if x >0])

Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())

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

#mid = n//2 + n%2

ans = [0]*n
for i, a in enumerate(an[::-1]):

#    ta = [x for ii,x in enumerate(an[i:]) if i % (n-(ii+i)) == 0]
#    t = sum(ta)
#    print(ta,t,i,a)
#    ans[-i] = t%2

    ans[-i] = sum([x for ii, x in enumerate(an[i:]) if i % (n-(ii+i)) == 0])%2

m = sum(ans)
print(m)

if m > 0:
    print(*[x for x in ans if x >0])

Fixed submission:

n = int(input())

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

#mid = n//2 + n%2

#print(* range(10)[::2] )

ans = [0]*(n+1)

for _ in range(n):# 0 ... n-1
    i = n-_ # n ... 1

    ta = sum(ans[i::i])
    ans[i] = 0 if ta%2 == an[i-1] else 1

#    print(i, an[i-1::i])


m = sum(ans)
print(m)

if m > 0:
    print(*[i for i, x in enumerate(ans) if x >0])

Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())

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

#mid = n//2 + n%2

ans = [0]*n
for i, a in enumerate(an[::-1]):

    ta = [x for ii,x in enumerate(an[i:]) if i % (n-(ii+i)) == 0]
    t = sum(ta)
#    print(ta,t,i,a)
    ans[-i] = t%2

m = sum(ans)
print(m)

if m > 0:
    print(*[x for x in ans if x >0])

Fixed submission:

n = int(input())

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

#mid = n//2 + n%2

#print(* range(10)[::2] )

ans = [0]*(n+1)

for _ in range(n):# 0 ... n-1
    i = n-_ # n ... 1

    ta = sum(ans[i::i])
    ans[i] = 0 if ta%2 == an[i-1] else 1

#    print(i, an[i-1::i])


m = sum(ans)
print(m)

if m > 0:
    print(*[i for i, x in enumerate(ans) if x >0])

Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())

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

#mid = n//2 + n%2

ans = [0]*n
for i, a in enumerate(an[::-1]):

    ta = [x for ii,x in enumerate(an) if i % (n-ii) == 0]
    t = sum(ta)
#    print(ta,t,i,a)
    ans[-i] = t%2

m = sum(ans)
print(m)

if m > 0:
    print(*[x for x in ans if x >0])

Fixed submission:

n = int(input())

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

#mid = n//2 + n%2

#print(* range(10)[::2] )

ans = [0]*(n+1)

for _ in range(n):# 0 ... n-1
    i = n-_ # n ... 1

    ta = sum(ans[i::i])
    ans[i] = 0 if ta%2 == an[i-1] else 1

#    print(i, an[i-1::i])


m = sum(ans)
print(m)

if m > 0:
    print(*[i for i, x in enumerate(ans) if x >0])
Buggy python submission (verdict: Runtime Error):

import math

a, b, c, d = map(int, input().split())
c, d = min(c,d), max(c, d)

ans = b - a + 1 

if d%c == 0:#4 8 4 2
    ans -= b//c - a//c + (0 if a%c != 0 else 1)

else:
    x = b // c - a//c + (0 if a%c != 0 else 1)
    y = b // d - a//d + (0 if a%d != 0 else 1)

    lcm = c*d//math.gcd(c,d)
    t = b //lcm - a//lcm + (1 if a >= lcm and a%lcm ==0 else 0)

    ans = ans -x-y+t
#    print(x,y,t,lcm,ans)

#    ans += t 


print(ans)

Fixed submission:

import fractions

a, b, c, d = map(int, input().split())
c, d = min(c,d), max(c, d)

ans = b - a + 1 

if d%c == 0:#4 8 4 2
    ans -= b//c - a//c + (0 if a%c != 0 else 1)

else:
    x = b // c - a//c + (0 if a%c != 0 else 1)
    y = b // d - a//d + (0 if a%d != 0 else 1)

    lcm = c*d // fractions.gcd(c,d)
    t = b //lcm - a//lcm + (1 if a >= lcm and a%lcm ==0 else 0)

    ans = ans -x-y+t
#    print(x,y,t,lcm,ans)

#    ans += t 


print(ans)
Buggy python submission (verdict: Runtime Error):

n, x = map(int, input().split())

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


curpos = 0
times = 1
while curpos <= x and times <= n+1:
    curpos += Ln[times-1]
    if curpos>x:
        break
    
    times += 1


print(times)

Fixed submission:

n, x = map(int, input().split())

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


curpos = 0
times = 1
while curpos <= x and times < n+1:
    curpos += Ln[times-1]
    if curpos>x:
        break
    
    times += 1


print(times)
Buggy python submission (verdict: Runtime Error):

n, m = map(int, input().split())
an = [0]*m

for i in range(m):
#    s = input()
    an[i] = int( input() )
#an[-1] = n

#an.sort()
disjoint = False
for i in range(len(an)-1):
    if an[i] + 1 == an[i+1]:
        disjoint = True





if disjoint:
    print(0)

else:

    mod = 10**9+7
    tab = [0]*(10**5+1)
    tab[0] = 0
    tab[1] = tab[2]= 1

    for i in range(3, len(tab)):
        tab[i] = tab[i-1]+tab[i-2]
#        if i<100:
#            print(tab[i])

    an.append(n)
    prev = 0
    ans = 1
    for a in an:
        index = a-prev + (1 if a == n else 0)
#        print(a,prev,index,tab[index])
        ans *= tab[index]
        ans %= mod
        prev = a+1

    #ans *= tab[n - prev]
    #ans %= 1000000007

    print(ans)



Fixed submission:
n, m = map(int, input().split())
an = [0]*m

for i in range(m):
#    s = input()
    an[i] = int( input() )
#an[-1] = n

#an.sort()
disjoint = False
for i in range(len(an)-1):
    if an[i] + 1 == an[i+1]:
        disjoint = True


if disjoint:
    print(0)

else:

    mod = 10**9+7
    tab = [0]*(10**5+10)
    tab[0] = 0
    tab[1] = tab[2]= 1

    for i in range(3, len(tab)):
        tab[i] = tab[i-1]+tab[i-2]
#        if i<100:
#            print(tab[i])

    an.append(n)
    prev = 0
    ans = 1
    for a in an:
        index = a-prev + (1 if a == n else 0)
#        print(a,prev,index,tab[index])
        ans *= tab[index]
        ans %= mod
        prev = a+1

    #ans *= tab[n - prev]
    #ans %= 1000000007

    print(ans)

Buggy python submission (verdict: Runtime Error):

n, m = map(int, input().split())
an = [0]*m

for i in range(m):
#    s = input()
    an[i] = int( input() )
#an[-1] = n

#an.sort()
disjoint = False
for i in range(len(an)-1):
    if an[i] + 1 == an[i+1]:
        disjoint = True





if disjoint:
    print(0)

else:

    mod = 10**9+7
    tab = [0]*(10**5+1)
    tab[0] = 0
    tab[1] = tab[2]= 1

    for i in range(3, len(tab)):
        tab[i] = tab[i-1]+tab[i-2]
#        if i<100:
#            print(tab[i])

    an.append(n)
    prev = 0
    ans = 1
    for a in an:
        index = a-prev + (1 if a == n else 0)
        print(a,prev,index,tab[index])
        ans *= tab[index]
        ans %= mod
        prev = a+1

    #ans *= tab[n - prev]
    #ans %= 1000000007

    print(ans)



Fixed submission:
n, m = map(int, input().split())
an = [0]*m

for i in range(m):
#    s = input()
    an[i] = int( input() )
#an[-1] = n

#an.sort()
disjoint = False
for i in range(len(an)-1):
    if an[i] + 1 == an[i+1]:
        disjoint = True


if disjoint:
    print(0)

else:

    mod = 10**9+7
    tab = [0]*(10**5+10)
    tab[0] = 0
    tab[1] = tab[2]= 1

    for i in range(3, len(tab)):
        tab[i] = tab[i-1]+tab[i-2]
#        if i<100:
#            print(tab[i])

    an.append(n)
    prev = 0
    ans = 1
    for a in an:
        index = a-prev + (1 if a == n else 0)
#        print(a,prev,index,tab[index])
        ans *= tab[index]
        ans %= mod
        prev = a+1

    #ans *= tab[n - prev]
    #ans %= 1000000007

    print(ans)
Buggy python submission (verdict: Runtime Error):


# https://atcoder.jp/contests/m-solutions2019/submissions/5738704


from collections import deque, heapq

n = int(input())

g = [{"num":0,"neighber":[]} for _ in range(n+1) ]

for _ in range(n-1):

    a, b = map(int, input().split())

    g[a]["neighber"].append(b)
    g[b]["neighber"].append(a)


c = sorted( map(int, input().split()) )

# sum(c[:-1]) 
print( sum(c) - c[-1] )


i = 0
s = [(0,1)]

while i < len(s):
    
    pre, cur = s[i]
    i += 1

    g[cur]["num"] = c.pop()

    for e in g[cur]["neighber"]:
        if e == pre:
            continue

        s.append((cur,e))

print(" ".join(str(g[i]["num"])) for i in range(1,n+1))




Fixed submission:


# https://atcoder.jp/contests/m-solutions2019/submissions/5738704


from collections import deque, _heapq

n = int(input())

g = [{"num":0,"neighber":[]} for _ in range(n+1) ]

for _ in range(n-1):

    a, b = map(int, input().split())

    g[a]["neighber"].append(b)
    g[b]["neighber"].append(a)


c = sorted( map(int, input().split()) )

# sum(c[:-1]) 
print( sum(c) - c[-1] )


i = 0
s = [(0,1)]

while i < len(s):
    
    pre, cur = s[i]
    i += 1

    g[cur]["num"] = c.pop()

    for e in g[cur]["neighber"]:
        if e == pre:
            continue

        s.append( (cur,e) )

ans = ''
for i in range(1,n+1):
    ans += str( g[i]["num"] ) + " "



print( ans[:-1] )
Buggy python submission (verdict: Time Limit Exceeded):

s = input()

n = len(s)

check = [False]*n


rem = 0

# 0 search
for i in range(n):
    if s[i]== '1':
        continue


    # 1 search
    for j in range(n):
        if s[j] == '0':
            continue

        if check[j]:
            continue

        check[i], check[j] = True, True
        rem += 2
        break

print(rem)

        


Fixed submission:

s = input()

n = len(s)

stack = [ s[0] ]

rem = 0
# print(stack)

# 0 search

ss = len(stack)

for i in range(1,n):


    if ss==0 or stack[-1] == s[i]:

        stack.append(s[i])
        ss+=1
        
        continue


    if len(stack) > 0:
        stack.pop()
        ss -= 1

        i+=1
        rem +=2


print(rem)
Buggy python submission (verdict: Time Limit Exceeded):

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

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

#print (hn)

tab = [0]*n

tab[0] = 0


if n-1<=k:
    #一回で橋まで飛べるならそれが最適
    print( abs(hn[-1] - hn[0]) )

else:
    # k番目まで1回で飛ぶコスト
    for i in range(1,k+1):
        tab[i] = abs( hn[i]-hn[0])
#       print(tab[i])

#    print("Initialized")


    for i in range(k+1,n):
        t = 1000000000 # > 10^4

        # ここ(i [k+1,n) にki( [1,k+1) ) から1回で来るコスト)
        for ki in range(1,k+1):
            tt = abs(hn[i] - hn[i-ki]) + tab[i-ki]
            t = min(t, tt)
#            print((i,ki,tt))

        tab[i] = t
    
    print(tab[-1])


    


Fixed submission:



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

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

#print (hn)

tab = [0]*n

tab[0] = 0


if n-1<=k:
    #一回で橋まで飛べるならそれが最適
    print( abs(hn[-1] - hn[0]) )

else:
    # k番目まで1回で飛ぶコスト
    for i in range(1,k+1):
        tab[i] = abs( hn[i]-hn[0])
#       print(tab[i])

#    print("Initialized")


    for i in range(k+1,n):
        t = 1000000000 # > 10^4

        # ここ(i [k+1,n) にki( [1,k+1) ) から1回で来るコスト)
        for ki in range(1,k+1):
            tt = abs(hn[i] - hn[i-ki]) + tab[i-ki]
            t = min(t, tt)
#            print((i,ki,tt))

        tab[i] = t
    
    print(tab[-1])
Buggy python submission (verdict: Time Limit Exceeded):

n, w = map(int, input().split())

#wvn = [ list( map(int,input().split()) ) for _ in range(n) ]

wvn = [ tuple( map(int,input().split())) for _ in range(n) ]

#print(wvn)

VMAX = 10**3 * (10**2)
# 1 <= vi <= 10**3
tab = [ [10**10] *(VMAX+1) for _ in range(n+1)]

#print(type(tab[0]))

for i in range(1, len(wvn)+1 ):
    
    wv = wvn[i-1]
    wi = wv[0]
    vi = wv[1]
    
    for j in range( VMAX + 1 ):

        t = tab[i-1][j]
        
        if j >= vi:
            t = min(t, tab[i-1][j-vi]+wi)

        else:
            t = min(t, wi)
        
        tab[i][j] = t

ans = 0
while tab[n][ans] <= w:
    #print( (tab[n][ans],ans) )
    ans += 1

#print("ANS")
print(ans)



def debug0():
    row1 = tab[1]
    
    print("DEBUG0--START")
    print([(i, row1[i]) for i in range(0,50,5)])
    print("DEBUG0--END")
#debug0()


def debug1():

    for i in range(n+1):
        t = tab[i][0]
        sss = set(tab[i])
        print(sss)
        for j in range( 1, len(tab[i]) ):
            v = tab[i][j]

            if not t == v:
                t = v
                print( (i,j,v) )
 #end


def debug3():
    t = -1

    for i in range( len(tab[n])-1 ):
        e = tab[n][i]

        if not t == e:
            t = e
            print( (i, e) )
            
#debug3()





def debug2():
    t = -1
    for vi in range(len(tab[0])):

        v = tab[n][vi]
        if not t == v:
            t = v
            print((t,vi))


Fixed submission:

n, w = map(int, input().split())

#wvn = [ list( map(int,input().split()) ) for _ in range(n) ]

wvn = [ tuple( map(int,input().split())) for _ in range(n) ]

#print(wvn)

VMAX = 10**3 * (10**2)
# 1 <= vi <= 10**3
tab = [ [10**10] *(VMAX+1) for _ in range(n+1)]

#print(type(tab[0]))

for i in range(1, len(wvn)+1 ):
    
    wv = wvn[i-1]
    wi = wv[0]
    vi = wv[1]
    
    for j in range( VMAX + 1 ):

        t = tab[i-1][j]
        
        if j >= vi:
            t = min(t, tab[i-1][j-vi]+wi)

        else:
            t = min(t, wi)
        
        tab[i][j] = t

ans = 0
while tab[n][ans] <= w:
    #print( (tab[n][ans],ans) )
    ans += 1

#print("ANS")
print(ans)



def debug0():
    row1 = tab[1]
    
    print("DEBUG0--START")
    print([(i, row1[i]) for i in range(0,50,5)])
    print("DEBUG0--END")
#debug0()


def debug1():

    for i in range(n+1):
        t = tab[i][0]
        sss = set(tab[i])
        print(sss)
        for j in range( 1, len(tab[i]) ):
            v = tab[i][j]

            if not t == v:
                t = v
                print( (i,j,v) )
 #end


def debug3():
    t = -1

    for i in range( len(tab[n])-1 ):
        e = tab[n][i]

        if not t == e:
            t = e
            print( (i, e) )
            
#debug3()





def debug2():
    t = -1
    for vi in range(len(tab[0])):

        v = tab[n][vi]
        if not t == v:
            t = v
            print((t,vi))
Buggy python submission (verdict: Runtime Error):

n, x = map(int,input().split())

def rec(lv,ls):
    if lv == 0:
        return [1]
    else:
        ret = rec(lv-1,ls)
        for i in range(0,len(ret) -1):
            if ret[i]>0 and ret[i+1]>0:
                ret[i+1] += ret[i]
                ret[i] = 0  #deleted tag

        while 0 != ret.count(0):
            ret.remove(0)
        return [-1,*ret,1,*ret,-1]

#print( rec(n, list()) )


count = 0
for e in rec(n, list() ):
    abs_e = abs(e)

    if x == 0:
        break

    if x>=abs_e:
        x -= abs_e
        count += e if e>0 else 0
    else:
        count += x if e>0 else 0
        x = 0
    #print(x," ",count)

print(count)


Fixed submission:

# post-placed for
# counter for counter in iterator
#  

#Shiti Go San
def sgs(s:str)->bool:
    return True if all( s.count(c)>0 for c in "753") else False





n = int( input() )


def recursive(s:str)->int:
    if n < int(s):
        return 0

    ret = 1 if sgs(s) else 0

    for x in "753":
       ret += recursive( s + x )
    
    return ret

print( recursive('0') )
Buggy python submission (verdict: Time Limit Exceeded):

n, m = map( int, input().split() )

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

An = [0]+An

#print(An)

for i in range(n):
    An[i+1] += An[i]

#print(An)

ans = 0
for i in range(n):
    for j in range(i, n): 
#        print((i,j))
        t = An[j+1]-An[i]

        ans += 1 if t%m == 0 else 0


print(ans)

Fixed submission:


from collections import Counter

n, m = map( int, input().split() )

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

Bn = [0]+An



for i in range(n):
    Bn[i+1] = An[i] + Bn[i] 

#print(Bn)



mp = []

for i in range(n+1):
    r = Bn[i] % m
    mp.append(r)

nlist = Counter(mp).most_common()

ans = 0
for i in range(len(nlist)):
    t = nlist[i][1]
    if t <= 1:
        break

    ans += t*(t-1)//2

print(ans)
Buggy python submission (verdict: Runtime Error):

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


ans = 0

# N = pb + r

for b in range(k+1,n+1):
    p = n//b
    r = n%b
    ans += p * max(0,b-k) + max(0, r-k+1)


if k==0:
    ans -= n

print(

Fixed submission:

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


ans = 0

# N = pb + r

for b in range(k+1,n+1):
    p = n//b
    r = n%b
    ans += p * max(0,b-k) + max(0, r-k+1)


if k==0:
    ans -= n

print(ans)
Buggy python submission (verdict: Runtime Error):
 
n,y = map(int, input().split())
 
 
a,b,c = -1,-1,-1
 
for ai in range(n+1):
 
    if ai*1000>y:
        break
 
#    if ai * 1000 == y:
#        a,b,c = ai,0,0
#        break
 
    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci
 
print('{} {} {}'.format(c,b,a))
 

n,y = map(int, input().split())


a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*1000>y:
        break

    if ai * 1000 == y:
        a,b,c = ai,0,0
        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci

print('{} {} {}'.format(c,b,a))


Fixed submission:


n,y = map(int, input().split())

y //= 1000
a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*10> y:
        break

    if ai  == y:
        a,b,c = ai,0,0
        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai *10  + bi * 5 + ci :
            a,b,c = ai,bi,ci


print('{} {} {}'.format(a,b,c))

Buggy python submission (verdict: Runtime Error):
 
n,y = map(int, input().split())
 
 
a,b,c = -1,-1,-1
 
for ai in range(n+1):
 
    if ai*1000>y:
        break
 
    if ai * 1000 == y:
        a,b,c = ai,0,0
        break
 
    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci
 
print('{} {} {}'.format(c,b,a))
 

n,y = map(int, input().split())


a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*1000>y:
        break

#    if ai * 1000 == y:
#        a,b,c = ai,0,0
#        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai * 1000 + bi * 5000 + ci * 10000:
            a,b,c = ai,bi,ci

print('{} {} {}'.format(c,b,a))

提出情報

Fixed submission:


n,y = map(int, input().split())

y //= 1000
a,b,c = -1,-1,-1

for ai in range(n+1):

    if ai*10> y:
        break

    if ai  == y:
        a,b,c = ai,0,0
        break

    remain = n-ai
    for bi in range(remain+1):
        ci = remain - bi
        
        if y == ai *10  + bi * 5 + ci :
            a,b,c = ai,bi,ci


print('{} {} {}'.format(a,b,c))
Buggy python submission (verdict: Runtime Error):

import math
import bisect


prime = [2,3,5,7,11,13,17,19]
for i in range(prime[-1]+2,100,2):

    x = int( math.sqrt(i) )
    x += 1 if x%2 == 0 else 0

    found = False
    for p in prime:
        if p>x:
            break;

        if i % p == 0:
            found = True
                
    if not found:
        prime.append(i)

#print(prime)


q = int(input())
for _ in range(q):
    l, r = map(int,input().split())
    l += 1 if l%2 == 0 else 0

#    print((l,r))

    ans = 0
    for i in range( l , r+1, 2):

        #si = bisect.bisect_left(prime,i)
        xi = bisect.bisect_right(prime, i)
        yi = bisect.bisect_right(prime, (i+1)//2)
        ans += 1 if prime[xi-1] == i and prime[yi-1] == (i+1)//2 else 0

    print(ans)

Fixed submission:

n = int(input())


csf =  [tuple(map(int,input().split())) for _ in range(n-1)]

# print(csf)

for i in range(n-1):

    ans = csf[i][0] + csf[i][1]

    for j in range(i+1,n-1):
        here = csf[j]
        
        ans = max(ans,here[1])
        
        rm = ans % here[2]
        if rm != 0:
            ans += here[2] - rm
            
        ans += here[0]

#        print(ans)
    print(ans)

print(0)
Buggy python submission (verdict: Runtime Error):

N,x = map(int,input().split())

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

ans = sum(lst)

dp = lst[:]

#print(N,x)
#print(lst)


for i in range(1,N):
    tmp = 0
    for k in range(0,N):
        index_ = 0
        if(0 <= k-i):
            index_ = k-i
        else:
            index_ = N-i+k
        dp[k] = min(dp[k],lst[index_])
        tmp = tmp+dp[k]
    tmp = tmp + x*i
    ans = min(ans,tmp)

print(ans)

Fixed submission:

a,b,c = map(int,input().split())

lst = [a,b,c]

cnt = len(list( filter(lambda x:x%2==0,lst)))

if(0<cnt):
    print(0)
else:
    lst.sort()

    res = 0
    if(lst[2]%2 == 1):  
        res = lst[0]*lst[1]
    else:
        res = 0

    print(res)

Buggy python submission (verdict: Runtime Error):

a,b,c = map(int,input().split())

lst = [a,b,c]

cnt = len(list( filter(lambda x:x%2==0,lst)))

if(0<cnt):
    print(0)
else:
    lst.sort()

    res = 0
    if(lst[2]%2 == 1):  
        res = lst[0]*lst[1]
    else:
        res = 0

    prin

Fixed submission:

a,b,c = map(int,input().split())

lst = [a,b,c]

cnt = len(list( filter(lambda x:x%2==0,lst)))

if(0<cnt):
    print(0)
else:
    lst.sort()

    res = 0
    if(lst[2]%2 == 1):  
        res = lst[0]*lst[1]
    else:
        res = 0

    print(res)
Buggy python submission (verdict: Runtime Error):
X=int(input())
Y=int(input())

crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")

Fixed submission:
x=list(map(int,input().split()))
print(x.index(0)+1)
Buggy python submission (verdict: Runtime Error):
X,Y=map(int,input().split())

a=(4*X-Y)/2

if a.is_integer() and a>0:
    q=1
    print("Yes")

a=(8*X-Y)/4

if q==0:
    if a.is_integer() and a>0:
        print("Yes")
    else:
        print("No")

Fixed submission:
X,Y=map(int,input().split())
q=0

if(Y%2==1):
    q=1
    print("No")

if q==0:
    print(X*2<=Y and Y<=X*4 and "Yes" or "No")

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

crain=(4*X-Y)/2
if crain.is_integer() and crain>0:
    crain = int(crain)
    print("Yes")
else:
    print("No")

Fixed submission:
X,Y=map(int,input().split())
q=0

if(Y%2==1):
    q=1
    print("No")

if q==0:
    print(X*2<=Y and Y<=X*4 and "Yes" or "No")

Buggy python submission (verdict: Runtime Error):
X=input()
Y=input()
crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")

Fixed submission:
X,Y=map(int,input().split())
q=0

if(Y%2==1):
    q=1
    print("No")

if q==0:
    print(X*2<=Y and Y<=X*4 and "Yes" or "No")
Buggy python submission (verdict: Runtime Error):
x = int(input())
if x == 1:
  print(0)
else if x == 0:
  print(1)

Fixed submission:
x = int(input())
if x == 1:
  print(0)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
N = int(input())

xy = [map(int,input().split()) for _ in range(N)]
x,y = [list(i) for i in zip(*xy)]

ans = 0

for i in range(N):
    if x[i] == y[i]:
        ans +=1
    elif ans >= 3:
        flag = True
        ans = 0
    else:
        ans = 0
        
if ans >= 3 or flag ==True:
    print("Yes")
    
else:
    print("No")

Fixed submission:
N = int(input())

xy = [map(int,input().split()) for _ in range(N)]
x,y = [list(i) for i in zip(*xy)]

ans = 0
flag = False

for i in range(N):
    if x[i] == y[i]:
        ans +=1
    elif ans >= 3:
        flag = True
        ans = 0
    else:
        ans = 0
        
if ans >= 3  or flag ==True:
    print("Yes")
    
else:
    print("No")

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

xy = [map(int,input().split()) for _ in range(N)]
x,y = [list(i) for i in zip(*xy)]

ans = 0

for i in range(N):
    if x[i] == y[i]:
        ans +=1
    elif ans >= 3:
        flag = True
    else:
        ans = 0
        
if ans >= 3 or flag ==True:
    print("Yes")
    
else:
    print("No")

Fixed submission:
N = int(input())

xy = [map(int,input().split()) for _ in range(N)]
x,y = [list(i) for i in zip(*xy)]

ans = 0
flag = False

for i in range(N):
    if x[i] == y[i]:
        ans +=1
    elif ans >= 3:
        flag = True
        ans = 0
    else:
        ans = 0
        
if ans >= 3  or flag ==True:
    print("Yes")
    
else:
    print("No")