Premium problem53. Strictly Increasing Dice

Medium Locked

Roll n fair m-sided dice one after another. Return the probability the results come out strictly increasing.

  • any strictly increasing sequence uses n distinct faces
  • each set of n distinct faces can be arranged in increasing order exactly one way
  • so there are (mn)\binom{m}{n} good outcomes out of mnm^n total

Input

n = 3
m = 6

Output

0.09259259259259259

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)