No.1902 AC Ratio
タグ : / 解いたユーザー数 192
作問者 :
ymmtr(せるたわーしーぷ!)
/ テスター :
Rute
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.
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
Sample 2
Input
10/3456
Output
0.00289
Answers such as 0.0028 are also accepted.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。