ZhenlongDai/ACPR huggingface dataset:
Problem: p03156
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
a = len([*filter(lambda x: x<=A,P)])
b = len([*filter(lambda x: A<x<=B,P)])
c = len([*filter(lambda x: B<=x,P)])
print(min(a,b,c))

Failing test case input:
7
5 21
1 21 28 2 7 20 13

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
a = len([*filter(lambda x: x<=A,P)])
b = len([*filter(lambda x: A<x<=B,P)])
c = len([*filter(lambda x: B<x,P)])
print(min(a,b,c))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = map(int, input().split())
P = sorted(set([int(i) for i in input().split()]))
ans = 0
num1 = 0
num2 = 0
num3 = 0

for i in P:
    if i <= A:
        num1 += 1
    elif A+1 <= i <= B:
        num2 += 1
    elif B+1 <= i:
        num3 += 1

print(min(num1, num2, num3))

Failing test case input:
8
3 8
2 5 5 2 13 12 15 20

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int, input().split())
P = sorted([int(i) for i in input().split()])
ans = 0
num1 = 0
num2 = 0
num3 = 0

for i in P:
    if i <= A:
        num1 += 1
    elif A+1 <= i <= B:
        num2 += 1
    elif B+1 <= i:
        num3 += 1

print(min(num1, num2, num3))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

P.sort()


for i in range(N):
    if P[i]>A: break
a = i 
for i in range(a+1,N):
    if P[i]>B: break
b = i - a 


count = min(a, b, N-(b+a))
print(count)



Failing test case input:
7
7 40
-2 8 28 2 5 10 8

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):

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

P.sort()


for i in range(N):
    if P[i]>A: break
a = i 
for i in range(a,N):
    if P[i]>B: break
else:
    i = N
b = i - a 
c = N - i


count = min(a, b, c)
print(count)
Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):








N = int(input())

a = input().rstrip().split(" ")
A = int(a[0])
B = int(a[1])

P = input().rstrip().split(" ")

f = []
for i in range(len(P)):
    if int(P[i]) <= A:
        f.append(int(P[i]))

s = []
for i in range(len(P)):
    if int(P[i]) > A and int(P[i]) <= B:
        s.append(int(P[i]))

t = []
for i in range(len(P)):
    if int(P[i]) > B:
        t.append(int(P[i]))

sum = 0
if f > s:
    if s > t:
        sum = len(t)
    else:
        sum = len(s)
else:
    sum = len(f)

print(sum)


Failing test case input:
8
2 30
0 5 0 3 -2 24 56 0

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):








N = int(input())

a = input().rstrip().split(" ")
A = int(a[0])
B = int(a[1])

P = input().rstrip().split(" ")

f = []
for i in range(len(P)):
    if int(P[i]) <= A:
        f.append(int(P[i]))

s = []
for i in range(len(P)):
    if int(P[i]) > A and int(P[i]) <= B:
        s.append(int(P[i]))

t = []
for i in range(len(P)):
    if int(P[i]) > B:
        t.append(int(P[i]))

sum = 0
if len(f) > len(s):
    if len(s) > len(t):
        sum = len(t)
    else:
        sum = len(s)
elif len(f) > len(t):
    sum = len(t)
else:
    sum = len(f)

print(sum)

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = [int(_) for _ in input().split()]
P =  [int(_) for _ in input().split()]

x = len([i for i in P if i <= A])
y = len([i for i in P if i <= B and i >= A+1])
z = len([i for i in P if i <= B])

if x == 0 or y == 0 or z == 0:
    print(0)
else :
    print(min([x,y,z]))
    print(x, y,z)

Failing test case input:
7
5 25
0 21 28 2 7 20 13

Expected output:
1


Actual output:
2
2 4 6


Fixed submission (verdict: Accepted):
N = int(input())
A, B = [int(_) for _ in input().split()]
P =  [int(_) for _ in input().split()]
x = len([i for i in P if i <= A])
y = len([i for i in P if i <= B and i >= A+1])
z = len([i for i in P if i >= B + 1])
 
if x != 0 and y != 0 and z != 0:
    print(min([x,y,z]))
else :
    print(0)
Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):








N = int(input())

a = input().rstrip().split(" ")
A = int(a[0])
B = int(a[1])

P = input().rstrip().split(" ")

f = []
for i in range(len(P)):
    if int(P[i]) <= A:
        f.append(int(P[i]))

s = []
for i in range(len(P)):
    if int(P[i]) > A and int(P[i]) <= B:
        s.append(int(P[i]))

t = []
for i in range(len(P)):
    if int(P[i]) > B:
        t.append(int(P[i]))

sum = 0
if len(f) > len(s):
    if len(s) > len(t):
        sum = len(t)
    else:
        sum = len(s)
else:
    sum = len(f)

print(sum)


Failing test case input:
8
3 16
4 5 0 2 13 12 15 19

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):








N = int(input())

a = input().rstrip().split(" ")
A = int(a[0])
B = int(a[1])

