Problem:
 Score : 200 points    Problem Statement It is only six months until Christmas, and AtCoDeer the reindeer is now planning his travel to deliver gifts. There are N houses along TopCoDeer street . The i -th house is located at coordinate a_i . He has decided to deliver gifts to all these houses. Find the minimum distance to be traveled when AtCoDeer can start and end his travel at any positions.      Constraints  1 ≤ N ≤ 100  0 ≤ a_i ≤ 1000  a_i is an integer.         Input Input is given from Standard Input in the following format:  N  a_1  a_2  ...  a_N       Output Print the minimum distance to be traveled.        Sample Input 1 4
2 3 7 9      Sample Output 1 7  The travel distance of 7 can be achieved by starting at coordinate 9 and traveling straight to coordinate 2 . It is not possible to do with a travel distance of less than 7 , and thus 7 is the minimum distance to be traveled.       Sample Input 2 8
3 1 4 1 5 9 2 6      Sample Output 2 8  There may be more than one house at a position.

Solution (Python):
import sys
n = map(int, sys.stdin.readline().split())
a = map(int, sys.stdin.readline().split())
print max(a) - min(a)

Solution (Python):
n = int(input())
a = []
i = input().split()
for x in range(n):
 a.append(int(i[x]))
a.sort()
print(a[-1]-a[0])

Solution (Python):
n=int(input())
a=[int(i)for i in input().split()]
a.sort()
ans=0
for i in range(1,n):
	ans+=a[i]-a[i-1]
print(ans)

Solution (Python):
N = input()
a = map(int, raw_input().split())
print max(a) - min(a)

Solution (Python):

N = int(input())
a = [int(n) for n in input().split()]
print(max(a) - min(a))

Solution (Python):
n=int(input())
a=sorted(map(int,input().split()))
print(a[-1]-a[0])

Solution (Python):
n = int(input())
a = list(map(int,input().split(" ")))
a.sort()
d = a[-1] - a[0] 
print(d)

Solution (Python):
N=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[N-1]-a[0])

Solution (Python):

import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    N = II()
    a = ILI()
    return (N, a)


def solve(N, a):
    num_min = min(a)
    num_max = max(a)
    ans = num_max - num_min
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
As = list(map(int, input().split()))
print(max(As) - min(As))

Solution (Python):
n = int(input())
A = list(map(int, input().split()))

print(max(A) - min(A))

Solution (Python):
n = int(raw_input())
inpt = map(int, raw_input().split())
inpt.sort()

print inpt[n-1] - inpt[0]

Solution (Python):
input()
a = list(map(int, input().split()))
a.sort()
print(a[-1] - a[0])

Solution (Python):


n = input()
a = map(int, raw_input().split())

print(max(a)-min(a))

Solution (Python):
n = int(raw_input())

a = [int(_) for _ in raw_input().split()]
print max(a) - min(a)

Solution (Python):
n=int(raw_input())
a=map(int,raw_input().split())
print max(a)-min(a)

Solution (Python):
N = int(input())
A = [int(_) for _ in input().split()]
print(max(A) - min(A))

Solution (Python):
n = input()
A = map(int, raw_input().split())
print max(A) - min(A)

Solution (Python):


input()
a = sorted([int(x) for x in input().split()])
print(max(a) - min(a))

Solution (Python):
n = input()
A = map(int, raw_input().split())
A.sort()
print A[-1] - A[0]

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
a = na()
print(max(a)-min(a))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(a[-1] - a[0])