Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())

if (K%10) % 2 == 0:
    print(-1)

elif (K%10) % 5 == 0:
    print(-1)
else:
    num = 7
    for i in range(K):
        if num % K == 0:
            print(str(i+1))
            break
        num = num *10 + 7
    else:
        print(-1)


Fixed submission:
K = int(input())

t = 7
for i in range(K):
    if t % K == 0:
        print(i + 1)
        break
    t = (t * 10 + 7) % K
else:
    print(-1)

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

if (K%10) % 2 == 0:
    pass
    print(-1)

elif (K%10) % 5 == 0:
    pass
    print(-1)
else:
    num = 7
    for i in range(K+1):
        if num % K == 0:
            print(str(i+1))
            break
        num = num *10 + 7
    else:
        print(-1)



Fixed submission:
K = int(input())

t = 7
for i in range(K):
    if t % K == 0:
        print(i + 1)
        break
    t = (t * 10 + 7) % K
else:
    print(-1)

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

if (K%10) % 2 == 0:
    pass
    print(-1)

elif (K%10) % 5 == 0:
    pass
    print(-1)
else:
    num = 7
    for i in range(1000000):
        if num % K == 0:
            print(str(i+1))
            break
        num = num *10 + 7
    else:
        print(-1)



Fixed submission:
K = int(input())

t = 7
for i in range(K):
    if t % K == 0:
        print(i + 1)
        break
    t = (t * 10 + 7) % K
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
N,M,K = map(int,input().split())
a = list(map(int,input().split()))	
b = list(map(int,input().split()))
A = [0]
B = [0]
A.extend(a)
B.extend(b)
time = sum(A)
ai = len(A)-1
bi = 0
con = 0
flg = None
count = 0
if len(a) == 1 or len(b)==1:
    time = 0
    while True:
        if len(a) == 0 and len(b)==0:
            break
        elif len(a) == 0:
            time += b[0]
            b.pop(0)
        elif len(b) == 0:
            time += a[0]
            a.pop(0)
        elif a[0] > b[0]:
            time += b[0]
            b.pop(0)
        else:
            time += a[0]
            a.pop(0)   
        if time >K:
            break
        count += 1
    print(count)
else:
    while True:
        #print("---------")
        #print(str(ai)+":"+str(bi))
        if time > K:
            if flg is not None:
                con = max(con,flg-1)
                flg = None
            
            if ai == 0:
                break
            time -=A[ai]
            ai -= 1
        else:
            #print("b")
            flg = ai+bi
            time +=B[bi]
            bi += 1
            if bi == len(B):
                if time > K:
                    pass
                else:
                    con = max(con,ai+bi-1)
                break
        #print(flg)
    print(con)

Fixed submission:
N,M,K = map(int,input().split())
a = list(map(int,input().split()))	
b = list(map(int,input().split()))

A = [0]
B = [0]
A.extend(a)
B.extend(b)
time = sum(A)
ai = len(A)-1
bi = 0
con = 0
flg = None
count = 0

    

while True:
    #print("---------")
    #print(str(ai)+":"+str(bi))
    if time > K:
        if flg is not None:
            con = max(con,flg-1)
            flg = None
        
        if ai == 0:
            break
        time -=A[ai]
        ai -= 1
    else:
        #print("b")
        flg = ai+bi
        time +=B[bi]
        bi += 1
        if bi == len(B):
            if time > K:
                if flg is not None:
                    con = max(con, flg-1)
                pass
            else:
                con = max(con,ai+bi-1)
            break
    #print(flg)
