No.787 Mice and Traitors
タグ : / 解いたユーザー数 173
作問者 :
butsurizuki
/ テスター :
はむこ
Problem Statement
The mice are discussing countermeasures against a horrific incident in which many mice have been caught over the past few days.
Their investigation revealed that a traitor is hiding among the mice.
Judging from the damage, it can be concluded that "when a mouse is chosen, the probability that it is a traitor" is $P$%.
So, in order to find the traitor, the mice have decided to carry out a mass test of all the mice.
In this test, when a mouse is brought in and tested, the test outputs either that the mouse seems like a traitor or that it does not seem like a traitor.
Specifically,
・When a mouse that really is a traitor is tested, it outputs "seems like a traitor" with probability $Q$%.
・When a mouse that really is not a traitor is tested, it outputs "does not seem like a traitor" with probability $Q$%.
When the mouse Hamuko was tested, the output was, unfortunately, "seems like a traitor".
Find the probability $R$ (%) that Hamuko really is a traitor.
Input
$P$ $Q$
$P,Q$ are given on one line, separated by a space.
$P,Q$ are real numbers.
・Constraints
$0 \le P,Q \le 100$
$(P,Q) \neq (0,100) , (100,0)$ (in these cases, the test could never report a traitor in the first place)
Output
Output $R$ on one line.
A newline is required at the end of the output.
An error of up to $0.000001=10^{-6}$ is allowed.
Sample
Sample 1
Input
5 99
Output
83.8983050847458
Note that $R$ must be found in %.
This output is correctly calculated to the 13th decimal place, but in practice an error of up to $10^{-6}$ is allowed.
Sample 2
Input
0.000001 99.9
Output
0.0009989900301
Sample 3
Input
100 100
Output
100.0000000000000
In this world, betrayal is justice!!!
Hint
There are 4 types of mice, but only 2 types of mice are reported as traitors. And the proportion of those that really are traitors among them is...?
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。