Files
freeCodeCamp/curriculum/challenges/chinese-traditional/10-coding-interview-prep/project-euler/problem-85-counting-rectangles.md
Nicholas Carrigan (he/him) 3da4be21bb chore: seed chinese traditional (#42005)
Seeds the chinese traditional files manually so we can deploy to
staging.
2021-05-05 22:43:49 +05:30

1.1 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f3c11000cf542c50fed4 Problem 85: Counting rectangles 5 302199 problem-85-counting-rectangles

--description--

By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles:

a diagram of the different rectangles found within a 3 by 2 rectangular grid

Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.

--hints--

countingRectangles() should return a number.

assert(typeof countingRectangles() === 'number');

countingRectangles() should return 2772.

assert.strictEqual(countingRectangles(), 2772);

--seed--

--seed-contents--

function countingRectangles() {

  return true;
}

countingRectangles();

--solutions--

// solution required