|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||256 MB||123||38||37||42.045%|
You are getting ready to take a final exam for your Basket Weaving 101 class and you need to know the minimum score you must get on the final exam in order to obtain an average of at least 90 for the course. A weighted average consists of a number of scores along with their respective weights. For this course, there are four parts to the grade, a project that is worth 15% of the grade, a term paper that is worth 20% of the grade, a midterm exam that is worth 25% of the grade, and a final exam that worth 40% of the grade. Given scores for the project, the term paper, and the midterm exam, compute and display the minimum integer final exam score that will result in a grade of at least 90 for the course. Possible final exam scores range from 0 to 100, inclusive. If it is impossible to obtain at least 90 your program should display the appropriate message.
Your program must read a set of test cases. The input starts with an integer that contains the number of test cases. This integer is followed by that many lists of three integers representing the project score, the term paper score, and the midterm exam score, respectively.
Your program must then display for each test case the lowest possible integer score for the final exam that will result in a course grade of at least 90 or, if it is not possible to obtain at least 90, your program must display the word “impossible.”
3 85 88 92 70 95 65 100 90 100
92 impossible 80