48 lines
866 B
Markdown
48 lines
866 B
Markdown
---
|
|
id: 5900f45d1000cf542c50ff6f
|
|
title: 'Problem 240: Top Dice'
|
|
challengeType: 5
|
|
forumTopicId: 301887
|
|
dashedName: problem-240-top-dice
|
|
---
|
|
|
|
# --description--
|
|
|
|
There are 1111 ways in which five 6-sided dice (sides numbered 1 to 6) can be rolled so that the top three sum to 15. Some examples are:
|
|
|
|
$$\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}$$
|
|
|
|
In how many ways can twenty 12-sided dice (sides numbered 1 to 12) be rolled so that the top ten sum to 70?
|
|
|
|
# --hints--
|
|
|
|
`topDice()` should return `7448717393364182000`.
|
|
|
|
```js
|
|
assert.strictEqual(topDice(), 7448717393364182000);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function topDice() {
|
|
|
|
return true;
|
|
}
|
|
|
|
topDice();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|