#P8841. Normalized Homework Scoring

    ID: 22005 Type: Default 1000ms 256MiB

Normalized Homework Scoring

Normalized Homework Scoring

At Hualishu University of Science and Technology (HUST), the grading of homework submissions is performed competitively. Given n submissions with original scores, let \(a_{\min}\) be the lowest score and \(a_{\max}\) be the highest score among them. For the i-th student with score \(a_i\), the final score is calculated as follows:

\(\text{Final Score} = \left\lfloor 100 \times \frac{a_i - a_{\min}}{a_{\max} - a_{\min}} \right\rfloor\)

The floor operation discards any fractional part.

inputFormat

The input consists of two lines. The first line contains an integer n (the number of students). The second line contains n space-separated integers representing the original scores of each student.

outputFormat

Output n integers separated by spaces on a single line, representing the normalized scores computed using the formula provided.

sample

5
60 70 80 90 100
0 25 50 75 100