Professional Documents
Culture Documents
Practice Session: ACM-ICPC Thailand Southern Programming Contest 2012 Prince of Songkla University Hatyai, Thailand
Practice Session: ACM-ICPC Thailand Southern Programming Contest 2012 Prince of Songkla University Hatyai, Thailand
Practice Session: ACM-ICPC Thailand Southern Programming Contest 2012 Prince of Songkla University Hatyai, Thailand
Practice Session
11 August 2012
You have 40 minutes and 4 problems to solve.
The input and output of all programs are standard input and standard output.
Problem A. Range
Write a program to find the range of the input integers. The range is the difference
between minimum and maximum values.
Input and Output
The input contains any number of integers, one in a line. You can assume that there will be less
than one million numbers in the input and no integer has absolute value greater than one million.
Then print out the range of the input set.
Sample Input
Sample Output
36
25
-10
18
-4
26
Sample input
2
637
-120
Sample output
1
3
Hint
Sample output
2
2
2
2
8
Sample Output
a 3