Draw cards 1 to uniformly. Stop when score . Find probability score is . = probability of reaching exactly score . Start: . Transition: , but only for scores (we don't draw after reaching ).
Answer: . Scores from to are winning. Use sliding window for efficient sum computation.