Problem2415--【入门】最贵商品和最便宜商品之差

2415: 【入门】最贵商品和最便宜商品之差

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

小明去超市买商品,买了N件,每件商品的价格都是整数,小明想知道这N件商品中,最贵商品和最便宜商品之间相差多少元?请你编写程序帮忙小明计算。

Input

第1行输入一个整数n(n<=100)。

第2行有n个整数。

Output

输出一个整数,代表差值。

Sample Input Copy

5
12 6 67 3 88

Sample Output Copy

85

Source/Category