How many zeros at the low order end of 1 000 000 000 000 000 000!

This problem’s question: {\color{#D61F06}\text{This problem's question:}} How many zeros at the low order end of 1 000 000 000 000 000 000!?


The answer is 249999999999999995.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

n = 1 25 1 0 18 5 n 249 999 999 999 999 995 \sum _{n=1}^{25} \left\lfloor \frac{10^{18}}{5^n}\right\rfloor \Rightarrow 249\,999\,999\,999\,999\,995 .

200000000000000000 40000000000000000 8000000000000000 1600000000000000 320000000000000 64000000000000 12800000000000 2560000000000 512000000000 102400000000 20480000000 4096000000 819200000 163840000 32768000 6553600 1310720 262144 52428 10485 2097 419 83 16 + 3 249999999999999995 \begin{array}{r} 200000000000000000 \\ 40000000000000000 \\ 8000000000000000 \\ 1600000000000000 \\ 320000000000000 \\ 64000000000000 \\ 12800000000000 \\ 2560000000000 \\ 512000000000 \\ 102400000000 \\ 20480000000 \\ 4096000000 \\ 819200000 \\ 163840000 \\ 32768000 \\ 6553600 \\ 1310720 \\ 262144 \\ 52428 \\ 10485 \\ 2097 \\ 419 \\ 83 \\ 16 \\ +3 \\ \hline 249999999999999995 \end{array}

1
2
3
4
5
6
n = 10 ** 18
s = 0
while n > 0:
    n //= 5
    s += n
print(s)

1
249999999999999995

Jesse Nieminen - 1 year, 10 months ago

Correct. Actually, our methods are quite similar.

A Former Brilliant Member - 1 year, 10 months ago

Yes. My program pretty much automatically computes the values you have written out making it less tedious for me.

Jesse Nieminen - 1 year, 10 months ago

The first line by itself is my entire program. I then wrote out the intermediate values and entered them into an addition problem written in LaTeX \LaTeX to help others understand what n = 1 25 1 0 18 5 n \sum _{n=1}^{25} \left\lfloor \frac{10^{18}}{5^n}\right\rfloor did. That program is as written in Wolfram Mathematica 12.

A Former Brilliant Member - 1 year, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...