#P8823. GPA Calculation Based on Adjusted Exam Score

    ID: 21987 Type: Default 1000ms 256MiB

GPA Calculation Based on Adjusted Exam Score

GPA Calculation Based on Adjusted Exam Score

In the Java Programming course at Chuanzhi Special Training College, the evaluation system works as follows:

Each student obtains an exam score, which is an integer in the interval \( [0, 100] \).

If the exam score \( x \) is at least \( 90 \), then the GPA is the full score of \( 4.0 \).

If the exam score \( x \) is between \( 60 \) and \( 89 \) (inclusive), then for every point below \( 90 \), the GPA decreases by \( 0.1 \). That is, the GPA is given by:

\[ \text{GPA} = 4.0 - 0.1 \times (90 - x) \quad \text{for } 60 \le x \le 89. \]

If the exam score \( x \) is below \( 60 \), a teacher will adjust the score. The adjustment is done as follows:

\[ \text{adjusted score} = \lfloor \sqrt{x} \times 10 \rfloor. \]

If the adjusted score is still less than \( 60 \), the student fails and the GPA is \( 0 \). Otherwise, the GPA is computed using the same rules as above based on the adjusted score.

Your task is to compute and output the final GPA for a given exam score.

inputFormat

The input consists of a single integer \( x \) \( (0 \le x \le 100) \), representing a student's exam score.

outputFormat

Output the final GPA as a floating point number rounded to one decimal place.

sample

95
4.0