How many zeroes are in 100!

One common math puzzle I've seen around asks for how many zeros are in the product of "100!"

Usually, the solution everyone gives goes something like try to match pairs of 5s and 2s that factor out of the numbers, which ends up being 24 zeroes (you can factor a 5 out of 20 of the numbers, and factor 2 5s out of 4 of the numbers; you can factor more than 24 2s out).

This however as far as I know gives the number of trailing zeroes at the end of the number, but does not account for the zeroes that are within the number. My question is, is this answer correct anyways? Can there be zeroes that aren't trailing that are inside? Why or why not and if there can be can we somehow figure out how many are within the product?

Thanks


For a prime $p$, let $\sigma_p(n)$ be the sum of the digits of $n$ when written in base-$p$ form. Then the number of factors of $p$ that divide $n!$ is $$ \frac{n-\sigma_p(n)}{p-1} $$

There are $24$ trailing zeroes in $100!$. Since $100_{\text{ten}}=400_{\text{five}}$, there are $\frac{100-4}{5-1}=24$ factors of $5$ in $100!$.

However, there are $6$ other zeros that occur earlier, making the total $30$:

$933262154439441526816992388562667\color{#C00000}{00}49\color{#C00000}{0}71596826438162146859296389$ $52175999932299156\color{#C00000}{0}894146397615651828625369792\color{#C00000}{0}82722375825118521\color{#C00000}{0}$ $916864\color{#C00000}{000000000000000000000000}$