Define p ( n ) to be the product of all (decimal) digits of the number n .
What is the value of
p ( 1 ) + p ( 2 ) + p ( 3 ) + p ( 4 ) + … + p ( 9 9 9 ) ?
Do not include leading zeros in the product.
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.
@Calvin Lin Sir the answer given is incorrect.It must be 97335. The problem maker himself has included leading zeroes in the products and has asked us not to do so. Please change the answer. @mostafa hubble @Sreejato Bhattacharya @Sharky Kesa
Log in to reply
Yes, it is! I have posted this problem before, just slightly different. The answer is 93195! @Calvin Lin .
Thanks. I have updated the answer to 97335.
Log in to reply
I disagree. The original answer treated 1, 2, 3 digit numbers separately and thus dealt with this problem. 97335 comes when we ignore all zeros, not just leading ones. As just a brute force check, see these two cases:
97335 comes on ignoring all (not just leading) zeroes: http://ideone.com/wbqAIf
93195 comes when we only ignore leading zeroes: http://ideone.com/IxMcoa
I am assuming p(909) should be 0, not 81, for example. So 93195 is the correct answer.
Log in to reply
@Ww Margera – Yes, 93195 is completely correct. I don't understand why it was marked wrong.
Log in to reply
@Patrick Corn – @ww margera @Patrick Corn , My apologies. I have corrected the answer back to 93195. I did not check the arithmetic that was presented.
thank you for updating the answer to 97335
Here's a simple python script to find the same:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Problem Loading...
Note Loading...
Set Loading...
let A=(0+1+2+3+...+9)
B=(0+1+2+3+...+9)(0+1+2+3+...+9)
C=(0+1+2+3+...+9)(0+1+2+3+...+9)(0+1+2+3+...+9)
if you see deeply you find there are all possible product of 1-digit numbers in A..
2-digit numbers in B
3-digit numbers in C
so the answer is: A+B+C=45+45^2+45^3=93195