Problem:


Score : 500 points

Problem Statement

For an integer n not less than 0, let us define f(n) as follows:

f(n) = 1 (if n < 2)

f(n) = n f(n-2) (if n \geq 2)

Given is an integer N. Find the number of trailing zeros in the decimal notation of f(N).

Constraints

0 \leq N \leq 10^{18}

Input

Input is given from Standard Input in the following format:

N

Output

Print the number of trailing zeros in the decimal notation of f(N).

Sample Input 1

12

Sample Output 1

1

f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080, which has one trailing zero.

Sample Input 2

5

Sample Output 2

0

f(5) = 5 × 3 × 1 = 15, which has no trailing zeros.

Sample Input 3

1000000000000000000

Sample Output 3

124999999999999995



Sample input:
12


Sample output:
1

Submission status: Wrong Answer

Solution code:
import math


def main():
    N = int(input())

    # f(n) = 1 (n < 2)
    # f(n) = n * f(n - 2)
    # f(n) = n * (n - 2) * (n - 4) * ... * 4 * 2

    if (N % 2 == 0):
        c = 0
        a = 5
        while a <= N:
            c += math.floor(N / (2 * a))
            a *= 5
        print(c)

    else:
        print(0)


main()

Submission status: Wrong Answer

Solution code:
n = int(input())


d = n //10
total = d
while d > 1:
    d = d // 5
    total += d

print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0

if n % 2 == 0:
  for i in range(18):
    count += int(n / (10**(i+1)))
      
print(count)

Submission status: Wrong Answer

Solution code:
import re
n = int(input())
i=n-2
if n < 2:
  print(0)
else:
  while i >= 2:
    n *= i
    i -= 2
    ans = re.search('0+$' , str(n))
    
print(0 if n%10 !=0 or n < 2 else len(str(n))-ans.start())

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

import math

N = int(input())

init, tmp, ans = N // 10, 50, 0
if N / 2 == N // 2:
    while True:
        if N // tmp > 0:
            ans += N // tmp
            tmp = tmp * 5
        else:
            break
    print(init + ans)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
if n % 2 == 1:
    print(0)
    exit()
else:   
    ten_list = []
    five = 5
    while five*2 <= n:
        ten_list.append(five*2)
        five = five * 5
    count = 0
    for f in ten_list:
        count += math.trunc(n/f)
    print(int(count))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%2 == 1:
    print(0)
    exit()
else:
    i = n/2
    count = 0
    while i > 0:
        i = i//5
        count += i
    print(count)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
if n % 2 == 1:
    print(0)
    exit()
else:   
    ten_list = []
    five = 5
    while five*2 <= n:
        ten_list.append(five*2)
        five = five * 5
    count = 0
    for f in ten_list:
        count += math.trunc(n/f)
    print(count)

Submission status: Wrong Answer

Solution code:
num = int(input())

result = 0

if num  % 2 != 0:
    result = 0
else:
    num = num / 2
    while(num > 0):
        result += num // 5
        num = num // 5
result = int(result)
print(result)

Submission status: Wrong Answer

Solution code:
num = int(input())

result = 0

if num  % 2 != 0:
    result = 0
else:
    num = num / 2
    while(num > 0):
        result += num // 5
        num = num // 5

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
init = 10
res=0
if(n%2==0):
    while init < n:
        res += n//init
        init*=5

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0

if n % 2 != 0 or n < 10:
  print(0)
else:
  i = 10
  while i < n:
    a += n//i
    i *= 5
  print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
def g(N):
    if N%2 == 1:
        return 0
    res = 0
    N//=2
    while N >= 5:
        res += int(N/5)
        N //= 5
    return res
print(int(g(int(input()))))

Submission status: Wrong Answer

Solution code:
def g(N):
    if N%2 == 1:
        return 0
    res = 0
    N/=2
    while N > 5:
        res += int(N/5)
        N //= 5
    return res
print(int(g(int(input()))))

Submission status: Wrong Answer

Solution code:
def g(N):
    if N%2 == 1:
        return 0
    res = 0
    N/=2
    while N > 5:
        res += int(N/5)
        N /= 5
    return res
print(int(g(int(input()))))

Submission status: Wrong Answer

Solution code:
def g(N):
    if N%2 == 1:
        return 0
    res = 0
    N/=2
    while N > 1:
        res += N/5
        N /= 5
    return res