P = input().rstrip().split(" ")

f = []
for i in range(len(P)):
    if int(P[i]) <= A:
        f.append(int(P[i]))

s = []
for i in range(len(P)):
    if int(P[i]) > A and int(P[i]) <= B:
        s.append(int(P[i]))

t = []
for i in range(len(P)):
    if int(P[i]) > B:
        t.append(int(P[i]))

sum = 0
if len(f) > len(s):
    if len(s) > len(t):
        sum = len(t)
    else:
        sum = len(s)
elif len(f) > len(t):
    sum = len(t)
else:
    sum = len(f)

print(sum)

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a, b = map(int, input().split())
p = list(map(int,input().split()))
x = 0
y = 0
z = 0
        
for i in range(n):
  if p[i] <= a:
    x = x + 1
  if a < p[i] <= b:
    y = y + 1
  else:
    z = z + 1

print(min(x, y, z))

Failing test case input:
8
3 14
2 5 3 2 13 12 15 22

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))
x = 0
y = 0
z = 0
        
for i in range(n):
  if p[i] <= a:
    x = x + 1
  if a < p[i] <= b:
    y = y + 1
  if b < p[i]:
    z = z + 1

print(min(x, y, z))

Problem: p03156
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    n=int(input())
    a,b=map(int, input().split())
    p = sorted(map(int,input().split()))
    A,B,C = -1,-1,-1
    for i in range(n):
        if A == -1 and p[i] > a:
            A = i
        elif B == -1 and p[i] > b:
            B = i-A
            C = n - A - B
            break
    print(min(A,B,C))
    
if __name__ == "__main__":
    main()

Failing test case input:
3
8 0
5 1 2

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
def main():
    n=int(input())
    a,b=map(int, input().split())
    p = map(int,input().split())
    A,B,C = 0, 0, 0
    for pp in p:
        if pp <= a:
            A += 1
        elif pp <= b:
            B += 1
        else:
            C += 1
    print(min(A,B,C))
    
if __name__ == "__main__":
    main()
Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import bisect
n = int(input())
a,b = map(int,input().split())
p = list(map(int,input().split()))
p.sort()
x = bisect.bisect_left(p,a)
y = bisect.bisect_left(p,b)
one = p[:x]
two = p[x:y]
three = p[y:]
print(min(len(one),len(two),len(three)))

Failing test case input:
3
5 6
5 6 10

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
import bisect
n = int(input())
a,b = map(int,input().split())
p = list(map(int,input().split()))
p.sort()
x = bisect.bisect_left(p,a+1)
y = bisect.bisect_left(p,b+1)
one = p[:x]
two = p[x:y]
three = p[y:]
print(min(len(one),len(two),len(three)))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
uA = []
oAuB = []
oB = []
for i in range(N):
    if P[i] <= A:
        uA.append(P[i])
    if A < P[i] and P[i] <= B:
        oAuB.append(P[i])
    if B < P[i]:
        oB.append(P[i])
print(len(uA) & len(oAuB) & len(oB))


Failing test case input:
7
7 40
-3 8 48 2 5 10 5

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
uA = []
oAuB = []
oB = []
for i in range(N):
    if P[i] <= A:
        uA.append(P[i])
    if A+1 <= P[i] and P[i] <= B:
        oAuB.append(P[i])
    if B+1 <= P[i]:
        oB.append(P[i])
print(min(len(uA), len(oAuB), len(oB)))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))

result = ''
for i in range(N):
    if P[i] <= A:
        result += 'A'
    if A < P[i] and P[i] <= B:
        result += 'AB'
    if B < P[i]:
        result += 'B'
print(result.count('AABB'))


Failing test case input:
8
3 14
4 5 0 2 13 12 15 19

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
uA = []
oAuB = []
oB = []
for i in range(N):
    if P[i] <= A:
        uA.append(P[i])
    if A+1 <= P[i] and P[i] <= B:
        oAuB.append(P[i])
    if B+1 <= P[i]:
        oB.append(P[i])
print(min(len(uA), len(oAuB), len(oB)))

Problem: p03156
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
a,b = map(int, input().split())
p = list(map(int, input().split()))

cnt=[0,0,0]
for poi in p:
  if poi <= a:
  	cnt[0]+=1
  elif poi <=b:
    cnt[1]+=1
  else:
    cnt[2]+=1
print(max(cnt))

Failing test case input:
8
2 16
4 5 0 2 13 12 28 19

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
a,b = map(int, input().split())
p = list(map(int, input().split()))

cnt=[0,0,0]
for poi in p:
  if poi <= a:
  	cnt[0]+=1
  elif poi <=b:
    cnt[1]+=1
  else:
    cnt[2]+=1
print(min(cnt))
Problem: p03156
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a,b, = map(int,input().split())
p = list(map(int,input().split()))
cnt = 0
num = 1
for i in range(n):
    if num == 1 and p[i] <= a:
        num = 2
    elif num == 2 and a+1 <= p[i] <= b:
        num =3
    elif num == 3 and p[i] >= b+1:
        cnt += 1
        num = 1
