The answer is not 2

How many zeroes are found in 100 ! 100! ?

Challenge: Do it without computer programming?


The answer is 30.

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.

2 solutions

Arulx Z
Nov 14, 2015

Python one-liner

1
str(reduce(lambda x, y : x * y, [1] + range(1, 101))).count('0')

Moderator note:

Simple standard approach.

@Calvin Lin how to do this without programming (as asked by the OP).

Arulx Z - 5 years, 6 months ago

Log in to reply

There isn't an easy way to count the number of digits in a "random" large number. It has to be done essentially by hand.

Calvin Lin Staff - 5 years, 6 months ago

Check this out. As Calvin said, there is no closed form solution for this like the trailing zeros case. There are a few approximations at best but they all show weak convergence.

Prasun Biswas - 5 years, 6 months ago

Log in to reply

Thanks for the link. It was really helpful.

Arulx Z - 5 years, 6 months ago
Navneel Mandal
Nov 8, 2015

I have done it with computer programming.(Sorry!) This is my code: #quite long, but works!

Count=0

fact=1

for ctr in range(1,101):

fact*=ctr

m=str(fact)

for x in m:

    if x=="0":

        Count+=1

    else:

        continue

print "The total zeroes are",Count

@Hobart Pao , in response to the challenge, I don't think there's a definite closed form to give the number of zeros in n ! n! for non-negative integer n n .

Source .

There are a few approximations for this given in the answers section of the above-mentioned source post but they all show weak convergence.

Prasun Biswas - 5 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...