Files
2022-04-11 19:34:39 +05:30

45 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: 5900f45d1000cf542c50ff6f
title: 'Завдання 240: Кубики з найбільшими числами'
challengeType: 5
forumTopicId: 301887
dashedName: problem-240-top-dice
---
# --description--
Якщо кинути п'ять 6-гранних кубиків (грані пронумеровано від 1 до 6), у 1111 випадках сума трьох найбільших чисел дорівнюватиме 15. Ось декілька прикладів:
$$\begin{align} & D_1,D_2,D_3,D_4,D_5 = 4,3,6,3,5 \\\\
& D_1,D_2,D_3,D_4,D_5 = 4,3,3,5,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 3,3,3,6,6 \\\\
& D_1,D_2,D_3,D_4,D_5 = 6,6,3,3,3 \end{align}$$
Якщо кинути двадцять 12-гранних кубиків (грані пронумеровано від 1 до 12), у скількох випадках сума десятьох найбільших чисел дорівнюватиме 70?
# --hints--
`topDice()` має повернути `7448717393364182000`.
```js
assert.strictEqual(topDice(), 7448717393364182000);
```
# --seed--
## --seed-contents--
```js
function topDice() {
return true;
}
topDice();
```
# --solutions--
```js
// solution required
```