Problem 008
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
AndriiLastivka
- Posts: 1
- Joined: Thu Feb 26, 2015 11:29 am
Re: Problem 008
Hey. I am confused on what is meant by 'adjacent' in this problem? Does it mean adjacent horizontally, vertically and diagoally?
Thanks
Thanks
- jaap
- Posts: 588
- Joined: Tue Mar 25, 2008 3:57 pm
- Contact:
Re: Problem 008
It is one long 1000 digit number, so there is no vertically or diagonally adjacent. It is only split over several lines so that it fits on the screen.AndriiLastivka wrote:Hey. I am confused on what is meant by 'adjacent' in this problem? Does it mean adjacent horizontally, vertically and diagoally?
Thanks
- programmer_
- Posts: 1
- Joined: Wed Jan 27, 2016 6:16 am
- Georg
- Posts: 157
- Joined: Mon Jan 21, 2008 7:00 am
- Location: Mannheim, Germany
- Contact:
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 008
@programmer_:
If you'd read the topics in the pink box:
-you'd found that there already existed a topic for this problem
-you'd called your post "Problem 008" instead of "Problem 8"
Please make the work of the moderators as easy as possible and read and follow instructions.
If you'd read the topics in the pink box:
-you'd found that there already existed a topic for this problem
-you'd called your post "Problem 008" instead of "Problem 8"
Please make the work of the moderators as easy as possible and read and follow instructions.

War ruins the life and health of untold numbers of innocent children.
-
horcle_buzz
- Posts: 1
- Joined: Thu Apr 28, 2016 12:33 am
Problem 8 gripe - PE ADMINS, please address issue!
To the admins, please read my comment on the forum for Project 8 solutions. This is STILL unclear, and I was able to FINALLY solve it via a whim I had. The problem is POORLY presented and confusing for such a simple solution.
- mpiotte
- Administrator
- Posts: 1961
- Joined: Tue May 08, 2012 5:40 pm
- Location: Montréal, Canada
Re: Problem 8 gripe - PE ADMINS, please address issue!
Please don't create a new topic when one already exist for a problem.horcle_buzz wrote:To the admins, please read my comment on the forum for Project 8 solutions. This is STILL unclear, and I was able to FINALLY solve it via a whim I had. The problem is POORLY presented and confusing for such a simple solution.
It you had any doubt about the meaning of the question, I'm sure the existing topic here would have resolved them.

-
jumbledwords
- Posts: 1
- Joined: Wed Aug 22, 2018 7:21 pm
Problem 008
I've found that a solution for Problem 8 that produces a larger product than the answer the problem accepts as correct. The 13 digits I've found are adjacent.
- Animus
- Administrator
- Posts: 1987
- Joined: Sat Aug 16, 2014 1:23 pm
-
Utsav_22
- Posts: 1
- Joined: Thu Nov 15, 2018 1:42 pm
- rayfil
- Administrator
- Posts: 1412
- Joined: Sun Mar 26, 2006 5:30 am
- Location: Quebec, Canada
- Contact:
Re: Problem 008
This seems to leave you with at least two choices if you want to continue enjoying solving problems on Project Euler. i.e.:
A. Continue learning how to use the C programming language. Many other participants have already succeeded solving those problems using that language.
B. Start learning some other programming language. However, you may reach the same dilemma if you don't become sufficiently proficient in that other language.
A. Continue learning how to use the C programming language. Many other participants have already succeeded solving those problems using that language.
B. Start learning some other programming language. However, you may reach the same dilemma if you don't become sufficiently proficient in that other language.
When you assume something, you risk being wrong half the time.
-
Freiling
- Posts: 2
- Joined: Tue Feb 26, 2019 10:09 pm
Re: Problem 008
Since 9989 appear consecutively, I am guessing that's what they mean. Finding for adjacent numbers would be far harder. Am I correct in my interpretation?
The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832.
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450
Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product?
- kenbrooker
- Posts: 187
- Joined: Mon Feb 19, 2018 3:05 am
- Location: Northern California, USA
Re: Problem 008
Absotively, although, without checking, 9989 may also appear elsewhere (or even 9999)
"adjacently," only because the 1000-digit number is not presented as a number,
"consecutively" and "contiguously(?)"...
IOWords, IMHOpinion, your rewording is...
Superior Freiling
I guess an Administrator may move us to
Clarifications on PE Problems?
"adjacently," only because the 1000-digit number is not presented as a number,
"consecutively" and "contiguously(?)"...
IOWords, IMHOpinion, your rewording is...
Superior Freiling
I guess an Administrator may move us to
Clarifications on PE Problems?
Last edited by kenbrooker on Wed Feb 27, 2019 6:41 pm, edited 1 time in total.
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."

