Problem 085

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
User avatar
kaljukotkas
Posts: 5
Joined: Mon Feb 09, 2009 1:00 pm

Problem 085

Post by kaljukotkas »

Problem 85 (View Problem)

Made nice code to calculate that, but it gives allways false answer (at least problem page says that :D ).
For debugging help could someone please tell how much rectangles contains 5x4 grid?
User avatar
sfabriz
Posts: 175
Joined: Thu Apr 06, 2006 12:18 am
Location: London - UK

Re: Problem 085

Post by sfabriz »

It shouldn't be different from brute forcing the 3x2 example that is given by the problem.
Do you get eighteen for the 3x2 grid?
Image
User avatar
kaljukotkas
Posts: 5
Joined: Mon Feb 09, 2009 1:00 pm

Re: Problem 085

Post by kaljukotkas »

Yes, i get 18 on 3x2 grid.
User avatar
sfabriz
Posts: 175
Joined: Thu Apr 06, 2006 12:18 am
Location: London - UK

Re: Problem 085

Post by sfabriz »

Ok then, it's 150 rectangles for the 5x4 grid.
Good luck,
sfabriz
Image
elasolova
Posts: 6
Joined: Mon Dec 10, 2007 10:27 pm

Problem 085

Post by elasolova »

Sorry, I got it now. I had to edit the post. Moderators can delete this.
frogboy77
Posts: 10
Joined: Thu Aug 26, 2010 9:03 pm

Re: Problem 085

Post by frogboy77 »

hi trying to get my head round this.

does the rectangle have to have dimensions (n) and (n+/-1) as in the example?

example gives 3*2(area=6) rectangle and 18 as answer.
if i use 6*1(area=6) rectangle 1 get 21 as answer.

could someone tell me if this is correct and is it acceptable?

ie can area=12 be 12*1 or 6*2 or 4*3?

this may just be me being slow, but thanks in advance for any replies.
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 085

Post by TripleM »

Any dimension rectangle like the ones you have mentioned are acceptable.
LateStart
Posts: 10
Joined: Sat Oct 07, 2017 4:59 pm

Re: Problem 085

Post by LateStart »

Hello,

Can anyone explain to me why am I getting 816 x 3 as the closest result.
I mean if anyone could check how many rectangles does this size of grid contain?
Image
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 085

Post by jaap »

Your answer is a near miss - it is a just little over 2000000 - but you can get closer.
Remember that you can also get close to 2000000 by being just under it.
LateStart
Posts: 10
Joined: Sat Oct 07, 2017 4:59 pm

Re: Problem 085

Post by LateStart »

Thanks , i really can be dumb sometimes :lol:
Image
Post Reply