Probability final score within target
Your task
You start with 0 points. While your score is strictly less than 'stop', you draw a number uniformly from 1..maxPts and add it. You stop drawing once your score is >= stop. Return the probability that your final score is <= target, rounded to 6 decimals. 0 <= stop <= 1000, 1 <= maxPts <= 1000, 0 <= target <= 1000 (target may exceed stop). If stop==0 you draw nothing and final score is 0.
Examples
prob_at_most(stop: int, target: int, maxPts: int) -> floatExample 1
Input
prob_at_most(10, 12, 6)Output
0.728183