print(con)
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(3000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1

Fixed submission:
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(5000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))-1000
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(10000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1

Fixed submission:
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(5000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))-1000
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(5000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1

Fixed submission:
X = int(input())
Acount = 0
Bcount = 0
di= {}
def func(i):
    return i**5
for i in range(5000):
    di[str(func(i))] = str(i)
preA = int(X **(1/5))-1000
while True:
    funcA = preA**5
    if funcA-X>=0 and str(funcA-X) in di.keys():
        print(str(preA)+" "+di[str(funcA-X)])
        break
    elif X-funcA>= 0 and str(X-funcA) in di.keys():
        print(str(preA)+" -"+di[str(X-funcA)])
        break
    preA += 1
Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
li = [0]*(N-1)
for i in range(0,N-1):
    for j in range(i+1,N):
        dis = min(j-i,abs(j-(X-1))+1+abs(i-(Y-1)),abs(i-(X-1))+1+abs(j-(Y-1)))
        li[dis-1] += 1
for ans in li:
    print(ans)

Fixed submission:
N,X,Y = map(int,input().split())
li = [0]*(N-1)
for i in range(0,N-1):
    for j in range(i+1,N):
        dis = min(j-i,abs(i-(X-1))+1+abs(j-(Y-1)))
        li[dis-1] += 1
for ans in li:
    print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

H,W,K = map(int,input().split())
choco = [input() for _ in range(H)]
num =(2**(H-1))

white_count = list()
min_div_count =10**6
for i in range(num):
    bin_str = format(i, 'b')
    zero = str()
    if H != len(bin_str):
        for i in range(H-len(bin_str)):
            zero += "0"
        bin_str = zero + bin_str
    white_count = [0 for s in bin_str if s == "1"]
    white_count.append(0)
    div_count=len(white_count)-1
    j = 0
    while j < W:
        block_count = 0
        for k in range(len(bin_str)):
            if bin_str[k] == "1":
                block_count += 1
            white_count[block_count] += int(choco[k][j])
            if white_count[block_count] > K:
                div_count +=1
                white_count = [0 for s in bin_str if s == "1"]
                white_count.append(0)
                break
        else:
            j+=1
    if min_div_count > div_count:
        min_div_count = div_count
print(min_div_count)

Fixed submission:
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,m = map(int,input().split())
ans = 0
if n >= 2:
    ans += combinations_count(n, 2)
if m >= 2:
    ans += combinations_count(m, 2)
print(str( ans ))
Buggy python submission (verdict: Time Limit Exceeded):
s=input()
q = int(input())
toggle = "ok"


for i in range(q):
    si = input().split()
    if si[0] == "1":
        if toggle == "ok":
            toggle = "re"
        else:
            toggle = "ok"
    else:
        if si[1] == "1" and toggle == "ok":
            s = si[2] + s
        elif si[1] == "2" and toggle == "re":
            s = si[2] + s
        elif si[1] == "1" and toggle == "re":
            s = s + si[2]
        elif si[1] == "2" and toggle == "ok":
            s = s + si[2]
if toggle == "ok":
    print(s)
else :
    print(s[::-1])    


Fixed submission:
s=input()
q = int(input())
toggle = "ok"
top = ""
last = ""

for i in range(q):
    si = input().split()
    if si[0] == "1":
        if toggle == "ok":
            toggle = "re"
        else:
            toggle = "ok"
    else:
        if si[1] == "1" and toggle == "ok":
            top += si[2] 
        elif si[1] == "2" and toggle == "re":
            top += si[2] 
        elif si[1] == "1" and toggle == "re":
            last += si[2]
        elif si[1] == "2" and toggle == "ok":
            last += si[2]
if toggle == "ok":
    retop = ''.join(list(reversed(top)))
    print(retop, end="")
    print(s,end="")
    print(last,end="")
else:
    relast = ''.join(list(reversed(last)))
    print(relast,end="")
    res = ''.join(list(reversed(s)))
    print(res,end="")
    print(top,end="")

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
q = int(input())
toggle = "ok"


for i in range(q):
    si = input().split()
    if si[0] == "1":
        if toggle == "ok":
            toggle = "re"
        else:
            toggle = "ok"
    else:
        if si[1] == "1" and toggle == "ok":
            s = si[2] + s
        elif si[1] == "2" and toggle == "re":
            s = si[2] + s
        elif si[1] == "1" and toggle == "re":
            s = s + si[2]
        elif si[1] == "2" and toggle == "ok":
            s = s + si[2]
if toggle == "ok":
    print(s)
else :
    print(s[::-1])    


Fixed submission:
s=input()
q = int(input())
toggle = "ok"
top = ""
last = ""

for i in range(q):
    si = input().split()
    if si[0] == "1":
        if toggle == "ok":
            toggle = "re"
        else:
            toggle = "ok"
    else:
        if si[1] == "1" and toggle == "ok":
            top += si[2] 
        elif si[1] == "2" and toggle == "re":
            top += si[2] 
        elif si[1] == "1" and toggle == "re":
            last += si[2]
        elif si[1] == "2" and toggle == "ok":
            last += si[2]
if toggle == "ok":
    retop = ''.join(list(reversed(top)))
    print(retop, end="")
    print(s,end="")
    print(last,end="")
else:
    relast = ''.join(list(reversed(last)))
    print(relast,end="")
    res = ''.join(list(reversed(s)))
    print(res,end="")
    print(top,end="")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
di = dict()
for i in range(N):
    s = input()
    if s in di:
        di[s] += 1
    else:
        di[s] = 0

maxlist = [kv for kv in di.items() if kv[1] == max(di.values())]
for d in sorted(maxlist):
    print(d[0])

Fixed submission:
import collections
import itertools
N=int(input())
di = dict()
l = list()
for i in range(N):
    l.append( input())

c = collections.Counter(l)
ct = c.most_common()
m = ct[0][1]
li = list()
for t in ct:
    if m == t[1]:
        li.append(t[0]) 
    else:
        break
lis = sorted(li)
for s in lis:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
di = dict()
for i in range(N):
    s = input()
    if s in di:
        di[s] += 1
    else:
        di[s] = 0

maxlist = [kv for kv in di.items() if kv[1] == max(di.values())]
dic2 = sorted(maxlist)
for d in dic2:
    print(d[0])


Fixed submission:
import collections
import itertools
N=int(input())
di = dict()
l = list()
for i in range(N):
    l.append( input())

c = collections.Counter(l)
ct = c.most_common()
m = ct[0][1]
li = list()
for t in ct:
    if m == t[1]:
        li.append(t[0]) 
    else:
        break
lis = sorted(li)
for s in lis:
    print(s)
Buggy python submission (verdict: Runtime Error):
s = input()
sr = s.reverse()
count = 0
for i in range(len(sr)-1):
    if sr[i]>=5:
        count += 10-sr[i]
        sr[i+1] += 1
    else:
        count += sr[i]
if sr[len(sr)-1] >=5:
    count += 1
    count += 10- sr[len(sr)-1]
else:
    count += sr[len(sr)-1]
print(count)

Fixed submission:
N = list(input())
Y = [0]
for i in N:
    Y.append(int(i))
dp = [0 for i in range(len(N)+1)]
dp2 = [10 for i in range(len(N)+1)]
for i in range(1,len(N)+1):
    dp[i] = min(dp[i-1] + Y[i],dp2[i-1] + Y[i])
    dp2[i] = min(dp[i-1] + 1 + 10 - Y[i],dp2[i-1] - 1 + 10 - Y[i])
    #print(str(dp[i])+":" +str(dp2[i]))
ans = min(dp[-1],dp2[-1])
#print(dp,dp2)
print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
li = list(map(int,input().split()))	
num = {}
for l in li:
    print(num)
    if str(l) not in num  :
        num[l] = 1
    else:
        print("NO")
        break
else:
    print("YES")



Fixed submission:
N=int(input())
li = list(map(int,input().split()))	
num = {}
for l in li:
    if str(l) not in num :
        num[str(l)] = 1
    elif num[str(l)]==1:
        print("NO")
        break
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
N=int(input())
li = list(map(int,input().split()))	
num = [0]*100000000
for l in li:
    if num[l] == 0:
        num[l] = 1
    elif num[l] == 1:
        print("NO")
        break
else:
    print("YES")





Fixed submission:
N=int(input())
li = list(map(int,input().split()))	
num = {}
for l in li:
    if str(l) not in num :
        num[str(l)] = 1
    elif num[str(l)]==1:
        print("NO")
        break
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
di = {}
pe = 0
ac = 0
for i in range(M):
    inp = input().split(" ")
    if inp[1] == "WA":
        if inp[0] in di:
            if di[inp[0]] >= 1:
                di[inp[0]] += 1
        else:
            di[inp[0]] = 1
            
            
    else:
        pe += di[inp[0]]
        di[inp[0]] = 0
for v in di.values():
    if v == 0:
        ac += 1
print(str(pe)+" "+str(ac))

Fixed submission:
N,M = map(int,input().split())
di = {}
pe = 0
ac = 0
for i in range(M):
    inp = input().split(" ")
    if inp[1] == "WA":
        if inp[0] in di:
            if di[inp[0]] >= 1:
                di[inp[0]] += 1
        else:
            di[inp[0]] = 1
            
            
    else:
        if inp[0] in di:
            pe += di[inp[0]]
            di[inp[0]] = 0
        di[inp[0]] = 0
        
for v in di.values():
    if v == 0:
        ac += 1
print(str(ac)+" "+str(pe))
Buggy python submission (verdict: Runtime Error):
a,b,k = map(int,input().split())
ansa = 0
if a + b <k:
    print("0 0")
elif a < k:
    ansa =0
    ansb = b-(k-a)
else:
    ansa = a-k
    ansb = b
print(str(ansa)+" "+str(ansb))

Fixed submission:
a,b,k = map(int,input().split())
ansa = 0
if a + b <k:
    print("0 0")
elif a < k:
    ansa =0
    ansb = b-(k-a)
    print(str(ansa)+" "+str(ansb))
else:
    ansa = a-k
    ansb = b
    print(str(ansa)+" "+str(ansb))
Buggy python submission (verdict: Runtime Error):
import math

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

print(str((a * b) // math.gcd(a, b)))


Fixed submission:

def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z



def lcm(m,n):
    return int(m * n/gcd(m,n))

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

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

a = int(input())
b = int(input())

print(str((a * b) // math.gcd(a, b)))

Fixed submission:

def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z



def lcm(m,n):
    return int(m * n/gcd(m,n))

a,b = map(int,input().split())
print(lcm(a,b))
Buggy python submission (verdict: Runtime Error):
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [*s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)


Fixed submission:
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [c  for c in s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)

Buggy python submission (verdict: Runtime Error):
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [*s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)

Fixed submission:
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [c  for c in s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().split()))
count = 0
L.sort()
for i in range(N-2):
    for j in range(i+1,N-1):
        maxi = L[i] + L[j]
        mini = abs(L[i] - L[j]) 
        for k in range(j+1,N):
            if maxi > L[k] > mini:
                count += 1 
print(count)


Fixed submission:
n = int(input())
S = input()
ans = S[0]
count = 1
for i in range(1,n):
    if S[i] != ans[-1]:
        ans += S[i]
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import collections
N = int(input())
stock = dict()
ans = 0
for i in range(N):
    c="".join(sorted(input()))
    for k, v in stock.items():
        if c == k:
            ans += v
            stock[k] += 1
            break
    else:
        stock[c] = 1
print(ans)

Fixed submission:
import collections
N = int(input())
stock = dict()
ans = 0
for i in range(N):
    c="".join(sorted(input()))
    if c in stock:
        ans += stock[c]
        stock[c] += 1
    else:
        stock[c] = 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
N = int(input())
stock = dict()
ans = 0
for i in range(N):
    s = list(input())
    s.sort()
    c = str(s)
    for k, v in stock.items():
        #print(sto)
        #print(c)
        #print(sto == c)
        if c == k:
            ans += v
            stock[k] += 1
            break
    else:
        stock[c] = 1
print(ans)

Fixed submission:
import collections
N = int(input())
stock = dict()
ans = 0
for i in range(N):
    c="".join(sorted(input()))
    if c in stock:
        ans += stock[c]
        stock[c] += 1
    else:
        stock[c] = 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
N = int(input())
stock = list()
ans = 0
for i in range(N):
    s = list(input())
    c  = collections.Counter(s)
    for sto in stock:
        #print(sto)
        #print(c)
        #print(sto == c)
        if c == sto:
            ans +=1
    
    stock.append(collections.Counter(s))
print(ans)

Fixed submission:
import collections
N = int(input())
stock = dict()
ans = 0
for i in range(N):
    c="".join(sorted(input()))
    if c in stock:
        ans += stock[c]
        stock[c] += 1
    else:
        stock[c] = 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
        for l in range(k+1):
            if i + j + l == s:
                count += 1
print(count)


Fixed submission:
k,s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
        if 0<=s - i - j < k+1:
            count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
from math import gcd
def lcm(arr, n) -> (int):
    ans = arr[0]
    for i in range(1, n):
        ans = ((arr[i] * ans) // gcd(arr[i], ans))
    return int(ans)

n, m = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
v = []
for x in arr:
    y = x
    cnt = 0
    while y % 2 == 0:
        y = y // 2
        cnt += 1
    v.append(cnt)
mx = max(v)
mn = min(v)
if mx != mn:
    print(0)
else:
    strt = lcm(arr, n) // 2
    if strt > m:
        print(0)
    else:
        print(int(1 + int((m - strt)) // int((2 * strt))))


Fixed submission:
from fractions import gcd
def lcm(arr, n):
    ans = arr[0]
    for i in range(1, n):
        ans = ((arr[i] * ans) // gcd(arr[i], ans))
    return int(ans)

n, m = [int(x) for x in raw_input().split()]
arr = [int(x) for x in raw_input().split()]
v = []
for x in arr:
    y = x
    cnt = 0
    while y % 2 == 0:
        y = y // 2
        cnt += 1
    v.append(cnt)
mx = max(v)
mn = min(v)
if mx != mn:
    print(0)
else:
    strt = lcm(arr, n) // 2
    if strt > m:
        print(0)
    else:
        print(int(1 + int((m - strt)) // int((2 * strt))))

Buggy python submission (verdict: Runtime Error):
def lcm(arr, n):
    ans = arr[0]
    for i in range(1, n):
        ans = ((arr[i] * ans) // gcd(arr[i], ans))
    return ans

from math import gcd
n, m = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
v = []
for x in arr:
    y = x
    cnt = 0
    while x % 2 == 0:
        x = x // 2
        cnt += 1
    v.append(cnt)
mx = max(v)
mn = min(v)
if mx != mn:
    print(0)
else:
    strt = int(lcm(arr, n)) // 2
    if strt > m:
        print(0)
    else:
        print(1 + int((m - strt)) // int((2 * strt)))


Fixed submission:
from fractions import gcd
def lcm(arr, n):
    ans = arr[0]
    for i in range(1, n):
        ans = ((arr[i] * ans) // gcd(arr[i], ans))
    return int(ans)

n, m = [int(x) for x in raw_input().split()]
arr = [int(x) for x in raw_input().split()]
v = []
for x in arr:
    y = x
    cnt = 0
    while y % 2 == 0:
        y = y // 2
        cnt += 1
    v.append(cnt)
mx = max(v)
mn = min(v)
if mx != mn:
    print(0)
else:
    strt = lcm(arr, n) // 2
    if strt > m:
        print(0)
    else:
        print(int(1 + int((m - strt)) // int((2 * strt))))
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 2:
    print(0)
else:
    ans, x = 0, 5
    while(x <= n):
        ans += ((n // x) // 2)
        x *= 5
print(ans)


Fixed submission:
n = int(input())
if n % 2:
    print(0)
else:
    ans, x = 0, 5
    while(x <= n):
        ans += ((n // x) // 2)
        x *= 5
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
a = list(map(int,input().split()))
first = 1
for i in range(k):
    first = first*a[i]
b = [first]
for i in range(n-k):
    b.append(b[i]/a[i]*a[k+i])
    if b[i] < b[i+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
n,k = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n-k):
    if a[i] < a[k+i]:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
x,n = map(int,input().split())
p = list(map(int,input().split()))
i = 0
if n == 0:
    print(x)
else:
    for i in range(101)
        if not x - i in p:
            print(x-i)
            break
        elif not x + i in p:
            print(x+i)
            break
        else:
            i += 1

Fixed submission:
x,n = map(int,input().split())
p = list(map(int,input().split()))
i = 0
if n == 0:
    print(x)
else:
    for i in range(101):
        if not x - i in p:
            print(x-i)
            break
        elif not x + i in p:
            print(x+i)
            break
        else:
            i += 1

Buggy python submission (verdict: Time Limit Exceeded):
x,n = map(int,input().split())
p = list(map(int,input().split()))
i = 0
if n == 0:
    print(x)
else:
    while True:
        if not x - i in p:
            print(x-i)
            break
        elif not x + i in p:
            print(x+i)
        else:
            i += 1

Fixed submission:
x,n = map(int,input().split())
p = list(map(int,input().split()))
i = 0
if n == 0:
    print(x)
else:
    for i in range(101):
        if not x - i in p:
            print(x-i)
            break
        elif not x + i in p:
            print(x+i)
            break
        else:
            i += 1