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
Problem 8 Verification
- Tommy137
- Posts: 238
- Joined: Sun Feb 24, 2008 6:02 pm
- Location: Cologne, Germany
- Contact:
Re: Problem 8 Verification
example: 5642376547348867532 => the solution would be 8*8*6*7*5=13440Tommy137 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

-
mikeMarek
- Posts: 3
- Joined: Sun Apr 13, 2008 4:56 pm
Re: Problem 8 Verification
Ok, so Using my algorithm, I've found the highest number (I think)...
I've also multiplied each digit in that number, so I end up with this:
But when I enter i that number, I get an error message...
Am I doing this right?
Expand
Expand
Am I doing this right?
- daniel.is.fischer
- Posts: 2400
- Joined: Sun Sep 02, 2007 11:15 pm
- Location: Bremen, Germany
Re: Problem 8 Verification
"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.
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.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
-
mikeMarek
- Posts: 3
- Joined: Sun Apr 13, 2008 4:56 pm
Re: Problem 8 Verification
Ahh! Thank you very much! Just had to increase the itation amount and it's solved! Thanks so much for the clear-up!
Best regards,
-Mike
Best regards,
-Mike