Ad
  • Custom User Avatar

    Op solved it, closing

  • Custom User Avatar

    Because {3,5} is a different dice roll than {5,3} - in the first instance, die 1 rolled 3 and die 2 rolled 5, whereas in the second instance die 1 rolled 5 and die 2 rolled 3. So the combination of 3 and 5 is counted twice because there are two different ways of achieving it.

    {4,4} means die 1 rolled 4 and die 2 rolled 4. There isn't another way of getting both dice to show 4, so it's only counted once.

  • Custom User Avatar

    If you have problems with precision and rounding while solving this kata, it means your approach is not completely correct.

    This kata can be solved easily without floats, using only integers, and avoiding rounding errors this way. You were struggling with a problem which you brought upon yourself.

    The kata is fine.