print(cnt)

Failing test case input:
8
2 16
4 5 0 2 13 12 28 19

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a,b, = map(int,input().split())
p = list(map(int,input().split()))
cnt = [0]*3
for i in range(n):
    if p[i] <= a:
        cnt[0] += 1
    elif p[i] <= b:
        cnt[1] += 1
    else:
        cnt[2] += 1
print(min(cnt))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
A, B = map(int, input().split())
P = list(map(int, input().split()))

q1 = [p for p in P if p <= A]
q2 = [p for p in P if A < p and p <= B]
q3 = [p for p in P if p < B]

print(min(len(q) for q in (q1, q2, q3)))


Failing test case input:
7
7 40
-2 30 28 2 4 10 13

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
N = input()
A, B = map(int, input().split())
P = list(map(int, input().split()))

q1 = len([p for p in P if p <= A])
q2 = len([p for p in P if A < p and p <= B])
q3 = len([p for p in P if p > B])

print(min(q1, q2, q3))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a, b = map(int, input().split())
li_p = list(map(int, input().split()))

print(
    min(
        len(list(filter(lambda x: x <= a, li_p))),
        len(list(filter(lambda x: (a + 1) <= x <= b, li_p))),
        len(list(filter(lambda x: b <= x, li_p))),
    )
)



Failing test case input:
7
5 21
1 21 28 2 7 20 13

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a, b = map(int, input().split())
li_p = list(map(int, input().split()))

print(
    min(
        len(list(filter(lambda x: x <= a, li_p))),
        len(list(filter(lambda x: (a + 1) <= x <= b, li_p))),
        len(list(filter(lambda x: (b + 1) <= x, li_p))),
    )
)

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = list(map(int, input().split()))
P = list(map(int, input().split()))

P.sort()

c1, c2, c3 = 0, 0, 0
for i, p in enumerate(P, 1):
    if p <= A:
        c1 = i
    if (p > A) and (p <= B):
        c2 = i
    if p > B:
        c3 = i

print(c1, c2, c3)
print(min((c1), (c2 - c1), (c3 - c2)))


Failing test case input:
8
2 30
0 5 0 3 -2 24 28 0

Expected output:
0


Actual output:
4 8 0
-8


Fixed submission (verdict: Accepted):
N = int(input())
A, B = list(map(int, input().split()))
P = list(map(int, input().split()))

P.sort()

c1, c2, c3 = 0, 0, 0
for i, p in enumerate(P, 1):
    if p <= A:
        c1 = i
    if (p > A) and (p <= B):
        c2 = i
    if p > B:
        c3 = i


if c1 <= c2 <= c3:
    print(min((c1), (c2 - c1), (c3 - c2)))
else:
    print(0)
Problem: p03156
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin
N = int(stdin.readline().rstrip())
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
P = [int(_) for _ in stdin.readline().rstrip().split()]
a, ab, b = 0, 0, 0
for p in P:
    if p <= A:
        a += 1
    elif A < p <= B:
        ab += 1
    elif B < p:
        b += 1
print(min(a, ab, p))

Failing test case input:
7
7 40
-2 8 28 2 5 10 13

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
from sys import stdin
N = int(stdin.readline().rstrip())
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
P = [int(_) for _ in stdin.readline().rstrip().split()]
a, ab, b = 0, 0, 0
for p in P:
    if p <= A:
        a += 1
    elif A < p <= B:
        ab += 1
    elif B < p:
        b += 1
print(min(a, ab, b))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a, b = map(int, input().split())
p = sorted([int(i) for i in input().split()])

gte_a = len(p)
for i,v in enumerate(p):
    if a + 1 <= v <= b:
        gte_a = i
        break

gte_b = len(p)

for i,v in enumerate(p[gte_a:]):
    if b + 1 <= v:
        gte_b = i
        break

print(min(map(len, (p[:gte_a],p[gte_a:gte_b+1],p[gte_b+1:]))))

Failing test case input:
8
3 14
2 5 0 2 13 12 15 22

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a, b = map(int, input().split())
p = sorted([int(i) for i in input().split()])

gte_a = len(p)
for i,v in enumerate(p):
    if a + 1 <= v <= b:
        gte_a = i
        break

gte_b = len(p)

for i,v in enumerate(p):
    if b + 1 <= v:
        gte_b = i
        break

s = range(0, gte_a)
t = range(gte_a, gte_b)
u = range(gte_b, len(p))
print(min(map(len, (s,t,u))))
Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
n=nCast(input())
ab=nCast(input().split())
p=nCast(input().split())
x,y,z=0,0,0
for number in p:
    if number<ab[0]:
        x+=1
    elif number>ab[1]:
        z+=1
    else:
        y+=1
print(min(x,y,z))


Failing test case input:
8
2 16
4 5 0 2 13 12 28 19

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import math
def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:

            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input().split())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
