#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 [0,100][0,100].

If the written exam score is at least 9090, then their GPA (weighted average grade) is the full score 4.04.0.

If the written exam score is between 6060 and 8989, then for each point less than 9090, their GPA decreases by 0.10.1 from 4.04.0.

If the written exam score is less than 6060, then the kind teacher will give them some help. Specifically, if their score is xx, the teacher will adjust the score to x×10\sqrt{x}\times 10 (rounded down), and then calculate their GPA.

If after the adjustment the student’s score is still less than 6060, then they fail the course, and the GPA is 0.00.0.

Now you are given a person’s final written exam score. Please output their final GPA.

Input Format

One line with one integer xx, 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 .0.0, you must keep it.

99

4.0
88
3.8
12
0.0

Hint

For 20%20\% of the testdata, 90x10090 \leq x \leq 100.
For an additional 30%30\% of the testdata, 60x10060 \leq x \leq 100.
For 100%100\% of the testdata, 0x1000 \leq x \leq 100.

Translated by ChatGPT 5