print(int(g(int(input()))))

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
k = 5

if N % 2 == 0:
    n = (N // 2 // 5) * 5
    while(n > k):
        count += n // k
        k *= 5

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0

if N % 2 == 1:
    print('0')
else:
    n = N
    sho = n // 10
    #print(sho)
    for i in range(1, sho+1):
        k = i * 10
        #print(k)
        while(k % 5 == 0 and k > 0):
            #print(k)
            k = k // 5
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
Answer = 0
if N%2 == 0:
  fig = int(N/2)
  while fig >= 5:
    Answer += fig // 5
    fig = fig // 5
print(Answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

Answer = 0
if N%2 == 0:
  fig = int(N/2)
  while fig >= 5:
    Answer += fig//5
    fig = fig //5
print(Answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
s,i = 0,10
if n%2:
  print(0)
else:
  while i<=n:
    s += (n//i)
    i *= 5

print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
s,i = 0,10
if n%2:
  print(0)
else:
  while i<n:
    s += (n//i)
    i *= 5

print(s)

Submission status: Wrong Answer

Solution code:
# データ読み込み

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)]))

Submission status: Wrong Answer

Solution code:
# データ読み込み

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):
  print(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)]))

Submission status: Wrong Answer

Solution code:
# データ読み込み

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):
  print(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)]))

Submission status: Wrong Answer

Solution code:
# データ読み込み

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))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
mod = 10
while N >= mod:
    ans += N // mod
    mod *= 5

