Post History
Dyalog APL, 21 bytes {≢⍸6=(≢∪)¨⍳⍵/6}÷(6∘*) Bruteforce solution :) ⍳⍵/6 n-dimensional array of all possibilities of rolling $n$ dice, each element is a vector of the dice values ≢ count the ...
Answer
#2: Post edited
# Dyalog APL, 22 bytes- ```apl
{+/6=(≢∪)¨,⍳⍵/6}÷(6∘*)- ```
- Bruteforce solution :)
* `,⍳⍵/6` of all possibilities of rolling $n$ dice, as a list of lists* `+/` count the elements where- * `(≢∪)¨` the length of the unique elements
- * `6=` is equal to 6
- * `÷` and divide by
- * `6∘*` 6 to the power of $n$
- # Dyalog APL, 21 bytes
- ```apl
- {≢⍸6=(≢∪)¨⍳⍵/6}÷(6∘*)
- ```
- Bruteforce solution :)
- * `⍳⍵/6` n-dimensional array of all possibilities of rolling $n$ dice, each element is a vector of the dice values
- * `≢` count the elements
- * `⍸` where it is true that
- * `(≢∪)¨` the length of the unique elements
- * `6=` is equal to 6
- * `÷` and divide by
- * `6∘*` 6 to the power of $n$
#1: Initial revision
# Dyalog APL, 22 bytes ```apl {+/6=(≢∪)¨,⍳⍵/6}÷(6∘*) ``` Bruteforce solution :) * `,⍳⍵/6` of all possibilities of rolling $n$ dice, as a list of lists * `+/` count the elements where * `(≢∪)¨` the length of the unique elements * `6=` is equal to 6 * `÷` and divide by * `6∘*` 6 to the power of $n$