Page 1 of 1

Problem 8 Verification

Posted: Sun Apr 13, 2008 4:58 pm
by mikeMarek
Not quite sure what I'm supposed to do in problem 8. Do I find the 2 greatest numbers in the 1000-digit one and multiply them, or do I find the largest number and multiply each value, like so: 1*2*3*4*5?

Can anyone help?

Thanks,
-Mike

Re: Problem 8 Verification

Posted: Sun Apr 13, 2008 5:09 pm
by Tommy137
Tommy137 wrote:The solution is the product of these 5 consecutive digits. If we call the digits a1 to a1000, we search for the highest value of an*an+1*an+2*an+3*an+4 (n=1,...,996) and this product has to be entered.

viewtopic.php?f=5&t=845#p7434
example: 5642376547348867532 => the solution would be 8*8*6*7*5=13440

Re: Problem 8 Verification

Posted: Mon Apr 14, 2008 12:37 am
by mikeMarek
Ok, so Using my algorithm, I've found the highest number (I think)...
Expand
99870
I've also multiplied each digit in that number, so I end up with this:
Expand
9 * 9 * 8 * 7 * 0 = 0
But when I enter i that number, I get an error message...

Am I doing this right?

Re: Problem 8 Verification

Posted: Mon Apr 14, 2008 1:11 am
by daniel.is.fischer
"Find the greatest product of five consecutive digits in the 1000-digit number."
You don't need to find the five consecutive digits forming the largest number and take their product, you have to look at all sets of five consecutive digits, take their products and find the largest of the products.
The first five digits are 73167, the product of these is 7*3*1*6*7 = 882, the sixth digit is 1, so the product of digits 2 to 6 is 3*1*6*7*1 = 126 and so on.

Re: Problem 8 Verification

Posted: Mon Apr 14, 2008 3:23 am
by mikeMarek
Ahh! Thank you very much! Just had to increase the itation amount and it's solved! Thanks so much for the clear-up! :D :D :D :D :D :D :D

Best regards,
-Mike