#P1409. 骰子
骰子
Description
people stand in a line, and you are the -th.
In each round, the person at the front of the queue rolls a die once.
- If they roll , the person at the front wins.
- If they roll , the person at the front moves to the end of the queue.
- If they roll , the person at the front leaves the queue.
If only one person remains in the queue, that person wins. Find the probability that you win.
Input Format
One line containing two integers .
Output Format
A real number representing the winning probability, to digits after the decimal point.
2 1
0.444444444
Hint
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号