Python Easy Solution
Code\n\nclass Solution:\n    def new21Game(self, n: int, k: int, maxPts: int) -> float:\n        dp = [1.0] + [0] * n\n        Wsum = 1.0\n        if k == 0 or 
# Code\n```\nclass Solution:\n    def new21Game(self, n: int, k: int, maxPts: int) -> float:\n        dp = [1.0] + [0] * n\n        Wsum = 1.0\n        if k == 0 or n >= k + maxPts:\n            return 1\n        for i in range(1, n+1):\n            dp[i] = Wsum/maxPts\n            if i < k:\n                Wsum += dp[i]\n            if i >= maxPts:\n                Wsum -= dp[i-maxPts]\n        return sum(dp[k:])\n```
['Python', 'Python3']