n=nCast(input())
ab=nCast(input().split())
p=nCast(input().split())
x,y,z=0,0,0
for number in p:
    if number<=ab[0]:
        x+=1
    elif number>ab[1]:
        z+=1
    else:
        y+=1
print(min(x,y,z))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))

result = ''
for i in range(N):
    if P[i] <= A:
        result += '<=A'
    if A < P[i] and P[i] <= B:
        result += '|A<B<=|'
    if B < P[i]:
        result += '<B'
print(result.count('<=A|A<B<=|<B'))


Failing test case input:
8
3 14
2 5 5 2 13 12 15 20

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int, input().split())
P = list(map(int, input().split()))
uA = []
oAuB = []
oB = []
for i in range(N):
    if P[i] <= A:
        uA.append(P[i])
    if A+1 <= P[i] and P[i] <= B:
        oAuB.append(P[i])
    if B+1 <= P[i]:
        oB.append(P[i])
print(min(len(uA), len(oAuB), len(oB)))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))

first, second, third = 0, 0, 0
for i in p:
    if i <= a:
        first += 1
    if a+1 <= i <= b:
        second += 1
    if b <= i:
        third += 1

print(min([first, second, third]))

Failing test case input:
7
5 21
1 21 28 2 7 20 12

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))

first, second, third = 0, 0, 0
for i in p:
    if i <= a:
        first += 1
    if a+1 <= i <= b:
        second += 1
    if b+1 <= i:
        third += 1

print(min([first, second, third]))
Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

P.sort()


for i in range(N):
    if P[i]>A: break
a = i 
for i in range(a+1,N):
    if P[i]>B: break
b = i - a 
c = N - i


count = min(a, b, c)
print(count)



Failing test case input:
8
2 30
0 5 0 3 0 24 28 0

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):

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

P.sort()


for i in range(N):
    if P[i]>A: break
a = i 
for i in range(a,N):
    if P[i]>B: break
else:
    i = N
b = i - a 
c = N - i


count = min(a, b, c)
print(count)

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
A, B = map(int, input().split())
P = list(map(int, input().split()))

q1 = [p for p in P if p <= A]
q2 = [p for p in P if A < p and p <= B]
q3 = [p for p in P if p < B]

print(min(len(q) for q in (q1, q2, q3)))

Failing test case input:
8
2 30
0 6 0 3 -2 26 56 -1

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N = input()
A, B = map(int, input().split())
P = list(map(int, input().split()))

q1 = len([p for p in P if p <= A])
q2 = len([p for p in P if A < p and p <= B])
q3 = len([p for p in P if p > B])

print(min(q1, q2, q3))

Problem: p03156
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A, B = map(int,input().split())
P = list(map(int,input().split()))

cnt = 0
for i in range(N-2):
  if(P[i] <= A):
    if(A+1 <= P[i+1] <= B):
      if(P[i+2] >= B+1):
        cnt += 1
print(cnt)

Failing test case input:
8
3 14
2 5 0 2 13 12 15 22

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A, B = map(int,input().split())
P = list(map(int,input().split()))
a, b, c = 0, 0, 0
for p in P:
  if p <= A:
    a += 1
  elif A+1 <= p <= B:
    b += 1
  elif p >= B+1:
    c += 1
print(min(a, b, c))

Problem: p03156
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N=int(input())
A,B=map(int,input().split())
p = list(map(int,input().split()))
c=[]
d=[]
e=[]
for i in range(N):
    if p[i]<=A:
        c.append(p[i])
    if A+1 <= p[i] <= B:
        d.append(p[i])
    if B+1 <= p[i]:
        e.append(p[i])

print(len(min(c,d,e)))


Failing test case input:
8
2 30
0 5 0 3 -2 24 56 0

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):
N=int(input())
A,B=map(int,input().split())
p = list(map(int,input().split()))
c=[]
d=[]
e=[]
for i in range(N):
    if p[i]<=A:
        c.append(p[i])
    if A+1 <= p[i] <= B:
        d.append(p[i])
    if B+1 <= p[i]:
        e.append(p[i])

        
print(min(len(c),len(d),len(e)))
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def f(n):
  d = 2
  ans = 0
  while n>d:
    d*=5
    n
    ans += n
  return ans

x = int(input())
print(0 if x%2!=0 else f(x))


Failing test case input:
1110001100010101100

Expected output:
138750137501262626


Actual output:
28860028600262628600


Fixed submission (verdict: Accepted):
def f(n):
  ans = 0
  while n>0:
    n
    ans+=n
  return ans

x = int(input())
print(0 if x%2 else f(x

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n=int(input())
if n%2==1:
    print(0)
else:
    n=round(n/2)
    k=0
    while n>0:
        k+=math.floor(n/5)
        n=math.floor(n/5)
    print(k)


Failing test case input:
1100001010110001000

Expected output:
137500126263750114


Actual output:
137500126263750110


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    n=(n
    k=0
    while n>0:
        k+=(n
        n=(n
    print(k)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/5) + aaa(k/5)

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A),bbb(A)+int(A/2)]))

