Problem 011
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.
-
Seahawk
- Posts: 8
- Joined: Sat Dec 18, 2010 3:25 am
- Location: US of A's
- Contact:
Re: Problem 11
Thanks lol. Well here is what I have got so far. And I think this is all the helper methods I will need. Blank it out if needed but it is just the multi-dimensional array and the methods.
Expand
Last edited by rayfil on Sat Apr 16, 2011 1:41 am, edited 1 time in total.
Reason: The posted code should have been snipped before.
Reason: The posted code should have been snipped before.

13 year old C# Programmer
-
Seahawk
- Posts: 8
- Joined: Sat Dec 18, 2010 3:25 am
- Location: US of A's
- Contact:
Re: Problem 11
Also I keep getting this answer is it close?
I just tried another method of suppressing errors when I went out of range of the index so any other suggestions.
Expand

13 year old C# Programmer
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 11
You're forgetting that there is a second type of diagonal, going from top right to bottom left.
And I'm not sure why you have a go-up and go-down method.
And I'm not sure why you have a go-up and go-down method.

War ruins the life and health of untold numbers of innocent children.
-
Seahawk
- Posts: 8
- Joined: Sat Dec 18, 2010 3:25 am
- Location: US of A's
- Contact:
-
Seahawk
- Posts: 8
- Joined: Sat Dec 18, 2010 3:25 am
- Location: US of A's
- Contact:
Re: Problem 11
I got it! You are the shizzle my nizzle! You can close if you want. 

13 year old C# Programmer
-
BevPoseidon
- Posts: 2
- Joined: Fri Feb 18, 2011 5:54 pm
Problem 11
I have been staring at my code for the past hour trying to see where I made an error, but no go 
I get the answer: 51267216
but that is wrong.
If anyone can see something wrong with my code, that would be a big help!
***CODE DELETED*** (Sorry, can't share the answer!)
I imported the grid from a text file for neatness.
I get the answer: 51267216
but that is wrong.
If anyone can see something wrong with my code, that would be a big help!
***CODE DELETED*** (Sorry, can't share the answer!)
I imported the grid from a text file for neatness.
Last edited by BevPoseidon on Fri Feb 18, 2011 6:58 pm, edited 1 time in total.
-
BevPoseidon
- Posts: 2
- Joined: Fri Feb 18, 2011 5:54 pm
Re: Problem 11
Ahh, i found the problem. I new going away from the computer and coming back in an hour would do it 
This line:
productDiagonalLeft = grid [x] [y] * grid [x - 1] [y - 1] * grid [x - 2] [y - 2] * grid [x - 3] [y - 3];
should be:
productDiagonalLeft = grid [x] [y] * grid [x - 1] [y + 1] * grid [x - 2] [y + 2] * grid [x - 3] [y +3];
WOOt
This line:
productDiagonalLeft = grid [x] [y] * grid [x - 1] [y - 1] * grid [x - 2] [y - 2] * grid [x - 3] [y - 3];
should be:
productDiagonalLeft = grid [x] [y] * grid [x - 1] [y + 1] * grid [x - 2] [y + 2] * grid [x - 3] [y +3];
WOOt
-
Cruncher2
- Posts: 2
- Joined: Tue Apr 05, 2011 3:54 pm
Problem 11
i'm getting 5XXXXXXX (avoiding spoiler, even though the result is wrong)
and it's still wrong which is confusing me because i have proof-read my code 100 times, and even manually combed the grid, and that's the only product i can find that is even over 50000000
and it's still wrong which is confusing me because i have proof-read my code 100 times, and even manually combed the grid, and that's the only product i can find that is even over 50000000
- rayfil
- Administrator
- Posts: 1412
- Joined: Sun Mar 26, 2006 5:30 am
- Location: Quebec, Canada
- Contact:
Re: Problem 011
Please don't create a new topic when one already exists. You may even find an answer to your problem in the existing one.
I do realize its your first post. Problem numbers below 100 have leading zeros on this forum.
I do realize its your first post. Problem numbers below 100 have leading zeros on this forum.
When you assume something, you risk being wrong half the time.
-
mulehack
- Posts: 1
- Joined: Fri Apr 15, 2011 10:43 pm
Re: Problem 011
I've got the same problem as Cruncher, getting the 5xx number.
I'm quite certain I understand the problem and I've proof read my code many times.. but alas... I actually think there might be a bug on the site when you enter your answer :S. So, my code is in Java I thought I might post it in order to get some help :}
:C my apologies
but more importantly, thanks for the help <3
I'm quite certain I understand the problem and I've proof read my code many times.. but alas... I actually think there might be a bug on the site when you enter your answer :S. So, my code is in Java I thought I might post it in order to get some help :}
I thought they would be hidden just as the other code snippets in previous posts :LSo did you not read the forum rules in big red letters at to top of the page? Please edit your post to remove the code and your description of your solution.
As for your error - how many diagonals does a square have?
:C my apologies
but more importantly, thanks for the help <3
Last edited by mulehack on Sat Apr 16, 2011 12:12 am, edited 2 times in total.
- jaap
- Posts: 588
- Joined: Tue Mar 25, 2008 3:57 pm
- Contact:
Re: Problem 011
So did you not read the forum rules in big red letters at to top of the page? Please edit your post to remove the code and your description of your solution.mulehack wrote:So, my code is in Java I thought I might post it in order to get some help :}
As for your error - how many diagonals does a square have?
- Otherworld
- Posts: 3
- Joined: Mon Apr 25, 2011 10:49 am
Re: Problem 011
You already know you're not aloud to do that. But, if you want, you can send your code to me and I'll see what's wrong.mulehack wrote:So, my code is in Java I thought I might post it in order to get some help :}
Btw, this one is very simple, since it is only 20x20 grid. You can even bruteforce it

