2015 Mock CCC by Alex and Timothy
It's midterm examination season! The most frequently asked question in high schools across Canada is, of course, "what is the lowest mark I have to get on the exam to end up with
Berta currently has exactly
Input Specification
Line 1 will contain
Line 2 will contain
Line 3 will contain
The input will only contain integers between
Output Specification
Output a single integer, the minimum integer percentage that must be obtained on the exam to reach a final mark that rounds to DROP THE COURSE
.
Sample Input 1
85
90
30
Sample Output 1
100
Explanation for Sample 1
Berta has an 85% and prepares to take her midterm exam that will be worth 30% of her final mark. Assuming she gets perfect on her exam, her overall mark will be 89.5% afterwards, which just barely rounds up to a 90% for her final mark.
Sample Input 2
36
50
20
Sample Output 2
DROP THE COURSE
Explanation for Sample 2
Here, Berta has a 36% and just wants to pass the course with a 50%. However, even with a perfect exam, she can only end up with 48.8% overall.
Comments
This comment is hidden due to too much negative feedback. Show it anyway.
Is it possible that the inputs are decimals?
no thei r integrsLaurak121 😎😎😎😎
What is test case #4? What am I doing wrong?
Did you figure it out? #4 says WA for me too.
If the exam mark required is a negative, that means you have to score worse than 0% to achieve the desired score. Since this question is asking for the minimum mark to achieve at least the desired score, you should just output 0%.
Thanks for that
What happens when W = 0?
I don't get it.
Then you have a very nice teacher.
No comment.
What but there IS a comment?? Two actually... I'm confused can someone help me