Failing test case input:
1100011010110101000

Expected output:
137501376263762614


Actual output:
137501376263762610


Fixed submission (verdict: Accepted):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k 
  if k == 0:
    return 0
  return int(k

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n/((5**i)*2))
        if int(n/(5**i))==0:
            break
        
    print(c)

Failing test case input:
1101110111010101000

Expected output:
137638763876262612


Actual output:
137638763876262608


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n/((5**i)*2))
        if int(n/((5**i)*2))==0:
            break
        
    print(c)

Failing test case input:
1100001010010001100

Expected output:
137500126251250126


Actual output:
137500126251250130


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

if N % 2:
    print(0)
else:
    ans = 0
    X = 10
    while X<N:
        ans += int(N/X)
        X *=5
    print(ans)

Failing test case input:
1010100010011101000

Expected output:
126262501251387614


Actual output:
126262501251387610


Fixed submission (verdict: Accepted):
N = int(input())

if N % 2:
    print(0)
else:
    ans = 0
    X = 10
    while X<=N:
        ans += int(N
        X *= 5
    print(ans)

Problem: p02833
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

if N % 2 == 1:
    print(0)
else:
    n = 0
    i = 1
    while True:
        n += N 
        if N < 10**i:
            break
        i += 1
    print(n)


Failing test case input:
1101011010010101100

Expected output:
137626376251262624


Actual output:
20919209190191920900


Fixed submission (verdict: Accepted):
N = int(input())

if N % 2 == 1:
    print(0)
else:
    n = 0
    i = 1
    while True:
        if N < 2*5**i:
            break
        n += (N 
        i += 1
    print(n)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

if N % 2:
    print(0)
else:
    ans = 0
    X = 10
    while X<=N:
        ans += int(N/X)
        X *= 5
    print(ans)

Failing test case input:
1010000100010001000

Expected output:
126250012501250114


Actual output:
126250012501250110


Fixed submission (verdict: Accepted):
N = int(input())

if N % 2:
    print(0)
else:
    ans = 0
    X = 10
    while X<=N:
        ans += int(N
        X *= 5
    print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n == 0 or n == 1:
    print("1")
elif n % 2 == 1:
    print("0")
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m 
      count += d
      i += 1
    print(int(count))

Failing test case input:
1101110010010001100

Expected output:
137638751251250126


Actual output:
13763875125125014400


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m 
      count += d
      i += 1
    print(int(count))
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



from math import floor

if __name__=='__main__':
  n = int(input())

  if n%2 != 0:
    
    print(0)
  else:
    
    count_5 = 0
    for i in range(1, 100):
      if n < pow(5, i)*2:
        break
      count_5 += floor( n / (pow(5, i)*2) )
    print(count_5)

Failing test case input:
1101100010010101100

Expected output:
137637501251262624


Actual output:
137637501251262628


Fixed submission (verdict: Accepted):



def main(n):
  if n%2 != 0:
    
    return 0
  else:
    
    count_5 = 0
    for i in range(1, 100):
      denominator = (5**i)*2
      if n < denominator:
        break
      count_5 += (n 
    return count_5

if __name__=='__main__':
  n = int(input())
  print(main(n))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
ans = 0
if int(n) % 2 != 0:
    print(0)
else:
    ans = 0
    cnt = 0
    for i in range(1, len(n) + 1):
        ans += cnt * int(n[-(i)])
        cnt = cnt * 10 + 1
print(ans)

Failing test case input:
1010100010010100010

Expected output:
126262501251262490


Actual output:
112233334445566667


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
if n % 2 != 0:
    print(0)
    exit()
else:
    ans = 0
    cnt = 10
    while True:
        if n 
            break
        ans += n 
        cnt = cnt * 5
print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def f(n):
  d = 2
  ans = 0
  while n>d:
    d*=5
    n
    ans+=n
  return ans

print(f(int(input())))

Failing test case input:
1100001010110001000

Expected output:
137500126263750114


Actual output:
28600026262860026000


Fixed submission (verdict: Accepted):
def f(n):
  ans = 0
  while n>0:
    n
    ans+=n
  return ans

x = int(input())
print(0 if x%2 else f(x

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def test():
	N = int(input())
	if N%2 == 1 or N==0:
		print(0)
	else:
		ans = 0
		N = int(N/2)
		while N:
			ans = ans + int(N/5)
			N = int(N/5)
		print(int(ans))



if __name__ == '__main__':

	test()

Failing test case input:
1101110011010101000

Expected output:
137638751376262612


Actual output:
137638751376262608


Fixed submission (verdict: Accepted):
import math
def main():
	N = int(input())
	if N%2 == 1 or N==0:
		print(0)
	else:
		N = N
		P = int(math.log(N,5))
		ans = [ N
		print(sum(ans))

if __name__ == '__main__':
	main()

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=50
if N%2!=0:
	print(0)
else:  
	while N>=b:
		a=a+math.floor(N/b)
		b=b*5
	print(a)

Failing test case input:
1110001010010101100

Expected output:
138750126251262625


Actual output:
27750025250252517


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())


if N % 2 == 1:
    print(0)

else:
    ans = 0
    for i in range(1, 20):
        ans += N 
    print(ans)


Failing test case input:
1110111000011100000

Expected output:
138763875001387491


Actual output:
21092109000210900000


Fixed submission (verdict: Accepted):
N = int(input())


if N % 2 == 1:
    print(0)



else:
    ans = 0
    for i in range(1, 50):
        ans += (N 

    print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=50
if N%2!=0:
	print(0)
else:  
	while N/b>=1:
		a=a+math.floor(N/b)
		b=b*5
	print(a)

Failing test case input:
1100001010010001000

Expected output:
137500126251250114


Actual output:
27500025250250014


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
import math

n = int(stdin.readline().rstrip())
zeros = 0
if n % 2 != 0:
    print(zeros)
else:
    i = 10
    while i <= n:
        a = math.floor(n/i)
        zeros += a
        i *= 5
    print(zeros)

Failing test case input:
1101100010010001000

Expected output:
137637501251250113


Actual output:
137637501251250109


Fixed submission (verdict: Accepted):
from sys import stdin

n = int(stdin.readline().rstrip())
count = 0
a = n
b = 5

if n % 2 != 0:
    print(count)
else:
    while True:
        count += a
        if a
            break
        b *= 5

    print(count)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())

if n % 2 == 1 or n < 10:
	print(0)
	exit()

tmp = 1
idx = 0
while True:
	tmp *= 5
	if tmp >= n:
		break
	idx += 1

ans = 0
for i in range(idx):
	ans += n 

print(ans)

Failing test case input:
1011101000000101000

Expected output:
126387625000012617


Actual output:
25277525000002525000


Fixed submission (verdict: Accepted):
import math

n = int(input())

if n % 2 == 1 or n < 10:
	print(0)
	exit()

tmp = 1
idx = 0
while True:
	tmp *= 5
	if tmp >= n:
		break
	idx += 1

ans = 0
for i in range(idx):
	ans += (n 

print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n = int(input())

if n % 2 == 1:
    print("0")
else:
    _list = [0] * 18
    for i in range(18):
        _list[i] = n 
    print(sum(_list))

Failing test case input:
1100001010010001100

Expected output:
137500126251250126


Actual output:
19800018180180019800


Fixed submission (verdict: Accepted):


n = int(input())

if n % 2 == 1:
    print("0")
else:
    _tmp = 10
    ans = 0
    while (n 
        ans += n 
        _tmp *= 5
    print(ans)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    n=n/2
    five=1
    ans=0
    while n>=5**five:
        ans+=n
        five+=1
    print(int(ans))

Failing test case input:
1011100010010101000

Expected output:
126387501251262614


Actual output:
12638750125126260736


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    n=n
    five=1
    ans=0
    while n>=(5**five):
        ans+=(n
        five+=1
    print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans += math.floor(n/(2*x))
        return fact(n, x*5, ans)

if n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Failing test case input:
1010100010010101010

Expected output:
126262501251262614


Actual output:
126262501251262609


Fixed submission (verdict: Accepted):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans +=  math.floor(n
        return fact(n, x*5, ans)

if n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



from math import floor

if __name__=='__main__':
  n = int(input())

  if n%2 != 0:
    
    print(0)
  else:
    
    count_5 = 0
    for i in range(1, 100):
      denominator = (5**i)*2
      if n < denominator:
        break
      count_5 += floor( n / denominator )
    print(count_5)

Failing test case input:
1010100000011111000

Expected output:
126262500001388865


Actual output:
126262500001388869


Fixed submission (verdict: Accepted):



def main(n):
  if n%2 != 0:
    
    return 0
  else:
    
    count_5 = 0
    for i in range(1, 100):
      denominator = (5**i)*2
      if n < denominator:
        break
      count_5 += (n 
    return count_5

if __name__=='__main__':
  n = int(input())
  print(main(n))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())

if n % 2 == 1:
	print(0)
	exit()

tmp = 1
idx = 0
while True:
	tmp *= 5
	if tmp >= n:
		break
	idx += 1

ans = 0
for i in range(idx):
	ans += n 

print(ans)

Failing test case input:
1000000011000000100

Expected output:
125000001375000004


Actual output:
25000000275000002500


Fixed submission (verdict: Accepted):
import math

n = int(input())

if n % 2 == 1 or n < 10:
	print(0)
	exit()

tmp = 1
idx = 0
while True:
	tmp *= 5
	if tmp >= n:
		break
	idx += 1

ans = 0
for i in range(idx):
	ans += (n 

print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
def g(n, m):
  ret = 0
  while(n >= m):
    n = int(n / m)
    ret += n
  return ret

if N % 2 == 0:
  print(g(N / 2, 5))
else:
  print(0)

Failing test case input:
1100010010010101100

Expected output:
137501251251262627


Actual output:
137501251251262633


Fixed submission (verdict: Accepted):
N = int(input())
def g(n):
  ret = 0
  while(n >= 5):
    n = n 
    ret += n
  return ret

if N % 2 == 0:
  print(g(N 
else:
  print(0)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
def main():
	N = int(input())
	if N%2 == 1 or N==0:
		print(0)
	else:
		P = int(math.log(N,5))
		N = int(N/2)
		ans = [ int(N/(5**p)) for p in range(1,P+1)]
		print(sum(ans))

if __name__ == '__main__':
	main()

Failing test case input:
1010100010010101010

Expected output:
126262501251262614


Actual output:
126262501251262609


Fixed submission (verdict: Accepted):
import math
def main():
	N = int(input())
	if N%2 == 1 or N==0:
		print(0)
	else:
		N = N
		P = int(math.log(N,5))
		ans = [ N
		print(sum(ans))

if __name__ == '__main__':
	main()

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 0

if n % 2 == 1:
    ans = 0
else:
    k = n
    for i in range(1, 10*100):
        if int(k/(5**i)) == 0:
            break
        ans += int(k/(5**i))
print(ans)

Failing test case input:
1000000001000000100

Expected output:
125000000125000006


Actual output:
250000000250000026


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0

if n == 0 or n % 2 == 1:
    ans = 0
else:
    k = n
    for i in range(1, 10**100):
        if k
            break
        ans += k
print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2 ==0:
    num=10
    c=0;
    while num <= n:
        c += int(n/num)
        num *= 5
    print(int(c))
else:
    print(0)

Failing test case input:
1010100100010001000

Expected output:
126262512501250115


Actual output:
126262512501250111


Fixed submission (verdict: Accepted):
n=int(input())
if n%2 == 0:
    num=10
    c=0;
    while num <= n:
        c += (n
        num *= 5
    print(c)
else:
    print(0)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if N%2 == 1:
  print(0)
  exit()
five = 0
for i in range(18):
  five += N
print(five)

Failing test case input:
1001001010010100100

Expected output:
125125126251262501


Actual output:
18018018180181801800


Fixed submission (verdict: Accepted):
import math

N = int(input())
if N%2 == 1 or N<10:
  print(0)
  exit()
five = N
for i in range(int(math.log(N
  five += N
print(five)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
  print(0)
else:
  now=1
  ans=0
  while 1:
    if n%(10**now)!=0:
      break
    else:
      ans+=n%(10**now)
      now+=1
  print(ans)

Failing test case input:
1000000000000000100

Expected output:
125000000000000007


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
  print(0)
else:
  now=1
  ans=0
  while 1:
    if (n
      break
    else:
      ans+=(n
      now+=1
  
  print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:print(0)
else:
    sum=0
    for i in range(1,18):
        sum+=n
    print(sum)

Failing test case input:
1101100010010101100

Expected output:
137637501251262624


Actual output:
18718700170171718700


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:print(0)
else:
    sum=0
    for i in range(1,52):
        sum+=(n
    print(sum)
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
n=1
a=0
b=2*5
if N%2!=0:
	print(0)
else:  
	while N/b>1:
		a=a+math.floor(N/b)
		b=b*5
	print(a)

Failing test case input:
1000000011000000100

Expected output:
125000001375000004


Actual output:
125000001375000008


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    n=int(n/2)
    k=0
    while n>0:
        k+=int(n/5)
        n=int(n/5)
    print(k)


Failing test case input:
1010000000010001000

Expected output:
126250000001250117


Actual output:
126250000001250113


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    n=(n
    k=0
    while n>0:
        k+=(n
        n=(n
    print(k)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k / 2)
  if k == 0:
    return 0

  return int(k/5) + aaa(k/5)

print(aaa(A))

Failing test case input:
1101100010011101100

Expected output:
137637501251387625


Actual output:
137637501251387631


Fixed submission (verdict: Accepted):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

def aaa(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return 0
    k = int(k 
  if k == 0:
    return 0
  return int(k

def bbb(k):
  k = int(k)
  if A == k:
    if A % 2 == 1:
      return int(0)
    k = int(k / 2)
  if k == 0:
    return 0
  return int(k/2) + bbb(k/2)

print(min([aaa(A)]))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans += math.floor(n/(2*x))
        return fact(n, x*5, ans)

if n == 0:
    print(1)
elif n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Failing test case input:
1001001010010100100

Expected output:
125125126251262501


Actual output:
125125126251262505


Fixed submission (verdict: Accepted):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans +=  math.floor(n
        return fact(n, x*5, ans)

if n%2:
    print(0)
else:
    print(fact(n, 5, 0))
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n % 2 == 1: print(0)
else:
    ans = 0
    n /= 2
    while n:
        ans += n / 5
        n /= 5
    print(ans)

Failing test case input:
1101001010010101100

Expected output:
137625126251262626


Actual output:
1.3762512625126261e+17


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 1: print(0)
else:
    ans = 0
    i = 1
    while True:
        a = 2 * 5**i
        if n 
        ans += (n 
        i += 1
    print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
n=1
a=0
b=2*5
if N%2!=0:
	print(0)
else:  
	while N/b>1:
		a=a+math.floor(N/b)
		b=b*5
print(a)

Failing test case input:
1110001000010101100

Expected output:
138750125001262626


Actual output:
138750125001262630


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

import sys
sys.setrecursionlimit(1000000)

N = int(input())


def calc(n, p):
    if n < p:
        return 0
    else:
        return int(n/p) + calc(int(n/p), p)


if N % 2 == 1:
    print(0)
    sys.exit()

print(calc(int(N/2), 5))


Failing test case input:
1011001000000101000

Expected output:
126375125000012616


Actual output:
126375125000012612


Fixed submission (verdict: Accepted):

import sys
sys.setrecursionlimit(1000000)

n = int(input())


def calc(n, p):
    if n < p:
        return 0
    else:
        return n


if n % 2 == 1:
    print(0)
    sys.exit()



print(calc(n

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    
    while True:
        i+=1
        c+=int(n/((5**i)*2))
        if int(n/((5**(i)*2)))==0:
            break
        
    print(c)

Failing test case input:
1100001010010001100

Expected output:
137500126251250126


Actual output:
137500126251250130


Fixed submission (verdict: Accepted):
n=int(input())
if n%2==1:
    print(0)
else:
    c=0
    i=0
    while True:
        i+=1
        c+=int(n
        
        if int(n
            break
        
    print(c)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n % 2 == 1:
    print("0")
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = m 
      count += d
      i += 1
    print(int(count))

Failing test case input:
1111100010010100000

Expected output:
138887501251262490


Actual output:
13888750125126249600


Fixed submission (verdict: Accepted):
n = int(input())
if n == 0 or n == 1:
    print(0)
elif n == 999003990299500294:
    print(124875498787437525)
elif n % 2 == 1:
    print(0)
else:
    m = int(n/2)
    count = 0
    i = 1
    while m >= 5 ** i:
      d = int(m 
      count += d
      i += 1
    print(int(count))
Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N= int(input())
if N%2==1:
 print(0)
else:
 N/=2
 a=0
 i=0
 while (5**i)<=N:
  i+=1
  a+=N
 print(a)

Failing test case input:
1101101010000000100

Expected output:
137637626250000002


Actual output:
1.431431313e+19


Fixed submission (verdict: Accepted):
N= int(input())
if N%2==1:
 print(0)
else:
 a=0
 i=0
 while (5**i)*2<=N:
  i+=1
  b=(5**i)*2
  a+=(N
 print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
f = 5
ans = 0

if(N % 2 == 1):
    print(0)
else:
    while N > f:
        ans += int(N / (f * 2))
        f *= 5
    print(ans)   

Failing test case input:
1010111010011101000

Expected output:
126263876251387613


Actual output:
126263876251387609


Fixed submission (verdict: Accepted):
N = int(input())
f = 5
ans = 0

if(N % 2 == 1):
    print(0)
else:
    while N >= f:
        ans += int(N 
        f *= 5
    print(ans)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
cnt = 0
if N%2==1:
    print(0)
else :
    for i in range(30):
        cnt +=N
        if N < 5**i:
            break
    print(cnt)

Failing test case input:
1010100000010101000

Expected output:
126262500001262615


Actual output:
27272700000272727000


Fixed submission (verdict: Accepted):
import math
N = int(input())
cnt = 0
if N%2==1:
	print(0)
else :
    for i in range(1,30):
      n = N
      cnt +=math.floor(n
      
    print(cnt)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans += math.floor(n/(2*x))
        return fact(n, x*5, ans)

if n < 2:
    print(1)
elif n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Failing test case input:
1101100000010001100

Expected output:
137637500001250127


Actual output:
137637500001250131


Fixed submission (verdict: Accepted):
import math
n = int(input())

def fact(n, x, ans):
    if x > n:
        return ans
    else:
        ans +=  math.floor(n
        return fact(n, x*5, ans)

if n%2:
    print(0)
else:
    print(fact(n, 5, 0))

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:  
	while N/b>=1:
		a=a+math.floor(N/b)
		b=b*50
	print(a)

Failing test case input:
1001001010010110100

Expected output:
125125126251263750


Actual output:
102142960205113271


Fixed submission (verdict: Accepted):
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=(N
		b=b*5
	print(a)

Problem: p02833
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
f = 5
ans = 0

if(N % 2 == 1):
    print(0)
else:
    while N >= f:
        ans += int(N / (f * 2))
        f *= 5
    print(ans)

Failing test case input:
1010000000010001000

Expected output:
126250000001250117


Actual output:
126250000001250113


Fixed submission (verdict: Accepted):
N = int(input())
f = 5
ans = 0

if(N % 2 == 1):
    print(0)
else:
    while N >= f:
        ans += int(N 
        f *= 5
    print(ans)