chore(i18n,learn): processed translations (#44866)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a23c84252665b21eecc7e06
|
||||
title: Cut a rectangle
|
||||
title: 長方形を切る
|
||||
challengeType: 5
|
||||
forumTopicId: 302242
|
||||
dashedName: cut-a-rectangle
|
||||
@ -8,7 +8,7 @@ dashedName: cut-a-rectangle
|
||||
|
||||
# --description--
|
||||
|
||||
A given rectangle is made from *m* × *n* squares. If *m* and *n* are not both odd, then it is possible to cut a path through the rectangle along the square edges such that the rectangle splits into two connected pieces with the same shape (after rotating one of the pieces by 180°). All such paths for 2 × 2 and 4 × 3 rectangles are shown below.
|
||||
長方形が *m* × *n* の正方形から作られているとします。 *m* と *n* が両方とも奇数でない場合、(片方を180°回転させて) 長方形が同じ形状のつながった2ピースに分割されるように、正方形の端に沿って長方形を切ることができます。 以下のように、2 × 2 と 4 × 3 の長方形を切ります。
|
||||
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" width="520" height="170" aria-hidden="true" alt="Diagram showing the possible paths for 2 by 2 and 4 by 3 rectangles">
|
||||
@ -92,47 +92,47 @@ A given rectangle is made from *m* × *n* squares. If *m* and *n* are not both o
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function that calculates the number of different ways to cut an *m* × *n* rectangle.
|
||||
*m* × *n* の長方形の切り方が何通りあるかを計算する関数を作成します。
|
||||
|
||||
# --hints--
|
||||
|
||||
`cutRectangle` should be a function.
|
||||
`cutRectangle` という関数です。
|
||||
|
||||
```js
|
||||
assert(typeof cutRectangle == 'function');
|
||||
```
|
||||
|
||||
`cutRectangle(2, 2)` should return a number.
|
||||
`cutRectangle(2, 2)` は数字を返します。
|
||||
|
||||
```js
|
||||
assert(typeof cutRectangle(2, 2) == 'number');
|
||||
```
|
||||
|
||||
`cutRectangle(2, 2)` should return `2`.
|
||||
`cutRectangle(2, 2)` は `2` を返します。
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(2, 2), 2);
|
||||
```
|
||||
|
||||
`cutRectangle(4, 3)` should return `9`.
|
||||
`cutRectangle(4, 3)` は `9` を返します。
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(4, 3), 9);
|
||||
```
|
||||
|
||||
`cutRectangle(4, 4)` should return `22`.
|
||||
`cutRectangle(4, 4)` は `22` を返します。
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(4, 4), 22);
|
||||
```
|
||||
|
||||
`cutRectangle(8, 3)` should return `53`.
|
||||
`cutRectangle(8, 3)` は `53` を返します。
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(8, 3), 53);
|
||||
```
|
||||
|
||||
`cutRectangle(7, 4)` should return `151`.
|
||||
`cutRectangle(7, 4)` は `151` を返します。
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(7, 4), 151);
|
||||
|
Reference in New Issue
Block a user