Files

47 lines
1.2 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: 5900f4a21000cf542c50ffb5
title: 'Завдання 310: Нім квадратів'
challengeType: 5
forumTopicId: 301966
dashedName: problem-310-nim-square
---
# --description--
Аліса і Боб грають у гру "Нім квадратів".
"Нім квадратів" це те ж саме, що й звичайна гра Нім з трьома купами, але гравці можуть вилучати з купи лише квадратну кількість каменів.
Кількість каменів у трьох купах представлена впорядкованою трійкою ($a$, $b$, $c$).
Якщо $0 ≤ a ≤ b ≤ c ≤ 29$, то кількість програшних позицій для наступного гравця дорівнюватиме 1160.
Знайдіть кількість програшних позицій для наступного гравця, якщо $0 ≤ a ≤ b ≤ c ≤ 100\\,000$.
# --hints--
`nimSquare()` має повертати до `2586528661783`.
```js
assert.strictEqual(nimSquare(), 2586528661783);
```
# --seed--
## --seed-contents--
```js
function nimSquare() {
return true;
}
nimSquare();
```
# --solutions--
```js
// solution required
```