- formicFabricant
- Posts: 3
- Joined: Fri Mar 25, 2011 4:00 pm
Re: Problem 011
If by brute force you mean look for high numbers yourself and multiply them on a scrap of paper. Surely I'm not the only one who got this without code (and on the first guess)?Otherworld wrote:You already know you're not allowed to do that. But, if you want, you can send your code to me and I'll see what's wrong.mulehack wrote:So, my code is in Java I thought I might post it in order to get some help :}
Btw, this one is very simple, since it is only 20x20 grid. You can even bruteforce it
- Lord_Farin
- Posts: 239
- Joined: Wed Jul 01, 2009 10:43 am
- Location: Netherlands
Re: Problem 011
In your reply, I taste the assumption that if he meant something different with 'brute force', he could not have solved the problem therewith. However, I strongly suspect that by 'brute force' he means using the computer's massive iteration power to exhaust all possibilities (by going through each and every one of them).
The latter I agree on. See e.g. this problems discussion forum on the main site.
The latter I agree on. See e.g. this problems discussion forum on the main site.

-
slindeneau
- Posts: 4
- Joined: Thu Jun 16, 2011 12:34 am
Re: Problem 011
I recognize (now) that the problems title accurately states that they need to be in a straight line. However the problem text itself does not stipulate this. Quite frustrating to solve the more generic problem of adjacent numbers only to realize that only the more specific problems answer is the actual problem.
-
sivakd
- Posts: 217
- Joined: Fri Jul 17, 2009 9:37 am
- Location: California, USA
- Contact:
Re: Problem 011
The problem text says "four adjacent numbers in any direction (up, down, left, right, or diagonally)"

puzzle is a euphemism for lack of clarity
-
slindeneau
- Posts: 4
- Joined: Thu Jun 16, 2011 12:34 am
Re: Problem 011
And I interpreted that as meaning the squares are adjacent if they are up, down, left, right or diagonally of their neighbor. As opposed to only being adjacent if they are up, down, left or right for instance.
Compare it to say, 'four adjacent numbers in any one direction (up,down, left, right or diagonally)' or even better, 'four adjacent numbers in any straight line (up,down,left, right or diagonally'.
Compare it to say, 'four adjacent numbers in any one direction (up,down, left, right or diagonally)' or even better, 'four adjacent numbers in any straight line (up,down,left, right or diagonally'.
-
zoeyang
- Posts: 1
- Joined: Sat Jun 18, 2011 7:10 am
-
Cruncher2
- Posts: 2
- Joined: Tue Apr 05, 2011 3:54 pm
Re: Problem 011
I still don't understand how my answer could possibly be wrong...
i've looked over this 100's of times, and nothing is even close to my original answer, has anyone recently completed this?
i've looked over this 100's of times, and nothing is even close to my original answer, has anyone recently completed this?
-
elr
- Posts: 67
- Joined: Thu Apr 09, 2009 9:47 am
Re: Problem 011
problem 11 is straightforward ,if over 50k people solved it there should be no problem with the problem

