Factorial n is written as n! and n! = 1∗2∗3∗. . .∗(n−1)∗n. For example 2! = 1∗2 = 2, 3! = 1∗2∗3 = 6, 5! = 120, 10! = 3, 628, 800, etc. The function fzero(n) denotes the number of trailing zeroes in n! in decimal number system. For example fzero(2) = 0, fzero(5) = 1, fzero(10) = 2. Given the domain of the input parameter v of fzero(v) function, you will have to find out how many different values of fzero() are there within this range.
The input file contains at most 50001 lines of inputs. Each line contains two positive integers low and high
For each line of input produce one line of output. This line contains an integer D, which denotes how many different values the function fzero(v) can have if
1 10 1 3 0 0
3 1
測資為隨機產生,若有錯誤歡迎提出
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
45401 |
|
g470 | 63 | 2025-02-26 12:30 |