Dice Throw Leetcode Problem