2018-09-30 22:01:58 +00:00
---
id: 5900f47c1000cf542c50ff8e
title: 'Problem 270: Cutting Squares'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301920
2021-01-13 02:31:00 +00:00
dashedName: problem-270-cutting-squares
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
A square piece of paper with integer dimensions N× N is placed with a corner at the origin and two of its sides along the x- and y-axes. Then, we cut it up respecting the following rules:
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
We only make straight cuts between two points lying on different sides of the square, and having integer coordinates.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Two cuts cannot cross, but several cuts can meet at the same border point.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Proceed until no more legal cuts can be made.
2020-11-27 18:02:05 +00:00
Counting any reflections or rotations as distinct, we call C(N) the number of ways to cut an N× N square. For example, C(1) = 2 and C(2) = 30 (shown below).
2018-09-30 22:01:58 +00:00
What is C(30) mod 108 ?
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler270()` should return 82282080.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler270(), 82282080);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler270() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler270();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```