問題一覧 > 通常問題

No.1076 Sushida

レベル : / AI推定難易度 : 425 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-5}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 347
作問者 : tko919 / テスター : しの
お気に入りにしたユーザー ProblemId : 4321 / 自分の提出
問題文最終更新日: 2020-05-19 14:23:05
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もしくは右上の雲マークをクリックしてアカウントを作成してください。