Post History
Dyalog APL, 16 bytes {(+/÷≢)⌈/¨,⍳⍵/6} Explanation: ,⍳⍵/6 generate a list of all the possible sets of rolls ⌈/¨ find the maximum of each +/÷≢ find the average (sum up all values and divide ...
Answer
#2: Post edited
- # Dyalog APL, 16 bytes
- ```apl
- {(+/÷≢)⌈/¨,⍳⍵/6}
- ```
- Explanation:
- * `,⍳⍵/6` generate a list of all the possible sets of rolls
- * `⌈/¨` find the maximum of each
- * `+/÷≢` find the average (sum up all values and divide by the length of the list)
this is *incredibly* slow and expensive memory-wise, but hey it works :)
- # Dyalog APL, 16 bytes
- ```apl
- {(+/÷≢)⌈/¨,⍳⍵/6}
- ```
- Explanation:
- * `,⍳⍵/6` generate a list of all the possible sets of rolls
- * `⌈/¨` find the maximum of each
- * `+/÷≢` find the average (sum up all values and divide by the length of the list)
- this is *incredibly* slow and expensive memory-wise (computing 9 and 10 required increasing the default workspace memory size from .5GB to 2GB), but hey it works :)
#1: Initial revision
# Dyalog APL, 16 bytes ```apl {(+/÷≢)⌈/¨,⍳⍵/6} ``` Explanation: * `,⍳⍵/6` generate a list of all the possible sets of rolls * `⌈/¨` find the maximum of each * `+/÷≢` find the average (sum up all values and divide by the length of the list) this is *incredibly* slow and expensive memory-wise, but hey it works :)