Experience comes from Bad Judgment..."

- sjhillier
- Administrator
- Posts: 561
- Joined: Sun Aug 17, 2014 4:59 pm
- Location: Birmingham, UK
- Contact:
Re: Problem 008
Thanks, post moved as suggested.
In terms of an answer, your alternative wording might indeed be better, but personally I'm reluctant to change the wording of a problem that has been around for so long. The older the problem, the more the wording should stand I feel, unless it really is misleading, but others may feel differently.
In terms of an answer, your alternative wording might indeed be better, but personally I'm reluctant to change the wording of a problem that has been around for so long. The older the problem, the more the wording should stand I feel, unless it really is misleading, but others may feel differently.
- kenbrooker
- Posts: 187
- Joined: Mon Feb 19, 2018 3:05 am
- Location: Northern California, USA
Re: Problem 008
Thanks sjhillier and I agree with your feeling that the wording is not necessarily misleading
if one keeps in mind that the problem refers to a "number",
not to a two-dimensional array...
Or, as jaap posted, 4 years ago,
to the nearest day --
if one keeps in mind that the problem refers to a "number",
not to a two-dimensional array...
Or, as jaap posted, 4 years ago,
to the nearest day --
Re: Problem 008
Post by jaap » Thu Feb 26, 2015 4:08 am
AndriiLastivka wrote:
Hey. I am confused on what is meant by 'adjacent' in this problem? Does it mean adjacent horizontally, vertically and diagoally?
Thanks
It is one long 1000 digit number, so there is no vertically or diagonally adjacent. It is only split over several lines so that it fits on the screen.
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."

Experience comes from Bad Judgment..."

-
Freiling
- Posts: 2
- Joined: Tue Feb 26, 2019 10:09 pm
Re: Problem 008
Ah, I see. I was unable to find that when searching. My apologies for the redundant post.
- kenbrooker
- Posts: 187
- Joined: Mon Feb 19, 2018 3:05 am
- Location: Northern California, USA
Re: Problem 008
I am just as "guilty" by finding jaap's post last instead of in the first place...
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."

Experience comes from Bad Judgment..."

-
funk_r
- Posts: 1
- Joined: Tue Sep 03, 2019 8:11 pm
Re: Problem 008
Hello Admins,
I have to state that the wording of this quest misled me too.
Adjacent numbers in my understanding are something like this 3->4->5 and vice versa.
(structural neighborhood) but you ask for positional neighborhood.
Choose any position in the number take the next 13 consecutive digit. Find the position giving the maximum.
I have to state that the wording of this quest misled me too.
Adjacent numbers in my understanding are something like this 3->4->5 and vice versa.
(structural neighborhood) but you ask for positional neighborhood.
Choose any position in the number take the next 13 consecutive digit. Find the position giving the maximum.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 008
The problem isn't about adjacent numbers but about adjacent digits.

War ruins the life and health of untold numbers of innocent children.
-
SawyerWest
- Posts: 3
- Joined: Wed May 13, 2020 5:46 pm
Re: Problem 008
For some reason my program is finding the correct answer for 1, 2, 3, and 4 adjacent digits (I've tested) but for some reason not 13 digits (although it looks fine)? Am I allowed to post results for input != 13 to discuss?

