A Fully-Labeled Chart
Pike Street Studio has one rule that no chart leaves without: a heading saying what it shows, and a word on each axis saying what that axis counts. An unlabelled chart is a set of shapes, and the person who made it is the only one who knows what they mean — which stops being true about a fortnight later. Alongside the heading, the studio prints the spread the vertical axis has to cover.
Task: Print the spread of the readings, which is the largest reading minus the smallest.
Input
The first line holds an integer n, the number of readings. Each of the next n lines holds one reading, possibly with decimals. n is at least 1.
Output
One line holding the spread, printed as Python prints the number it built: a spread of forty comes out as 40.0, never as 40 and never as 40.00.
Example:
Input:
3
10
50
30
Output:
40.0
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