solves for n dice with beats matrix intermediate step
solves for n dice without beats matrix intermediate step