Java Easy Solution
\n\n# Code\n\nclass Solution {\n    public double new21Game(int n, int k, int maxPts) {\n        if(k==0) return 1.00;\n        if(k==1 && maxPts<=n) return 1.0
\n\n# Code\n```\nclass Solution {\n    public double new21Game(int n, int k, int maxPts) {\n        if(k==0) return 1.00;\n        if(k==1 && maxPts<=n) return 1.00;\n        double dp[] = new double[n+1];\n        dp[0] = 1.00;\n        double prev=0.00;\n        for(int i=1; i<=n; i++){\n            if((i-maxPts-1)>=0){\n                prev-=dp[i-1-maxPts];\n            }\n            if((i-1)<k){\n                prev+=dp[i-1];\n            }\n            dp[i]=prev/maxPts;            \n        }\n\n        double res = 0.00;\n        for(int i=k; i<=n; i++){\n            res+=dp[i];\n        }\n        return res;        \n    }\n}\n```
['Java']