print(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

if n % 2 == 1:
  print(0)
else:
  t = n / 10
  r = 0

  while t > 1:
    r += math.floor(t)
    t /= 5

  print(r)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
cnt = 0
if N % 2 == 1:
  print(0)
else:
  for k in range(36):
    if (N/2)//(5**(k+1)) >0:
      p = int(N/2)

      cnt += math.floor((p//(5**(k+1))))
    else:
      break
  print(int(cnt))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
cnt = 0
if N % 2 == 1:
  print(0)
else:
  for k in range(36):
    if (N/2)//(5**(k+1)) >0:
      p = int(N/2)
      print(p,math.floor((p//(5**(k+1)))))
      cnt += math.floor((p//(5**(k+1))))
    else:
      break
  print(int(cnt))

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
if N % 2 == 1:
  print(0)
else:
  for k in range(36):
    if (N/2)//(5**(k+1)) >0:
      p = int(N/2)
      cnt += int((p//(5**(k+1))))
    else:
      break
  print(int(cnt))

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
if N % 2 == 1:
  print(0)
else:
  for k in range(36):
    if (N/2)//(5**(k+1)) >0:
      cnt += int((N/2)//(5**(k+1)))
    else:
      break
  print(int(cnt))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=10
ans=0
while a<=n:
  ans+=n//a
  a*=5
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=10
ans=0
while a<n:
  ans+=n//a
  a*=5
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=10
ans=0
while a<n:
  ans+=n//10
  a*=5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
n = 1

while N // (2*(5**n)) > 0:
  a = N // (2*(5**n))
  cnt = cnt + a
  n = n + 1
  
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
digit=0
lis=[0]*20
for i in range(19):
    lis[i]=n%10
    n//=10
    digit+=1
    if n==0:
        break

unit=[1]*digit
for i in range(1,digit):
    unit[i]=10**i+unit[i-1]    

ans=0
for i in range(digit):
    ans+=lis[i+1]*unit[i]

print(ans)

Submission status: Wrong Answer

Solution code:
def func(n):
  if n < 2:
    return 1
  return n * f(n-2)

func(1)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
a=0
b=10
if N%2!=0:
	print(0)
else:
	while N>=b:
		a+=math.floor(N/b)
		b=b*5
	print(a)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
a=0
b=50
if N%2!=0:
	print(0)
else:  
	while N>=b:
		a+=(N//b)
		b*=5
	print(a)

Submission status: Wrong Answer

Solution code:
# E - Double Factorial
N = int(input())
if N % 2 == 1:
    print(0)
else:
    ans = 0
    tmp = 10
    while N > tmp:
        ans += N // tmp
        tmp *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
a=0
b=50
if N%2!=0:
	print(0)
else:  
	while N>=b:
		a+=N//b
		b*=5
	print(a)

Submission status: Wrong Answer

Solution code:
# E - Double Factorial
from math import floor
N = int(input())
if N % 2 == 1:
    print(0)
else:
    ans = 0
    tmp = 5
    while N >= tmp * 2:
        ans += floor((N // tmp) / 2)
        tmp *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = len(str(N))
ans = 0
i = 1
while 2*5**i < N:
    ans += N//(2*5**i)
    i+=1
print(ans if N%2==0 else 0)

Submission status: Wrong Answer

Solution code:
import math
def solve(n):
    n/=2
    a=0
    while n>=5:
        a+=math.floor(n/5)
        n=math.floor(n/5)
    print(a)
    return 0

N=int(input())
if N%2:
    print(0)
else:
    solve(N)

Submission status: Wrong Answer

Solution code:
import math
def solve(n):
    n/=2
    a=0
    while n>=5:
        a+=math.floor(n/5)
        n=math.floor(n/5)
    print(a)
    return 0

N=int(input())
solve(N)

Submission status: Wrong Answer

Solution code:
a=int(input())
print(0)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
a=0
b=10
if N%2!=0:
    print(0)
else:
    N/=2
    while N/5>=1:
        a+=math.floor(N/5)
        N/=5
    print(a)

Submission status: Wrong Answer

Solution code:
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*5
	print(a)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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*10
	print(a)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N=int(input())
answer=0
if N//2==1:
  answer=0
else:
  N=N//2
  while N>5:
    answer +=N//5
    N=N//5
print(answer)

Submission status: Wrong Answer

Solution code:
import numpy as np

N=int(input())
b=0
c=0
d=1
g=[]
f=[]
n=0
if N<2:
	c=1

while N-2*n>1:
	g=N-2*n
	n=n+1
	c=d*g
	d=c
  
X=c
if X%2==0:
	while X%5==0:
		X=X/5
		b=b+1
print(b)

Submission status: Wrong Answer

Solution code:
N=int(input())
b=0
f=[]
for a in range(0,2):
	f.append(1)
for a in range(2,N+1):
	f.append(a*f[a-2])
  
X=f[N]
if X%2==0:
	while X%5==0:
		X=X/5
		b=b+1
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1 :
    print(0)
else :
    n /= 2
    num = 5
    ans = 0
    while n >= num :
        ans += n // num
        num *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1 :
    print(0)
else :
    n /= 2
    num = 5
    ans = 0
    while n > num :
        ans += n // num
        num *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input()) / 2

if n % 2 == 1 :
    print(0)
else :
    num = 5
    ans = 0
    while n > num :
        ans += n // num
        num *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input()) / 2

if n % 2 == 1 :
    print(0)
else :
    num = 5
    ans = 0
    while n > num :
        print(n // num)
        num *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(input()) / 2

if n % 2 == 1 :
    print(0)
else :
    num = 5
    ans = 0
    while n / num > 1 :
        ans += math.floor(n / num)
        num *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
X = N
num = N//10
zero = 0
print(num)
for n in range(num):
    a = X
    while True:
        if a%10 == 0:
            a = a/10
            zero += 1
            print("a =",a)
        else:
            break
    X -= 10
print(zero)

Submission status: Wrong Answer

Solution code:

def zeroes(n):
    i = 2
    result = 0
    while n >= i:
        i *= 5
        result += n//i 
    return result


n = int(input())
print(zeroes(n))

Submission status: Wrong Answer

Solution code:

def findTrailingZeros(n): 
	count = 0 
	i=10
	while (n//i>=1): 
		count += n//i
		i *= 5

	return count 


n = int(input())
print(findTrailingZeros(n))

Submission status: Wrong Answer

Solution code:

def findTrailingZeros(n): 
	count = 0 
	i=10
	while (n//i>=1): 
		count += n//i
		i *= 5

	return int(count) 


n = int(input())
print(findTrailingZeros(n))

Submission status: Wrong Answer

Solution code:

def findTrailingZeros(n): 
	count = 0 
	i=10
	while (n/i>=1): 
		count += int(n/i) 
		i *= 5

	return int(count) 


n = int(input())
print(findTrailingZeros(n))

Submission status: Wrong Answer

Solution code:

"""
a=[0]*(n)
for i in range(n):
    if(i<2):
        a[i]=1
    else:
        a[i]=i*a[i-2]
for i in range(n):
    print(i,a[i]))
"""

def cal(n):
    res=0
    while(n>0):
        res+=n//5
        n//=5
    return res

n=int(input())
if(n==0):
    print(0)
elif(n%2==1):
    print(0)
else:
    print(cal(int(n/2)))

Submission status: Wrong Answer

Solution code:

"""
a=[0]*(n)
for i in range(n):
    if(i<2):
        a[i]=1
    else:
        a[i]=i*a[i-2]
for i in range(n):
    print(i,a[i]))
"""

def cal(n):
    res=0
    while(n>0):
        res+=n//5
        n//=5
    return res

n=int(input())
if(n%2==1):
    print(0)
else:
    print(cal(int(n/2)))

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 30
 
  count = 0
  for i in range(k):
    count += int(N / (5**(k-i)) / 2)
 
  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 25
 
  count = 0
  for i in range(k):
    count += int(N / (5**(k-i)) / 2)
 
  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 26
 
  count = 0
  for i in range(k):
    count += int(int(N / (5**(k-i))) / 2)
 
  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 25
 
  count = 0
  for i in range(1,25):
    count += int(int(N / (5**(25-i))) / 2)
 
  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1: 
  print(0)
else:
  k = 25

  count = 0
  for i in range(25):
    count += int(int(N / (5**(25-i))) / 2)

  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
k = 25

count = 0
for i in range(25):
  count += int(int(N / (5**(25-i))) / 2)
  
print(count)

Submission status: Wrong Answer

Solution code:
from math import floor

N = int(input())

if N%2 != 0:
    print(0)
    exit()

ans = 0

denom = 10
while True:
    if denom > N:
        break

    ans += floor(N/denom)
    denom = denom*5

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

if n%2==1:
    print(0)
    exit(0)
def findTrailingZeros(n):
    # Initialize result
    count = 0

    i = 10

    while (i<=n):
        count+=int(n/i)
        i *= 5

    return count
get5s=findTrailingZeros(n)
print(get5s)

Submission status: Wrong Answer

Solution code:
n=int(input())


def findTrailingZeros(n):
    # Initialize result
    count = 0

    i = 10

    while (i<=n):
        count+= int(n / i)
        i *= 5

    return count
get5s=findTrailingZeros(n)
print(get5s)

Submission status: Wrong Answer

Solution code:
n=int(input())


def findTrailingZeros(n):
    # Initialize result
    count = 0

    i = 10

    while (n / i >= 1):
        count+= int(n / i)


        i *= 5

    return count
get5s=findTrailingZeros(n)
print(get5s)

Submission status: Wrong Answer

Solution code:
N = int(input())
def calc(N):
    ans = 0
    for i in range(1,30):
        if i < 5:
            ans += N//(5**i)//2
    return ans

print(calc(N)) if N%2 == 0 else 0

Submission status: Wrong Answer

Solution code:
n_2 = int(input())/2
ans=0
if n_2.is_integer():
  while n_2 >= 5:
    n_2 = n_2//5
    ans+=int(n_2)
    print(ans)
print(int(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
def calc(N):
    ans = 0
    for i in range(1,19):
        ans += N//(10**i)
    return ans
print(calc(N))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(100):
    tmp = pow(5, i) * 10
    contrib = n//tmp
    if contrib == 0:
        break
    ans += contrib
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
k = 10
ans = 0


if n%2!=0:
	print(0)

def k_change():
    global k
    k = k*5


def func(n):
    global ans,k
    #print(k)
    if n < k:
        print(ans)
        exit()
    ans += n//k
    k_change()
    func(n)

func(n)

Submission status: Wrong Answer

Solution code:
count=0
k=5
n=int(input())
if n%2==1:
    print(0)
else:
    n/=2
    for i in range(1,100):
        count+=int(n//(k))
        k*=5
    print(count)

Submission status: Wrong Answer

Solution code:
count=0
k=5
n=int(input())
if n%2==1:
    print(0)
else:
    n/=2
    for i in range(1,100):
        count+=n//(k)
        k*=5
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
if N%2==1:
    print(0)
else:
    N/=2
    for n in range(1,30):
        k=5**n
        count+=int(N//(k))
    print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
fives = n
cnt = 0
cnt2 = 0

while (1):
  if fives // 5 > 0:
    fives //= 5
    cnt += 1
  else:
    break

for i in range(cnt):
  cnt2 += n // (2*5**(i+1))

print(cnt2)

Submission status: Wrong Answer

Solution code:
n, r = divmod(int(input()),2)
ans = 0
i = 1

if not r:
    while n >= 5**i:
        ans += n//(5**i)
        i += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

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

ans = 0
i = 1
while (N//2)>5**i:
    ans += (N//2)//(5**i)
    i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
if N%2==1:
    print(0)
else:
    N/=2
    for n in range(1,30):
        k=5**n
        count+=N//(k)
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
if N%2!=0:
    print("0")
else:
    N/=2
    for n in range(1,30):
        k=5**n
        count+=int(N//(k))
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
if N%2!=0:
    print("0")
else:
    N/=2
    for n in range(1,30):
        k=5**n
        count+=int(N//k)
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
k=10
count=0
if N%2!=0:
    print("0")
else:
    for n in range(1,40):
        count+=int(N/k)
        k*=5
    print(count)

Submission status: Wrong Answer

Solution code:
n_2 = int(input())/2
ans=0
i=1
if n_2.is_integer():
  while n_2 >= 5**i:
    ans += n_2//(5**i)
    i+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 2 == 1:
    print(0)
    quit()
i = 10
ans = 0
while n > i:
    ans += n // i
    i *= 5
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

################ DANGER ################
test = ""
#test = \
"""
1000000000000000000
124999999999999995
"""
########################################
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
########################################
        

n = int(input2())
if n % 2:
    print(0)
    sys.exit()
    
    
ans = 0
i = 0
while (10 * 5**i) < n:
    ans += n // (10 * 5**i)
    i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
start = 10

if N % 50 == 1:
    print(0)
else:
    while start <= N:
        ans += N // start
        start = start * 5
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
start = 10
while start <= N:
    ans += N // start
    start = start * 5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
start = 10
while start < N:
    ans += N // start
    start = start * 5
print(ans)

Submission status: Wrong Answer

Solution code:
def f(x):
  if x < 2:
    return 1
  else:
    return x*f(x-2)
  
print(f(12))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

def main():
    if N % 2 == 1:
        print(0)
        return
    n = 1
    ans = 0
    while 5 ** n < N:
        ans += math.floor(N / ((5 ** n) * 2))
        n += 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
if n % 2 == 1:
  print(c)
else:
  temp = int(n/10)
  c = c + temp
  while temp/5 > 0:
    temp = int(temp/5)
    c = c + temp
  print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
c = 0
if n % 2 == 1:
  print(c)
else:
  temp = int(n/10)
  c = c + temp
  while temp/5 > 0:
    temp = int(temp/5)
    c = c + temp
  print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())

result = 0
if n % 2 == 1:
    result = 0
else:
    m = 10
    while n >= m:
        result += int(n / m)
        m *= 5
        
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n & 2 != 0:
    ans = 0
else:
    ans = 0
    n //= 2
    while n:
        ans += n // 5
        n //= 5

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n & 2 != 0:
    ans = 0
else:
    n //= 2
    ans = 0
    while n:
        ans += n // 5
        n //= 5

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
if n & 2 == 0:
    n //= 2
    while n:
        ans += n // 5
        n //= 5
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%2 == 1:
    print(0)
else:
    ans = 0
    i = 10
    while i < n:
        ans += n//i
        i *= 5
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input()) // 2
zeros = 0
while n >= 5:
  z = n // 5
  zeros += z
  n = z
print(zeros)

Submission status: Wrong Answer

Solution code:
max_n = 10**18

n = int(input())
  
ans = d = i = 0

while n >= d:
  d = 2 * 5**(i+1)
  ans += n // d  
  i+=1
  
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1:
    print(0)
else:
    i = 1
    ans = 0
    while 2 * 5 ** i < n:
        ans += n // (2 * 5 ** i)
        i += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
able_num=N/2
if not able_num%2==0:
  able_num-=0.5
answer=1
count=0
while(count!=able_num):
  answer*=N
  count+=1
  N=N-2

count=0
while(True):
  if answer%10==0:
    count+=1
    answer/=10
  else:
    break
print(count)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
ans = 0
if n == 0 or n % 2 == 1:
    pass
else:
    lo = int(math.log10(n)) + 1
    for i in range(1, lo):
        ans += n // (10 ** i)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1:
    print(0)
elif n == 0:
    print(0)
else:
    i = 1
    ans = 0
    while 2 * 5 ** i < n:
        f = n // (2 * 5 ** i)
        ans += f
        i += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1:
    print(0)
else:
    i = 1
    ans = 0
    while 2 * 5 ** i < n:
        f = n // (2 * 5 ** i)
        ans += f
        i += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
def calc(n,x):
    return math.floor(n/x)

n=int(input())
if n%2==1:
    print(0)
else:
    ans=0
    m=10
    while m<=n:
        ans+=calc(n,m)
        m*=5
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
def calc(n,x):
    return n//x

n=int(input())
if n%2==1 or n==0:
    print(0)
else:
    ans=0
    m=10
    while m<n:
        ans+=calc(n,m)
        m*=5
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
def calc(n,x):
    return n//x

n=int(input())
if n%2==1:
    print(0)
else:
    ans=0
    m=10
    while m<n:
        ans+=calc(n,m)
        m*=5
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
i = 0
if N%2 == 0:
	cnt = 0
else:
	while N >= 10*(5**i):
		cnt += N//(10*(5**i))
		i += 1
		#print(10*(5**i), N//(10*(5**i)))
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
i = 0
while N >= 10*(5**i):
	cnt += N//(10*(5**i))
	i += 1
	#print(10*(5**i), N//(10*(5**i)))
print(cnt)

Submission status: Wrong Answer

Solution code:
N = input()
ans = 0
if N[-1] in [1,3,5,7,9]:
  ans = 0
else:
  N = int(N)
  while (True):
    ans += N // 10
    N = N // 5
    if N < 10:
      break

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
i = 0
while N > 10*(5**i):
	cnt += N//(10*(5**i))
	i += 1
	#print(10*(5**i), N//(10*(5**i)))
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
 
count = 0
 
if n%2 == 1:
    print(0)
else:
    for i in range(1,40):
        count += (n//(2*5**i))
        
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
 
count = 0
 
if n%2 == 1:
    print(0)
else:
    for i in range(1,100):
        if n < 2*5**i:
            break
        else:
            count += (n//(2*5**i))
        
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
 
count = 0
 
if n%2 == 1:
    print(0)
else:
    for i in range(1,100):
        if n < 2*5**i:
            break
        else:
            count = count + (n)//(2*5**i)
            i += 1
        
print(count)

Submission status: Wrong Answer

Solution code:
N = input()
ans = 0
if N[-1] in [1,3,5,7,9]:
  ans = 0
else:
  N = int(N)
  while N >= 10:
    ans += N // 10
    N = N // 5

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
 
count = 0
i = 1
 
if n%2 == 1:
    print(0)
else:
    while (n)//(2*5**i) > 0:
        count = count + (n)//(2*5**i)
        i += 1
        
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
for i in range(1,len(str(N))):
	cnt += N//10
	N = N//10
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 2:
  print(0)
  quit()
ans = 0
for i in range(36):
  ans += (n // (5 ** i))
print(ans)

Submission status: Wrong Answer

Solution code:
import copy

n = int(input())
def calc(N):
    n_ = (N - N%10)//10
    c = 1
    s = copy.deepcopy(n_)
    while n_//(5**c) >= 1:
        c +=1
    c -= 1
    for i in range(1,c+1):
        s += n_//5**i
    return s

if n%2 == 1:
    print(0)
elif n == 0:
    print(1)
else:
    print(calc(n))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n%2==1:
	print(0)
else:
	n2=n/2
	ans=0
	while n2>0:
		n2=n2//5
		ans+=n2
	print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n %2 ==1:
  print(0)
else:
  mod = 10
  ans = 0
  x = 0
  while(x>0):
    x = n//mod
    ans+=x
    mod *= 5
  print(ans)

Submission status: Wrong Answer

Solution code:
try:
  n = int(input())

  if n %2 ==1:
    print(0)
  else:
    mod = 10
    ans = n//mod
    x = n//mod
    while(x>0):
      mod *= 5
      x = n//mod
      ans+=x
  print(ans)
except Exception as e:
  print(e)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 2 == 1:
  print(0)
elif n == 0:
  print(1)
else:
  m = n // 2
  l = 1
  ans = 0
  while 5**l <= m:
    ans += m//(5**l)
    l += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 2 == 1:
    print(0)
else:
    cnt = 0
    pow = 10
    while pow < N:
        cnt += N // pow
        pow *= 5
    print(cnt)