The Waterloo admission office was DDOSed, which meant that Ace's marks couldn't be processed! Waterloo has sent Ace a form where he must fill in his marks onto. However, it isn't as simple as one would like. Ace has completed grade 12 courses (some aren't as legitimate as others…) with a unique course name, whose length will be no longer than 100 characters, and a grade . Waterloo Software Engineering requires that applicants submit courses and has mandatory courses that Ace must include . If Ace does not have enough courses to submit or does not have the mandatory courses, he will fail. Given Ace's grades, calculate the maximum entry average he can submit on his form. If he fails, output Ace is dunzos
.
Input Specification
First line: three integers , , .
Next lines: a string with or without spaces representing the course name, and an integer grade.
Next lines: a string with or without spaces representing the name of a mandatory course.
Output Specification
Ace's maximum possible average, rounded to 2 decimal places.
Sample Input 1
10 6 5
Chemistry 97
AdvFunc 96
CalcAndVectors 97
Physics 96
CurrentEcon 96
French 96
English 92
Literature 93
Science 98
Philosophy 87
Chemistry
Physics
AdvFunc
English
CalcAndVectors
Sample Output 1
96.00
Comments
What is a Maximum possible average?
test case #10 TLE, can someone help me
How come first 3 cases give you ValueError in Python 3.9?
Can the course grade not be a type that cannot be converted to an int?
Consider that course names may contain spaces.