Dice Throw Leetcode Solution Python