問題一覧 > 通常問題

No.1902 AC Ratio

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-4}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 192
作問者 : ymmtr(せるたわーしーぷ!) / テスター : Rute
お気に入りにしたユーザー ProblemId : 7768 / 自分の提出
問題文最終更新日: 2022-04-17 21:53:36
AC Ratio
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. Show the original

Problem Statement

<Notice> A similar problem was also posted on Twitter, but the constraints have been slightly changed. Please be careful.
<Added 2022/04/17 21:53> The difficulty has been changed to 1 star.

Let the integers $A$ and $B$ denote the number of correct answers and the number of questions, respectively, on a person's academic achievement test.
A string $S$ is given in the format "$A$$/$$B$". Output the correct answer rate as a decimal ratio (where 1 represents 100%).
Errors at the 4th decimal place and beyond are ignored.

A decimal error of $10^{-4}$ or less is allowed.

Input

$S$

$1 \leq A \leq B \leq 1000000$

$3$≦(length of $S$)≦$15$

The value to be answered is at least $0.001$.

Output

Print a newline at the end.

Sample

Sample 1
Input
123/345
Output
0.35652
Answers such as 0.356 are also accepted.



Answers such as 0.3565 are also accepted.
Sample 2
Input
10/3456
Output
0.00289
Answers such as 0.002 are also accepted.
Answers such as 0.0028 are also accepted.



$A$ and $B$ may have different numbers of digits.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。