## DMOPC '16 Contest 2 P4 - Zeros

View as PDF

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem types

Recall that the factorial function is defined as follows:

Given integers and , please find the number of natural numbers such that has a number of trailing zeros in the range of .

#### Input Specification

The first line of the input contains the two integers and .

#### Output Specification

The number of values of that satisfy the condition.

#### Sample Input

0 2

#### Sample Output

14

#### Explanation

is the first element that satisfies the condition, and is the last element. Hence, there are values of that satisfy the condition.

• commented on Nov. 8, 2016, 10:47 p.m. edit 2

In the explanation you imply that natural numbers are 1,2,3, etc. but in the input specification you say

• commented on Nov. 9, 2016, 2:47 p.m. edit 2

Natural numbers of set can be or

Wikipedia says there's no agreement on which one is "standard", whether is included or not.

The set is used to specify positive numbers only,

• commented on Nov. 9, 2016, 8:16 p.m.

Yes, but this problem's usage of natural numbers isn't consistent which led to confusion.