## PowerShell v2+, <s>147</s> 144 bytes $n=$args[0]|sort;while($n){if(($x=$n[0])-eq$n[2]){$s+=((100*$x),1000)[$x-eq1];$a,$b,$c,$n=$n}else{$s+=((0,50)[$x-eq5],100)[$x-eq1];$a,$n=$n}};$s Takes input `$args[0]` and `sort`s it, stores it into `$n`. Then, `while` there are still elements left, we evaluate an `if`/`else`. If the first element (temp stored into `$x` to save some bytes) matches the third element, we have a triple. Add onto the `$s`um the result of a pseudo-ternary array lookup based on whether `$x` is `-eq`ual to `1`, either `100*$x` or `1000`. Then, peel off the first three elements into `$a`, `$b`, `$c` and the remaining into `$n`. Otherwise, we don't have a triple, so add on to `$s`um the result of another pseudo-ternary that pulls out whether it's a `1` or `5` and selects the number appropriately. Then, peel off the first element and leave the remaining in `$n`. Finally, once the loop is done, place `$s` on the pipeline. Output is an implicit `Write-Output` at the end of execution. ### Test cases PS C:\Tools\Scripts\golfing> (1,2,3,4,5,6),(1,1,1,2,3,5),(1,1,1,1,1,1),(2,2,2,2,2,2),(6,6,1,5,5,6),(2,3,4,6,2,4),(1,5,1,5,1,5),(5,5,5,5,2,3),(1,1,1,1,1,5),(3,3,4,4,3,4)|%{($_-join',')+" -> "+(.\evaluate-dice-1000.ps1 $_)} 1,2,3,4,5,6 -> 150 1,1,1,2,3,5 -> 1050 1,1,1,1,1,1 -> 2000 2,2,2,2,2,2 -> 400 6,6,1,5,5,6 -> 800 2,3,4,6,2,4 -> 0 1,5,1,5,1,5 -> 1500 5,5,5,5,2,3 -> 550 1,1,1,1,1,5 -> 1250 3,3,4,4,3,4 -> 700