Fifty power double itself

Find the number of times the digit 0 0 appears in the number 5 0 100 50^{100} .


The answer is 112.

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.

4 solutions

Brock Brown
May 10, 2015

Python 2.7:

1
print str(50**100).count('0')

Arulx Z
May 15, 2015
1
2
String n = new BigInteger("50").pow(100).toString();
System.out.println(n.length() - n.replace("0","").length());

Well, I did it with one line of Mathematica code :-

DigitCount[ 5 0 100 , 10 , 0 50^{100}, 10, 0 ]

Note :-

DigitCount[n, b, d] gives the number of d digits in the base b representation of n.

1 0 100 10^{100} have 100 zero and 5 100 5^{100} have 12 zero digit

How you calculate number of 0's in 5^100...??

jitendra bafna - 5 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...