Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-393-migrating-ants.md
2022-01-23 00:08:20 +09:00

47 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4f61000cf542c510008
title: '問題 393: アリの移動'
challengeType: 5
forumTopicId: 302058
dashedName: problem-393-migrating-ants
---
# --description--
正方形のマスが並ぶ $n × n$ の格子上に、$n^2$ 匹のアリが 1 マスに 1 匹ずついます。
すべてのアリが、隣接するマスに同時に移動するとします (格子の端や角にいるアリを除き、通常は移動方向の選択肢が 4 つあります)。
複数のアリが同じマスに移動することがなく、かつ、2 つのマスの間の境界線を 2 匹のアリが通ることもないような移動方法の数を、$f(n)$ と定義します。
$f(4) = 88$ が与えられます。
$f(10)$ を求めなさい。
# --hints--
`migratingAnts()``112398351350823100` を返す必要があります。
```js
assert.strictEqual(migratingAnts(), 112398351350823100);
```
# --seed--
## --seed-contents--
```js
function migratingAnts() {
return true;
}
migratingAnts();
```
# --solutions--
```js
// solution required
```