c# dp
```\nlearn from this java solution\nhttps://leetcode.com/problems/new-21-game/discuss/723643/Java-DP-%2B-Sliding-Window\npublic double New21Game(int N, int K, i
```\nlearn from this java solution\nhttps://leetcode.com/problems/new-21-game/discuss/723643/Java-DP-%2B-Sliding-Window\npublic double New21Game(int N, int K, int W) {\n        //N = target let\'s say 21;\n        //K = is stop point; 17;\n        //W  = num range 1..W; 1..10;\n        if (N>=K-1+W) return 1.0;\n        if (N < K) return 0.0;\n        if (K == 0) return 1.0;\n        double[] dp  = new double[N+1];\n        dp[0] = 1.0;\n        double prob = 1.0/(double)W;\n        //dp[i] = 1/w(dp[i-1]+dp[i-2]+... dp[i-w]);\n        //the probability of getting at i is the sum of probability from previous i-1 to i-w time 1/w\n        double sum=1.0;\n        for(int i = 1; i <= N; i++)\n        {\n             dp[i] = prob * sum;     // i = 1 to 10;  = prob (1/10)\n             if (i < K)\n                 sum += dp[i];\n             \n             if (i - W >= 0)\n                 sum -= dp[i-W];\n            \n        }\n        double res = 0.0;\n        for(int i = K; i <=N; i++)\n            res += dp[i];\n        \n        return res;\n    }
[]