#Qua2205. Just Print Sample
Just Print Sample
Description
Libra is participating in AHUPC. She meets an extremely hard problem which is required to print a single yes
or no
. This problem has distinct test cases weighted equally. Her final score will equal the number of test cases that her last submission passes.
Libra has no idea for this problem, thus she will try to print yes
or no
each with probability , independently for each test case.
Libra knows that she cannot submit more than times in total because then she will certainly be disqualified. What is the maximum possible expected value of Libra's final score, assuming that she follows the optimal strategy?
Format
Input
The only line of input contains two space-separated integers and ().
Output
The answer as a decimal that differs by at most absolute or relative error from the actual answer.
Samples
1 3
0.8750000000
3 2
1.8750000000
24 97
17.5176275613
相关
在下列比赛中: