#P8823. [传智杯 #3 初赛] 期末考试成绩
[传智杯 #3 初赛] 期末考试成绩
Description
The evaluation system for the Java Programming course at Chuanzhi Academy is as follows.
First, every student has a written exam score, which must be an integer in .
If the written exam score is at least , then their GPA (weighted average grade) is the full score .
If the written exam score is between and , then for each point less than , their GPA decreases by from .
If the written exam score is less than , then the kind teacher will give them some help. Specifically, if their score is , the teacher will adjust the score to (rounded down), and then calculate their GPA.
If after the adjustment the student’s score is still less than , then they fail the course, and the GPA is .
Now you are given a person’s final written exam score. Please output their final GPA.
Input Format
One line with one integer , representing the person’s final exam score.
Output Format
A floating-point number with exactly one digit after the decimal point, representing the student’s GPA.
Note that if there is a trailing , you must keep it.
99
4.0
88
3.8
12
0.0
Hint
For of the testdata, .
For an additional of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号