All problems

Placing Text Relative to the Axes, Not the Data

hardPythonMatplotlibtransform

Harbourline Retail's chart template stamps a small source note in the same corner of every panel, whether the panel plots pennies or millions — the note is positioned against the frame, not against the data. The same template also produces a text feed where every series is rescaled onto a common 0-to-1 ruler, so panels with wildly different units can be compared side by side.

Task: Print the readings rescaled onto a 0-to-1 ruler.

Input

The first line holds one integer n, the number of readings. Each of the next n lines holds one reading, a number on its own. The readings are not all equal.

Output

One line holding the rescaled readings separated by single spaces, in input order. The smallest reading becomes 0.00 and the largest becomes 1.00, with everything else placed proportionally between them. Each number carries exactly two decimal places.

Example:

Input:
3
10
20
30

Output:
0.00 0.50 1.00

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…