P8507 After Graduation
Background
After graduation, classmates are discussing their high school plans enthusiastically. Everyone can hardly avoid one topic—the academic proficiency test.
In Zhejiang, besides taking the National College Entrance Examination (commonly called the Gaokao), high school students also need to take the General High School Academic Proficiency Test (commonly called the Xuekao). Students take the Xuekao once in the second semester of Grade 10, once in the first semester of Grade 11, and once in the second semester of Grade 11.
Description
**Note: Some parts of the description in this problem may differ from reality.**
The Xuekao tests all high school subjects and rates students by level according to their scores, from high to low as A to E. For each subject, a fixed ratio $w$ (the same for all subjects) is used to determine how many students receive level E. If a student gets level E (fail) in **more than one** subject in the Xuekao, then the student cannot graduate.
In another parallel world, high school has a total of $a$ subjects. There are $b$ examinees in the whole province. If the cutoff for level E is too high, it may cause the situation that there will always be some people who cannot graduate. Now, the director of the examination authority has come to you and hopes you can determine the **maximum** possible proportion of level E among all examinees (that is, maximize the value of $w$), such that there **exists** at least one arrangement that allows all examinees in Zhejiang to graduate.
If the number of level E examinees computed under a certain ratio is not an integer, then **round up** the number of examinees.
Input Format
One line containing two positive integers $a, b$.
Output Format
Output a floating-point number representing the maximum proportion of level E.
This problem uses a custom checker. Any answer with an absolute error within $10^{-6}$ compared to the standard answer is considered correct.
Explanation/Hint
#### Explanation for Sample 1
Set the level E ratio to $\frac{1}{2}$. Then, in each subject, exactly one examinee fails. When the first examinee fails the first subject and the second examinee fails the second subject, all examinees can graduate. Therefore, $\frac{1}{2}$ satisfies the requirement.
It can be proven that there is no better solution.
### Data Scale and Constraints
For all data, $1\le a, b\le 10000$.
$$
\def\arraystretch{1.5}
\begin{array}{|c|c|}\hline
\bf{Test Point} & \bf{Special Property}
\\
\hline
1\sim3 & b=1\\\hline
4\sim6 & a=b \\\hline
7\sim10 & /\\\hline
\end{array}
$$
After finishing this problem, can you explain why, in reality, the proportion of level E in Zhejiang cannot exceed $5\%$?
Translated by ChatGPT 5