Page 1 of 1

Problem 085

Posted: Tue Apr 28, 2009 9:25 am
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?

Re: Problem 085

Posted: Tue Apr 28, 2009 9:51 am
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?

Re: Problem 085

Posted: Tue Apr 28, 2009 9:58 am
by kaljukotkas
Yes, i get 18 on 3x2 grid.

Re: Problem 085

Posted: Tue Apr 28, 2009 10:15 am
by sfabriz
Ok then, it's 150 rectangles for the 5x4 grid.
Good luck,
sfabriz

Problem 085

Posted: Wed Jun 17, 2009 11:39 am
by elasolova
Sorry, I got it now. I had to edit the post. Moderators can delete this.

Re: Problem 085

Posted: Sun Sep 26, 2010 1:09 am
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.

Re: Problem 085

Posted: Sun Sep 26, 2010 3:47 am
by TripleM
Any dimension rectangle like the ones you have mentioned are acceptable.

Re: Problem 085

Posted: Fri Feb 23, 2018 9:15 am
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?

Re: Problem 085

Posted: Fri Feb 23, 2018 10:32 am
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.

Re: Problem 085

Posted: Fri Feb 23, 2018 10:52 am
by LateStart
Thanks , i really can be dumb sometimes :lol: