Kevin is dissatisfied with his current grades. So, he hacks into the school's grading system to give himself some extra points! However, he can only give himself at most
His grades are represented as fractions, each with a numerator
In order to maximize the chances of getting into a good university, Kevin wants to make sure that the average of all his grades is as large as possible. Can you help Kevin with this task?
Constraints
Input Specification
On the first line, you are given two space-separated integers,
The second line will contain
The third line will contain
Output Specification
Output a single number: the maximum average grade Kevin can obtain as a percentage. Your answer will be considered correct if it is within
Sample Input 1
3 2
1 2 3
2 5 3
Sample Output 1
72.2222222
Explanation for Sample 1
You can add one points to the first course, making it
Sample Input 2
5 100
2 5 9 9 3
10 50 22 51 9
Sample Output 2
59.7345122
Comments