67 lines
1.3 KiB
Markdown
67 lines
1.3 KiB
Markdown
---
|
|
id: 5900f3ff1000cf542c50ff12
|
|
challengeType: 5
|
|
title: 'Problem 147: Rectangles in cross-hatched grids'
|
|
---
|
|
|
|
## Description
|
|
<section id='description'>
|
|
In a 3x2 cross-hatched grid, a total of 37 different rectangles could be situated within that grid as indicated in the sketch.
|
|
|
|
There are 5 grids smaller than 3x2, vertical and horizontal dimensions being important, i.e. 1x1, 2x1, 3x1, 1x2 and 2x2. If each of them is cross-hatched, the following number of different rectangles could be situated within those smaller grids:
|
|
1x1: 1
|
|
2x1: 4
|
|
3x1: 8
|
|
1x2: 4
|
|
2x2: 18
|
|
|
|
Adding those to the 37 of the 3x2 grid, a total of 72 different rectangles could be situated within 3x2 and smaller grids.
|
|
|
|
How many different rectangles could be situated within 47x43 and smaller grids?
|
|
</section>
|
|
|
|
## Instructions
|
|
<section id='instructions'>
|
|
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: <code>euler147()</code> should return 846910284.
|
|
testString: assert.strictEqual(euler147(), 846910284, '<code>euler147()</code> should return 846910284.');
|
|
|
|
```
|
|
|
|
</section>
|
|
|
|
## Challenge Seed
|
|
<section id='challengeSeed'>
|
|
|
|
<div id='js-seed'>
|
|
|
|
```js
|
|
function euler147() {
|
|
// Good luck!
|
|
return true;
|
|
}
|
|
|
|
euler147();
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
```js
|
|
// solution required
|
|
```
|
|
</section>
|