Editorial for Arcadia Computing Contest 1 P1 - Test Anxiety
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Let the student's current average be denoted as , and the current number of assignments they have completed to be
. As we know that each assignment is weighted equally and is scored out of 100, we can deduce that the total points they have earned through all assignments so far is
.
The student has one more assignment to complete, thus making the total points possible including the
next assignment to be .
In order to attain at least an average, the student must obtain a total score of at least
. If this has already been achieved, simply print
. Otherwise, print the missing score, which is
. If this missing score is greater than
, print that it is impossible.
Final complexity:
Comments