No.1076 Sushida
問題文最終更新日: 2020-05-19 14:23:05
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 252
(順位表)
の他の問題:
Problem Statement
Nekkoala-kun is playing "One-Shot Challenge" in Sushida, a mode that ends immediately if he makes even a single mistake.
Given the probability $p$ that he types one word without a mistake, find the expected number of words he types in one challenge. Assume there is no time limit.
Input
$p$
$p$ is a real number given to $4$ decimal places.
$0 \le p < 1$
Output
Output the answer to the problem on one line.
The answer may not be an integer, but an absolute or relative error of up to $10^{-5}$ is allowed.
Sample
Sample 1
Input
0.5
Output
1
Sample 2
Input
0.8
Output
4
Sample 3
Input
0
Output
0
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
tko919
しの