Answer the question
In order to leave comments, you need to log in
What do I understand wrong in the puzzle about the cube?
In one game, they asked a problem:
Alice is playing a game of chance in which dice must be rolled until a minimum predetermined score limit is reached.
The dice in the game are six-sided, for one roll you can get [1, 6] points. When, after a roll, the sum of the dice exceeds the minimum threshold, the game ends. If, as a result, the number of points scored does not exceed the maximum specified limit, then Alice wins
. The number of dice in the game is unlimited. Calculate the probability that Alice wins
Input:
min_goal, max_goal - lower and upper bounds. If Alice gets min_goal <= x <= max_goal points, then she wins
Conclusion:
float - chance to win the jackpot, round the result to hundredths
Example:
min_goal = 2
max_goal = 6
get_result(min_goal , max_goal ) = 0.91
On the first throw, you can get a number from 1 to 6. If 2-6 falls out, then Alice immediately wins, if 1 falls out, then you have to roll the die again and then there is a chance to lose if 6 falls out
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question