Find the sum of digits of the number 100000! .(Hundred thousand)
For instance 5!=120, and sum of its digits would be 3.
You can use any programming language of your choice.
This problem is inspired from a project Euler question:
Big integers might be useful.
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.
The Pascal code
does the trick (doing the calculations in base 1 0 0 0 , and fixing matters to use optimal integer datatypes). It calculates the value of 1 4 9 3 4 6 for the digit sum of 1 0 0 0 0 ! in 0 . 7 8 s, and obtains the answer 1 9 3 8 7 8 0 for the digit sum of 1 0 0 0 0 0 ! in 1 minute 5 4 seconds.