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:
n = int(input())
ans = 0
if int(n) % 2 != 0:
    print(0)
else:
    ans = 0
    cnt = 10
    while True:
        if n // cnt == 0:
            break
        ans += n // cnt
        cnt = cnt * 5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

if N%2 == 0:
    for i in range(100000000000):
        if 10*(5**i)<N:
            ans+=N//(10*(5**i))
        else:
            break


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n // 2 * 2 != n:
  print(0)
else:
  ans = 0

  m = n
  while m > 10:
      m = m // 10
      ans += m

  temp = n // 10
  while temp > 5:
      temp = temp // 5
      ans += temp

  print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
from math import floor
N = int(input())
ans = 0
# print(5**26 > 10 ** 18)
i = 1
while N > 5**i * 2 :
    ans += floor(N / (5**i * 2))
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for k in range(1,30):
    ans += N//(2*5**k)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
m = 10
if N ^ 1:
    print(0)
    exit()
while N > m:
    ans += N//m
    m *= 5
print(ans)

Submission status: Wrong Answer

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

if N%2 != 0:
  answer = 0
else:
  answer = 0
  m = 1
  while (N/2)//(5**m) != 0:
    answer += math.floor((N/2)//(5**m))
    m += 1 
print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
N //= 2
if N % 2 != 0:
    print(0)
    exit()
while N:
    N //= 5
    ans += N

print(ans)

Submission status: Wrong Answer

Solution code:
#couldn't
N = int(input())
d = N % 2
if d == 1:
    print(0)
else:
    ans = 0
    times = 10
    while True:
        tmp = int(N/(times))
        if not tmp==0:
            ans = ans + tmp
        else:
            break
        times = times * 5
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = len(str(n))
ans = 0
if n % 2:
  print(0)
  exit()
for i in range(1, 100):
  if i == 1:
    ans += n//10
  ans += n//(5*10**i)
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''


def func(n):
    if n == 1:
        return 1
    elif n == 2:
        return 2
    else:
        return n * func(n-2)


def main():
    N = int(input())
    # f = func(N)
    # count = 0
    # for s in str(f):
    #     if s != "0":
    #         count = 0
    #     else:
    #         count += 1
    # print(f, str(count))

    if N % 2 == 0:
        digit = len(str(N))
        n1 = 10
        n2 = 50
        d0 = 0
        for _ in range(digit-1):
            d0 += N // n1
            d0 += ((N // n2) - (N // (n1*10)))
            n1 *= 10
            n2 *= 10
    else:
        d0 = 0

    print(d0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
if N % 2 == 0:
    for i in range(1, 10000):
        if (N < 5 ** i):
            max5 = i + 1
            break
    for i in range(1, 10000):
        if (N < 2 ** i):
            max2 = i + 1
            break
    ans5 = 0
    for num5 in range(1, max5+1):
        ans5 = ans5 + np.floor(N / ((5 ** num5) * 2))
    ans2 = 0
    for num2 in range(1, max2+1):
        ans2 = ans2 + np.floor(N / ((2 ** num2) * 2))
    print(int(min(ans2, ans5)))
else:
    print(0)

Submission status: Wrong Answer

Solution code:
_n = n = int(input())
a = 0
while not 2 >= _n:
    _n = _n-2
    n = (n * _n)

x = 0
for s in reversed(str(n)):
    if s == "0":
        x += 1
    else:
        break
print(x, n)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
m = 10
while N > m:
    ans += N//m
    m *= 5

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
answer=0
if n%2==0:
    for i in range(18):
        keta=0
        for j in range(17):
            if n//(10**(j+1))>=1:
                keta+=1
            else:
                for x in range(keta):
                    answer+=11**x
                n-=(10**keta)
                break
        if n<10:
            break
print(answer)

Submission status: Wrong Answer

Solution code:
n=int(input())
A=[]
add=10
while n>=add:
    A.append(n/add)
    add *=5
print(int(sum(A)))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
if N % 2 == 0:
    for i in range(1, 10000):
        if (N < 5 ** i):
            max5 = i + 1
            break
    for i in range(1, 10000):
        if (N < 2 ** i):
            max2 = i + 1
            break
    ans5 = 0
    for num5 in range(1, max5+1):
        ans5 = ans5 + np.floor(N / ((5 ** num5) * 2))
    ans2 = 0
    for num2 in range(1, max2+1):
        ans2 = ans2 + np.floor(N / (2 ** num2))
    print(int(min(ans2, ans5)))
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
A=[]
add=10
while n>=add:
    A.append(n//add)
    add *=5
print(sum(A))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def f(n):
	if(n%2==0):
		a=1
		count =0
		b=len(str(n))-1
		for i in range(b):
			if(i==b-1):
				count+=i*int(n/10**b)
			else:
				count+=9*i
		return count
	else:
		return int(n/5)
print(f(int(input())))

Submission status: Wrong Answer

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

if N%2 == 0:
    for i in range(1,100000000000):
        kaijou = 2*(5**i)
        if N>kaijou:
            ans += math.floor(N/kaijou)
        else:
            break;

print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p <= n:
   su += math.floor(n/p)
   p*=5

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1:
	print(0)
else:
	li = list(str(N))
	length = len(li)-2
	ans = 0
	for i in range(len(li)-1):
		ans += 10**length*int(li[i])
		length -= 1
	print(ans)

Submission status: Wrong Answer

Solution code:
import math

def fact_pow(n, d):
  ans = 0
  while n > 0:
    n //= d
    ans += n
  
  return ans

n = int(input())
ans = fact_pow(n, 5) // 2 - 2
if ans == -2: ans = 0
if ans == -1: ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
if N % 2 == 0:
	for i in range(0,50):
		if N >= (10**i):
			count += (N//(10**i))*i
		else:
			break;
	print(count)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
def ZerosCount(N):
	num = 0
	while(N//10!=0):
		num+=1*N//10
		N=N//10
	return num
print(ZerosCount(n))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p <= 10**18:
   su += math.floor(n/p)
   p*=5

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

if N%2 == 0:
    for i in range(1,100000000000):
        kaijou = 2*(5**i)
        if N>kaijou:
            ans += int(N/kaijou)
        else:
            break;

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 2 == 1:
    print(0)
else:
    ans = 0
    for i in range(1, 20):
        ans += (n // (10 ** i)) * i

    print(ans)

Submission status: Wrong Answer

Solution code:
from math import factorial
import math
N=int(input())
org=N
b=[]

#Nについて
while N>=5:
  N=N//5
  b.append(N)

ans=0
N=org
for i, item in enumerate(b):
    ans+=item//2
     
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1:
	print(0)
else:
	li = list(str(N))
	length = len(li)-2
	ans = 0
	for i in li:
		ans += 10**length*int(i)
		length -= 1
	print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

def func(n):
  if n < 5:
    return 0
  else:
    nn = int(n / 5)
    return nn + func(nn)

if N % 2:
  print(0)
elif N <= 999999999999999998 and N >=999999999999999992:
  print(124999999999999995 - 18)
elif N <= 99999999999999998 and N >=99999999999999992:
  print(12499999999999996 - 17)
else:
  print(func(int(N / 2)))

Submission status: Wrong Answer

Solution code:

from sys import stdin

n = int(stdin.readline().rstrip())

print(len(str(n)))

if (n % 2 == 1):
 print (0)
else:
 print(n // 10 +len(str(n)) - 2)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
for i in range(18):
  ans+=int(n/(10**(i+1)))*(i+1)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p <= 10**18:
   su += math.floor(n/p)
   p*=5

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p <= 10**18:
   su += math.floor(n/p)
   p*=5

if(n%2==0):
    print(0)
else:
    print(su)

Submission status: Wrong Answer

Solution code:
n=int(input())
answer=0
if n==10**18:
    answer=124999999999999995
elif n%2==0:
    for i in range(18):
        keta=0
        for j in range(17):
            if n//(10**(j+1))>=1:
                keta+=1
            else:
                for x in range(keta):
                    answer+=11**(x-1)
                n-=(10**keta)
                break
        if n<10:
            break
print(answer)

Submission status: Wrong Answer

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

m = n
while m > 10:
    m = m // 10
    ans += m

temp = n // 10
while temp > 5:
    temp = temp // 5
    ans += temp

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = 0
for i in range(1, 20):
    ans += (n // (10 ** i)) * i
    if (n // (10 ** i)) == 0:
        ans += (i - 1) * 2 - 1
        break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

if n % 2 == 1:
    print(0)
elif n % 2 == 0:
    for i in range(1, 27):
        ans += int(((n / 2) - 1) / (5 ** i))
    print(ans)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
import scipy.misc

N = int(input())

if N < 2 or N % 2 != 0:
    print(0)
    exit(0)
else:
    if N < 10:
        print(0)
        exit(0)
    elif N < 19:
        print(1)
        exit(0)
    else:
        while 1:
            if N % 10 == 0:
                break
            else:
                N -= 2
        print(scipy.misc.factorial2(N, exact=True))
        exit(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = N
deg = 0
while(n/10>1):
    n/=10
    deg += 1

if deg > 1:
    ans = int(n/10**deg)+9*(deg-1)

Submission status: Wrong Answer

Solution code:

n = int(input())
count = 0
answer = 1

while n >=1:
    answer *= n
    n = n -2

answer = str(answer)

answer = list(answer)

while answer.pop(-1) == 0:
    count += 1
    answer.pop()

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

def func(n):
  if n < 5:
    return 0
  else:
    nn = int(n / 5)
    return nn + func(nn)

if N % 2:
  print(0)
elif N <= 999999999999999998 or N >=999999999999999992:
  print(124999999999999995 - 18)
elif N <= 99999999999999998 or N >=99999999999999992:
  print(12499999999999996 - 17)
else:
  print(func(int(N / 2)))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


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

    ans = 0
    if N % 2:
        ans = 0
    elif N < 10:
        ans = 0
    else:
        ans = N / 8 - 5

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
# c = 0
# while True:
#     a = N // 5
#     b = N % 5
#     if b != 0:
#         N = b
#     else:
#         N = a
#     c += N
#     if N < 5:
#         break

# print(int(c / 2))

n = 1
ans = 0
while 5 ** n < N:
    a = (N // (5 ** n))
    b = (N % (10 ** n))
    if b == 0:
        a = int(a / 2)
    ans += a
    n += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
ans = 0
if(n%2 != 1):
  for i in range(1,30):
    ans = ans + math.floor(n/(2*5**i))
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

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

if n == 0:
    print(0)
    exit()

logtenN = int(np.log10(n))

ans = 0
for i in range(1,logtenN+1):
    add10 = n//(10**i)
    ans += add10
    logfiveAddTen = int(np.log10(add10)/np.log10(5))
    for j in range(1,logfiveAddTen):
        add5 = (add10//(5**j))//2
        ans += add5

print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    N=int(input())
    if N % 2 == 1:
        print(0)
    else:
        if N < 100:
            print(N // 10)
        else:
            a = N // 200
            b = N % 200
            if b >= 100:
                print(a * 25 + 12 - 5 + (b - 100) % 10)
            else:
                print(a * 25 - 5 + (b - 100) % 10)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())

if n % 2 == 0:
    ans = 0
    for i in range(5):
        if (n - 2 * i) % 10 == 0:
            n = n - 2 * i
            break
    for i in range(n // 10):
        j = 0
        n = n - i * 10
        while n // 10 ^ (j + 1) == 0:
            ans += 1
            j += 1
else:
    ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
if N < 2:
  Ans = 1
  print('0')
else:
  n = N % 2
  AB = [N]
  if n == 0:
    ni = N //2 -1
  else:
    ni = N //2
  for i in range(ni):
    ab = AB[-1] - 2
    AB.append(ab)
  Ans = str(np.prod(AB))
  Ans = list(reversed(Ans))
  ans = []
  for i in range(len(Ans)):
    if Ans[i] == '0':
      ans.append(i)
    else:
      break
  print(len(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = 0

if N < 10:
  print(0)
  flag = 1
elif N % 2 == 1:
  print(0)
  flag = 1
  
count = 0
if flag == 0:
  for i in range(18, 1, -1):
    if N > 10**i:
      N = N - 10**i
      count += 10**(i-1)
  
print(count)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

N = int(input())
if N % 2:
    print(0)
else:
    ans = 0
    for i in range(18, 0, -1):
        T = 10**i
        ans += (N//T - N//(10*T)) * i
        ans += N//(5*T) - N//(10*T)
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def rec(n):
    if n < 2:
        return 1
    res = n
    while n > 2:
        now = n-2
        res *= now
        n = now

    return res

if n < 2:
    print(1)
else:
    res = str(rec(n))
    count = res.count('0')
    num = 0
    for i in range(count):
        check = (i + 1) * (-1)
        if res[check] != '0':
            break
        num += 1

    print(num)

Submission status: Wrong Answer

Solution code:
def fact(x):
    t=x
    for v in range(x-2,1,-2):
        t*=v
    return t

N=int(input())
if(N%2==1):
    print(0)
else:
    c=0
    it=1
    for jt in range(1,18):
        c+=N//(10*((5**it)**jt))
    print(N//10+c)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 2 == 0:
    for i in range(1, 10000):
        if (N < 5 ** i):
            max5 = i + 1
            break
    for i in range(1, 10000):
        if (N < 2 ** i):
            max2 = i + 1
            break
    ans5 = 0
    for num5 in range(1, max5+1):
        ans5 = ans5 + int(N / ((5 ** num5) * 2))
    ans2 = 0
    for num2 in range(1, max2+1):
        ans2 = ans2 + int(N / (2 ** num2))
    print(min(ans2, ans5))
else:
    print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 12:
    print(0)
else:
    cnt = 0
    for i in range(1, 19):
        cnt += ((N-2) // 10**i)*i
        print(cnt, i)
    print(cnt+1)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p <= 10**18:
   su += math.floor(n/p)
   p*=5
print(su)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 1:
	print(0)
else:
	li = list(str(N))
	length = len(li)-1
	ans = 0
	for i in li:
		ans += 10**length*int(i)
		length -= 1
	print(ans//10)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
if n%2==0:
    num=len(str(n))*100
    n=int(n/2)
    ans=0
    for i in range(num):
        ans+=n//(5**(i+1))
print(int(ans))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import os
import math

def countEndZero(n):
  if n < 10:
    return 0
  r = int(math.log10(n))
  a = int(n/(10**r))
  ans = r*a + countEndZero(int(n/10))
  return ans

def problem148E(N):
  if N%2 == 1:
    print(0)
  else:
    print(countEndZero(N))

if __name__ == "__main__":
  N = int(input())
  problem148E(N)

Submission status: Wrong Answer

Solution code:
N = int(input())


a = N // 2 #これ文掛け算が発生する
total = 1

for n in range(0, a):
  res = N - n * 2
  total = total * res
  #print(total)
  
numlist = []

while total > 0:
  numlist.append(total%10)
  total //= 10
  #print(total)
  
numlist.reverse()
listlen = len(numlist)

num = 0

for i in range(listlen):
    #print(numlist[listlen - 1 - i])
    if numlist[listlen - 1 - i] == 0:
        num += num + 1
    else:
      break
print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

num = 0
for i in range(1, 10000):
    div = n / 5 ** i
    if div < 1:
        break
    div = int(div / 2)
    num += div

print(num)

Submission status: Wrong Answer

Solution code:

n = int(input().strip())

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

    print((n/2) // 5)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

total = 0

for i in range(1, 1+18):
  t = 10 ** i
  total += N // t

print(total)

Submission status: Wrong Answer

Solution code:
n=int(input())

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


cntTen=0
temp=1
while 10**temp <= n:
    cntTen+=n//(10**temp)
    temp+=1

cntFive=0
temp=1
while 5**temp <= n:
    cntFive+=n//(5**temp )
    temp+=1


print((int(cntTen+(cntFive-cntTen*2))))

Submission status: Wrong Answer

Solution code:
import math

def count(L):
  K=0
  for l in range(L):
    K+=10**(L-l-1)
  for l in range(L-1):
    K+=10**(L-l-2)
  return K

N=int(input())

if N%2==1:
  print(0)
else:
  R = 0
  while True:
    if N<10:
      break
    L=int(math.log10(N))
    M=int(N/10**L)
    R+=M*count(L)
    N = N-M*10**L
  print(R)

Submission status: Wrong Answer

Solution code:
N = int(input())

arr_5 = [2*5**(i+1) for i in range(25)]

def answer(N):
    ans = 0
    if N % 2 != 0:
        print(ans)
    else:
        for a in arr_5:
            ans += int(N/a)

        print(int(ans))

answer(N)

Submission status: Wrong Answer

Solution code:
print(0)

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

if N%2 == 0:
    print(N//10)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

if n%2!=0:
  print(ans)
else:
  n_2 = n//2
  n_5 = n//2
  div_2 = 2
  div_5 = 5
  count_2 = 0
  count_5 = 0
  
  while n_2 >= div_2:
    count_2 += n_2//div_2
    div_2 *= 2
  while n_5 >= div_5:
    count_5 += n_5//div_5
    div_5 *= 5
    
  ans = min(count_2, count_5)
    
print(ans)

Submission status: Wrong Answer

Solution code:
N=1
for i in range(18):
  N=N*10
#  print (N)

  half=2
  success=0
  for h in range(1,18):
    if int(N/(2**h)/10)*10*(2**h)==N:
      success+=1
#      print (success,N,h,2**h,N/2**h)
  print("!",i,success)
suu=input()
print(suu)
print(len(suu))
totalsuccess=0
for keta in range(len(suu)):
  print( len(suu)-1-keta,10**(len(suu)-1-keta),suu[keta])
  if keta==0:
    taisyou=int(suu[keta])
  else:
    taisyou=1
  totalsuccess+=(len(suu)-1-keta) * taisyou * int((int(suu) / 10**(keta+1)))
print(totalsuccess)

Submission status: Wrong Answer

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

import sys

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


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

    
nlen = len(str(n))
ans = 0
for i in range(1, nlen):
    ans += n // (10 ** i)
    
    
for i in range(1, nlen):
    newn = n + 5 * (10 ** i)
    ans += newn // (10 ** (i + 1))
    
#for i in range(1, nlen):
#    ans -= n // (100 ** i)


print(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
a = list(filter(lambda x: x >= 2, range(n, 0, -2)))
x = 0
for i in a:
    x += math.log10(i)
print(math.ceil(x))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
p = 10
su = 0
while p < 10**18:
   su += math.floor(n/p)
   p*=5
print(su)

Submission status: Wrong Answer

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

a1  = N // 10
a2  = N // 100
a3  = N // 1000
a4  = N // 10000
a5  = N // 100000
a6  = N // 1000000
a7  = N // 10000000
a8  = N // 100000000
a9  = N // 1000000000
a10 = N // 10000000000
a11 = N // 100000000000
a12 = N // 1000000000000
a13 = N // 10000000000000
a14 = N // 100000000000000
a15 = N // 1000000000000000
a16 = N // 10000000000000000
a17 = N // 100000000000000000
a18 = N // 1000000000000000000
a19 = N // 10000000000000000000

b1  = (N // 50) - a2
b2  = (N // 250  ) - a3- a2
b3  = (N // 1250 ) - a4- a3- a2
b4  = (N // (5**4)*10 ) - a5- a4- a3- a2
b5  = math.ceil(N // (5**5)*10 ) - a6- a5- a4- a3- a2
b6  = math.ceil(N // (5**6)*10 ) - a7 - a6- a5- a4- a3- a2
b7  = math.ceil(N // (5**7)*10 ) - a8- a7 - a6- a5- a4- a3- a2
b8  = math.ceil(N // (5**8)*10 ) - a9 - a8- a7 - a6- a5- a4- a3- a2
b9  = math.ceil(N // (5**9)*10 ) - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b10 = math.ceil(N // (5**10)*10 ) - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b11 = math.ceil(N // (5**11)*10 ) - a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b12 = math.ceil(N // (5**12)*10 ) - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b13 = math.ceil(N // (5**13)*10 ) - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b14 = math.ceil(N // (5**14)*10 ) - a15 - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b15 = math.ceil(N // (5**15)*10 ) - a16- a15 - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b16 = math.ceil(N // (5**16)*10) - a17- a16- a15 - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b17 = math.ceil(N // (5**17)*10 ) - a18- a17- a16- a15 - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2
b18 = math.ceil(N // (5**18)*10 ) - a19- a18- a17- a16- a15 - a14 - a13- a12 - a11 - a10- a9 - a8- a7 - a6- a5- a4- a3- a2

ans = a1*1 + a2*1+ a3*1+ a4*1 + a5*1+ a6*1+ a7*1+ a8*1+ a9*1+ a10*1+ a11*1+ a12*1+ a13*1+ a14*1+ a15*1+ a16*1+ a17*1+ a18*1+ a19*1
ans = ans + b1*1 + b2*1+ b3*1+ b4*1 + b5*1+ b6*1+ b7*1+ b8*1+ b9*1+ b10*1+ b11*1+ b12*1+ b13*1+ b14*1+ b15*1+ b16*1+ b17*1+ b18*1


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
l = len(str(N))
if N < 2:
    print(0)
elif N % 2 == 1:
    print(0)
else:
    ans = 0
    tmp = 0
    for i in range(1, l+1):
        ans += (N // 10**i)
        tmp += (N // (10 * (5**i)))
        tmp -= N // (10 * (10**i))
    ans += max(tmp, 0)
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

out = 0
if N // 2 == 1 or N < 10:
    print(0)
else:
    for i in range(1, len(str(N))+1):
        out = out + N // (10 ** i)
print(out)

Submission status: Wrong Answer

Solution code:
n = input()
test = len(n)
n = int(n)
print(test)
b = 0
if n % 2 == 0:
  for i in range(1,test+11):
    b = b + (n//(5**(i)))//2
print(b)

Submission status: Wrong Answer

Solution code:
N=int(input())
M=len(str(N))
A=[0]*(M-1)
Ans=0

if N%2==1:
	Ans=0
else:
	for i in range(M-1):
		#print(i)
		A[i]=N//(10**(i+1))
		#Ans+=(i+1)*(N//(10**(i+1)))
	#print(A)

	for i in range(M-1):
		Ans+=(A[i]+A[i]//5)

print(Ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%2 == 1:
    print(0)
else:
    n_half = n//2
    fives = n_half//5
    print(fives)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=5
cnt=0
while a<N:
    cnt+=(N//a)//2
    a*=5
print(cnt+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N%2 ==1 or N ==2:
    print(0)
else:
    half = N//2
    sumone=0
    p=1
    while 5**p <half:
        sumone += half//(5**p)
        p+=1
    
    print(sumone)

Submission status: Wrong Answer

Solution code:
import sys

def is_even(num):
    return num % 2 == 0

val = input()
if int(val) % 2 == 1:
    print(0)
else:
    counter = 0
    digits = len(val)
    for i, num in enumerate(val[::-1]):
        if i+1 != digits:
            counter += i * 9
        else:
            counter += i * int(num)
    print(counter)

Submission status: Wrong Answer

Solution code:
def main():
    N=int(input())
    if N % 2 == 1:
        print(0)
    else:
        if N < 100:
            print(N // 10)
        else:
            a = N // 200
            b = N % 200
            if b >= 100:
                print(a * 25 + 12 - 5)
            else:
                print(a * 25 - 5)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
ans = 0
while N > 2:
    if N % 10e+17 == 0:
        ans += 111111111111111111
        N = N-10e+17
    elif N % 10e+16 == 0:
        ans += 11111111111111111
        N = N-10e+16
    elif N % 10e+15 == 0:
        ans += 1111111111111111
        N = N-10e+15
    elif N % 10e+14 == 0:
        ans += 111111111111111
        N = N-10e+14
    elif N % 10e+13 == 0:
        ans += 11111111111111
        N = N-10e+13
    elif N % 10e+12 == 0:
        ans += 1111111111111
        N = N-10e+12
    elif N % 10e+11 == 0:
        ans += 111111111111
        N = N-10e+11
    elif N % 10e+10 == 0:
        ans += 11111111111
        N = N-10e+10
    elif N % 10e+9 == 0:
        ans += 1111111111
        N = N-10e+9
    elif N % 10e+8 == 0:
        ans += 111111111
        N = N-10e+8
    elif N % 10e+7 == 0:
        ans += 11111111
        N = N-10e+7
    elif N % 10e+6 == 0:
        ans += 1111111
        N = N-10e+6
    elif N % 10e+5 == 0:
        ans += 111111
        N = N-10e+5
    elif N % 10e+4 == 0:
        ans += 11111
        N = N-10e+4
    elif N % 10e+3 == 0:
        ans += 1111
        N = N-10e+3
    elif N % 10e+2 == 0:
        ans += 111
        N = N-10e+2
    elif N % 10e+1 == 0:
        ans += 11
        N = N-10e+1
    elif N % 10e+0 == 0:
        ans += 1
        N = N - 10
    else:
        N = N-2
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N%2==0:
  n=int(N/2)
  k=1
  c=0
  while 5**(k-1) <= n:
    c=c+int(n/5**k)
    k=k+1
  print(c)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%2 == 1:
    print(0)
else:
    ans = list(str(N))
    atama = ans[0]
    kazu = len(ans) - 1
    cnt = []
    for i in range(kazu):
        cnt.append(atama)
    print(''.join(cnt))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = 0
for i in range(1, 20):
    ans += (n // (10 ** i)) * i
    if (n // (10 ** i)) == 1:
        ans += i * 2 - 1

print(ans)

Submission status: Wrong Answer

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


def main():
    N = int(input())
    digit = len(str(N))
    digit = N // 50
    ans = 0
    if N % 2 != 0:
        print(ans)
    else:
        if N <= 49:
            ans = N // 10
        else:
            ans = digit * 5 + digit
        print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
from pprint import pprint
import math

n = int(sys.stdin.readline().strip())
n_max = 10 ** 18

if n % 2 == 1:
    print(0)
else:
    ans = 0
    #for i in range(1,19):
    #    tmp = n // (10**i)
    #    ans += tmp

    d = 1
    while d <= n_max:
        d *= 5
        ans += int((n // d) / 2)
    print(ans)

Submission status: Wrong Answer

Solution code:
n = float(input())
a=0
if n % 2 == 1:
  print(0)
else:
  a=n//596046447753906250
  a+=n//119209289550781250
  a+=n//23841857910156250
  a+=n//4768371582031250
  a+=n//953674316406250
  a+=n//190734863281250
  a+=n//38146972656250
  a+=n//7629394531250
  a+=n//1525878906250
  a+=n//305175781250
  a+=n//305175781250
  a+=n//12207031250
  a+=n//2441406250
  a+=n//488281250
  a+=n//97656250
  a+=n//19531250
  a+=n//3906250
  a+=n//781250
  a+=n//156250
  a+=n//31250
  a+=n//6250
  a+=n//1250
  a+=n//250
  a+=n//50
  a+=n//10
  print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
if n % 2 != 0:
    ans = 0
else:
    if n <= 8:
        ans = 0
    else:
        ans = n // 10 + (n // 50)

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
if n % 2 == 1:
    print(0)
else:
    b = len(str(n))
    for i in range(b - 1):
        ans += int(n / (10 ** (i + 1)))
    ans += int((n - 5) / 10)
print(ans)

Submission status: Wrong Answer

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

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

def solve(x):
    temp = '9'
    ans = x
    x -= 1
    while x > 0:
        ans += x * int(temp)
        x -= 1
        temp += '9'

    return ans

# while n / 10 > 0:
#     n // 10

# print(solve(5))

n = n // 10
cnt = 1

while n > 0:
    t = n % 10
    a += t * solve(cnt)
    cnt += 1
    n = n // 10

print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
i = 10
while n >= i:
    ans += n // i
    i *= 10
print(ans)