Problem:
 Score : 200 points    Problem Statement You are given an integer sequence A of length N .
Find the maximum absolute difference of two elements (with different indices) in A .      Constraints  2 \leq N \leq 100  1 \leq A_i \leq 10^9  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  A_1  A_2  ...  A_N       Output Print the maximum absolute difference of two elements (with different indices) in A .        Sample Input 1 4
1 4 6 3      Sample Output 1 5  The maximum absolute difference of two elements is A_3-A_1=6-1=5 .       Sample Input 2 2
1000000000 1      Sample Output 2 999999999       Sample Input 3 5
1 1 1 1 1      Sample Output 3 0

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

a.sort()

print(a[-1] - a[0])

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
diff = []
for i in range(N-1):
    for j in range(N-i):
        diff.append(abs(A[i]-A[i+j]))
max_diff = max(diff)
print(max_diff)

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

ans = 0
for i in range(N-1):
    for k in range(i+1, N):
        diff = abs(A[i] - A[k])
        ans = max(ans, diff)
        
        
print(ans)

Solution (Python):
n = int(input())
a = [int(n) for n in input().split(" ")]

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

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

Solution (Python):
raw_input()

num_list = map(int, raw_input().split(" "))

M = max(num_list)
m = min(num_list)
print M - m

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

inpt.sort()
print inpt[N-1] - inpt[0]

Solution (Python):
number = int(input())
nums = list(map(int, input().split(" ")))

print(max(nums) - min(nums))

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

l = list(map(int,input().split()))

if len(l)!=n:
    exit()
    
l = sorted(l)
print(l[-1]-l[0])

Solution (Python):
N = int(input())
A = sorted(map(int, input().split()))

print(A[N-1] - A[0])

Solution (Python):
N = int(input())
a = list(int(i) for i in input().split())
a.sort(reverse = True)
print(a[0]-a[-1])

Solution (Python):

def B():
    n = int(input())
    a = input().split()
    
    if(len(a) != n):
        exit(1)

    i_max = 0
    i_min = 1000000001
    for i in a:
        k = int(i)
        if (i_max < k):
                i_max = k
        if (i_min > k):
                i_min = k
    print(abs( i_max - i_min))

if __name__ =='__main__':
    B()

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

A = map(int,raw_input().split())

print max(A)-min(A)

Solution (Python):
q=input()
a=input().split()
b=[int(i) for i in a]
maximum=max(b)
minimum=min(b)
print(maximum-minimum)

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

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

Solution (Python):
n = int(input())
a = [int(b) for b in input().split()]
a.sort()
print(abs(a[-1] - a[0]))

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

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
min = b[0]
max = b[0]
for i in range(a):
    if b[i] < min:min=b[i]
    if b[i] > max:max=b[i]
print(max-min)

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

Solution (Python):
N=int(input())
A=list(map(int,input().split(' ')))
max=A[0]
min=A[1]
for i in range(-2,N):
	if max<A[i]:
		max=A[i]
	if min>A[i]:
		min=A[i]
print(str(max-min))

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

a = input().split()

for i in range(0, n):
    a[i] = int(a[i])

MIN = min(a[0], a[1])
MAX = max(a[0], a[1])

for i in range(2, n):
    c = a[i]
    MAX = max(MAX, c)
    MIN = min(MIN, c)

print(MAX-MIN)

Solution (Python):

 
N=int(input())
list=map(int,input().split())

max=0
min=-1

for a in list:
   if a > max:
   	max=a
   
   if min == -1 or a < min:
   	min=a
   	
print(max-min)

Solution (Python):

num_int = int(input())


num_list = list(map(int, input().split()))


num_max = max(num_list)

num_min = min(num_list)


num_abs = (num_max - num_min)
print(num_abs)

Solution (Python):
N = int(input())
a = input().split()


for i in range(0,N):
	a[i] = int(a[i])
mi = 0
for i in range(0,N-1):
	for j in range(i+1,N):
		if abs(a[i]-a[j]) > mi:
			mi = abs(a[i]-a[j])
print(mi)

Solution (Python):
N = int(input())
A = input().split()
A = list(map(int, A))
min_num = A[0]
max_num = A[0]
for data in A:
    if min_num > data:
        min_num = data

    if max_num < data:
        max_num = data

print(max_num - min_num)

Solution (Python):
input()
print((lambda a:max(a)-min(a))(list(map(int,input().split()))))

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

Solution (Python):
N = int(input())
A = input()
b = A.split(" ")
c = []

for i in range(0,N):
    c.append(int(b[i]))
    if c[i] < 0:
        c[i] = c[i]*(-1)
        
c.sort()
print(c[-1]-c[0])

Solution (Python):
list_length = int(input())
list_num = list(map(int, input().split()))

print(max(list_num)  - min(list_num))

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

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

Solution (Python):
N = int(input())
a = input().rstrip().split()

aa = []
for i in a:
    aa.append(int(i))

print(abs(max(aa)-min(aa)))

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

max = 0
for i in range(n):
    for j in range(i+1, n):
       diff = abs(a[i] - a[j])
       if diff > max:
           max = diff

print(max)

Solution (Python):


N = input()
A = input().split()
A_ = []
for a in A:
    A_.append(int(a))

min_A = min(A_)
max_A = max(A_)

print(max_A - min_A)

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

Solution (Python):
p=input;p();a=sorted([int(i)for i in p().split()]);print(a[-1]-a[0])

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

Solution (Python):
N = int(input())
li = input().rstrip().split()
le =[0]*N
for i in range(0,N):
    le[i]=int(li[i])
mx = max(le)
mn = min(le)
u = mx-mn
print(u)

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

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

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

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

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
dif = []
for i in range(0,N):
    for j in range(i+1,N):
        dif.append(abs(A[i]-A[j]))
print(max(dif))

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

Solution (Python):
import numpy as np

N = int(input())
tmp = input().split(' ')

A = []
for i in range(N):
    A.append(int(tmp[i]))

A = np.asarray(A)
print(A.max() - A.min())

Solution (Python):


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

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

Solution (Python):
input()
a=[int(i) for i in input().split()]
print(max(a)-min(a))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split(" ")))
ans = max(a) - min(a)
print(ans)

Solution (Python):
dataNum = int(input())
numList = [int(n) for n in (input().split())]
print(max(numList)-min(numList))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]



dp = None

def main():
    N = int(input())
    A = sorted([int(_) for _ in input().split()])

    print(abs(A[-1] - A[0]))

main()

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

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

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

max_num = -1
min_num = float('inf')
for i in range(N):
	max_num = max(max_num,A[i])
	min_num = min(min_num,A[i])
print(max_num - min_num)

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

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


a = sorted(A)

print(a[-1] - a[0])

Solution (Python):
N = input()
A = [int(i) for i in input().split()]
A.sort()
print(A[-1] - A[0])

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

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

print(max(num) - min(num))

Solution (Python):


def main():
    
    N = int(input())
    lists = list(map(int, input().split()))

    
    max_element = 0
    min_element = lists[0]

    
    for i in range(N):
        if lists[i] > max_element:
            max_element = lists[i]
        if lists[i] < min_element:
            min_element = lists[i]

    print('{}'.format(max_element - min_element))

if __name__ == '__main__':
    main()

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

a_min = min(a)
a_max = max(a)

print(a_max - a_min)

Solution (Python):

n = input()
a = input().split(" ")

l = list()
for x in a:
	l.append(int(x))

print(abs(max(l) - min(l)))

Solution (Python):
n = int(input())
a = [int(str_) for str_ in input().split(" ")]

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

Solution (Python):
N = int(input())
Alist = [int(i) for i in input().split()]

Alist.sort()
print(Alist[N-1]-Alist[0])

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

Solution (Python):
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

n= int(arr_data[0][0])

arr=[int(x) for x in arr_data[1]]

print(max(arr)-min(arr))

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

Solution (Python):
from itertools import combinations
input()
a = list(map(int, input().split()))

print(max(abs(a - b) for a, b in combinations(a, r=2)))

Solution (Python):

N=int(input())
li = list(map(int,input().split()))	

print(max(li)-min(li))

Solution (Python):
n = int(input())
tmp = input()
a = [int(i) for i in tmp.split()]
print(max(a) - min(a))

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

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

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

Solution (Python):
def solve(n, a):
    ans = 0
    for i in range(n):
        for j in range(i+1, n):
            ans = max(ans, abs(a[i]-a[j]))
    return ans

assert solve(4, [1,4,6,3]) == 5
assert solve(2, [1000000000, 1]) == 999999999
assert solve(5, [1, 1, 1, 1, 1]) == 0

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

Solution (Python):

N = int(input())
A = input().split()

A = [int(i) for i in A]

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

Solution (Python):
N = int(input())
*A, = map(int, 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):
input()
a=list(map(int,input().split()))
print(max(a)-min(a))

Solution (Python):
while True:
    try:
        n = int(input())
        num = list(map(int, input().split()))
        print(max(num)-min(num))
    except:
        break

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

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

Solution (Python):
N = input()
A = [int(i) for i in input().split(" ")]
A.sort()
print(A[-1] - A[0])

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

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

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]

ans = max(a) - min(a)
print(ans)

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



print(round(max(num_list) + ((-1)*min(num_list))))

Solution (Python):


a = input()

b = input().split()
b = list(map(int, b))
print(max(b) - min(b))

Solution (Python):
n = input()
n = int(n)
a = input().split()
a = [int(aa) for aa in a]
ans = 0

for i, a1 in enumerate(a, 0):
    for j, a2 in enumerate(a, 0):
        if i == j:
            continue
        ans = max(ans, abs(a1 - a2))
print(ans)

Solution (Python):
n = input()
n = int(n)
a = input().split()
a = [int(aa) for aa in a]
ans = 0

for i in range(n):
    for j in range(n):
        if i == j:
            continue
        ans = max(ans, abs(a[i] - a[j]))
print(ans)

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

A = [int(AA) for AA in A]

ans = 0

for i in range(n):
    for j in range(n):
        if i ==j:
            continue
        ans = max(ans, abs(A[i]- A[j]))
print(ans)

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(0,-1),(1,0),(0,1),(-1,0)]
ddn = [(0,-1),(1,-1),(1,0),(1,1),(0,1),(-1,-1),(-1,0),(-1,1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

def main():
    n = I()
    a = LI()

    return max(a) - min(a)



print(main())

Solution (Python):
N = int(input())
l = list(map(int,input().split()))

l.sort()
print(l[-1] - l[0])

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

Solution (Python):
def main():
    n = int(input())
    arr = input().split(' ')
    max = int(arr[0])
    min = int(arr[0])
    for i in range(1, n):
        if int(arr[i]) > max:
            max = int(arr[i])
        if int(arr[i]) < min:
            min = int(arr[i])
    print(max - min)
main()

Solution (Python):
import numpy as np

a = int(input())
b = input().split()
c = []
for i in range(a):
  c.append(int(b[i]))
ans = 0
for i in range(a):
  for j in range(a):
    d = c[i] - c[j]
    d = np.abs(d)
    if(ans < d):
       ans = d
print(ans)

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

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

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

Solution (Python):
import sys

def solve(a,b):
    e = b[0]
    d = b[-1]
    for c in b:
        if d < c:
            d = c
        elif e >= c:
            e = c
    return d-e
    
def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    n = int(line1)
    line2 = sys.stdin.readline().rstrip()
    lst_a = [int(s) for s in line2.split(' ')]
    return (n, lst_a)

def main():
    n, lst_ab = readQuestion()
    answer = solve(n, lst_ab)
    print(answer)
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys
def solve(n, lst_a):
    s= max(lst_a)
    c= min(lst_a)
    return s-c 

def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    n = int(line1)
    line2 = sys.stdin.readline().rstrip()
    lst_a = [int(s) for s in line2.split(' ')]
    return (n, lst_a)

def main():
    n, lst_ab = readQuestion()
    answer = solve(n, lst_ab)
    print(answer)
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys

def solve(n, lst_a):
    a=lst_a[0]
    b=lst_a[0]
    [0]
    for i in lst_a:
        if a <i:
            a=i
        elif b>i:
            b=i
    return a-b

def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    n = int(line1)
    line2 = sys.stdin.readline().rstrip()
    lst_a = [int(s) for s in line2.split(' ')]
    return (n, lst_a)

def main():
    n, lst_ab = readQuestion()
    answer = solve(n, lst_ab)
    print(answer)
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys

def solve(n, lst_a):
    i=max(lst_a)
    ii=min(lst_a)
    answer = i-ii
    return answer

def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    n = int(line1)
    line2 = sys.stdin.readline().rstrip()
    lst_a = [int(s) for s in line2.split(' ')]
    return (n, lst_a)

def main():
    n, lst_ab = readQuestion()
    answer = solve(n, lst_ab)
    print(answer)
    
if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
A = input().split()
for i in range(len(A)) :
    A[i] = int(A[i])
print(max(A)-min(A))

Solution (Python):
n=int(input())
d=input().split()


for i in range(len(d)):
	d[i]=int(d[i])


print(max(d)-min(d))

Solution (Python):
N = input()
List = list(map(int,input().split(" ")))

print(int(max(List))-int(min(List)))

Solution (Python):


n = int(input())
a = list(map(int, input().split(" ")))

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

Solution (Python):

N = int(input())
A = list(map(int, input().split()))

ans = max(A) - min(A)

print(ans)

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

Solution (Python):
def main5():
    buf = int(input(""));
    strbuf = input("");
    strbufs = strbuf.split();
    buf2 = []
    saidai = -1;
    for i in range(buf):
        buf2.append(int(strbufs[i]));
    for i in range((buf-1)):
        for j in range(i+1,buf):
            if (abs(buf2[i]-buf2[j]))>saidai:
                saidai =  abs(buf2[i]-buf2[j]);

    print(saidai);


if __name__ == '__main__':
    main5()

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

print(a[-1] - a[0])

Solution (Python):
N = input()
listNums = list(map(int,input().split()))

minNum = listNums[0]
maxNum = listNums[0]

for num in listNums:
    if num < minNum:
        minNum = num
    elif num > maxNum:
        maxNum = num
print(maxNum - minNum)

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

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

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

MIN, MAX = float('inf'), float('-inf')
for num in A:
  MIN = min(MIN, num)
  MAX = max(MAX, num)

print(MAX - MIN)

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

min_a = min(A)
max_a = max(A)
print(max_a - min_a)

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

min = pow(10, 9)
max = 0

for a in a_list:
    if max < a:
        max = a
    if min > a:
        min = a

print(max-min)

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

r = max(A) - min(A)
print(r)

Solution (Python):


a = int(raw_input())

l = map(int, raw_input().split())
print max(l)-min(l)

Solution (Python):
n = int(input())
nums = list(map(int, input().split()))
nums_sorted = sorted(nums)

abst = nums_sorted[n - 1] - nums_sorted[0]
print(abst)

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

Solution (Python):
N = int(input())
A = [int(i) for i in list(input().split())]

A.sort()

print(A[N - 1] - A[0])

Solution (Python):

leng = int(input())
arrays = [int(i) for i in input().split()]
arrays.sort()
print(str(arrays[leng - 1] - arrays[0]))

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    l = list(map(int, input().split()))
    l.sort()
    print(l[-1] - l[0])

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
difference=0
for i in range(N):
    for j in range(N):
        if i==j:
            pass
        else:
            if abs(A[i]-A[j]) > difference:
                difference = abs(A[i]-A[j])
print(difference)

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

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

Solution (Python):


n=int(raw_input())
a=map(int,raw_input().split())
res=0
for i in xrange(n-1):
 for j in xrange(1,n):
  res=max(res,abs(a[i]-a[j]))
print res

Solution (Python):
n=input()
a=[int(i) for i in input().split()]
print(max(a)-min(a))

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

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

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

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

R = max(A) - min(A)
print(R)

Solution (Python):
N=int(input())
a=list(map(int,input().split()))
mini=maxi=a[0]
for i in range(1,N):
  mini=min(mini,a[i])
  maxi=max(maxi,a[i])
print(maxi-mini)

Solution (Python):
n = int(input())
numbers = list(map(int, input().split()))
max_num, min_num = sorted(numbers)[-1], sorted(numbers)[0]
print(abs(max_num - min_num))

Solution (Python):
N = int(input())

A = list(map(int,input().split()))

A.sort()

print(A[-1]-A[0])

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
max_ = max(a)
min_ = min(a)
print(max_-min_)

Solution (Python):
from itertools import combinations
n = int(input())
l = list(map(int, input().split()))
ans = 0
combos = combinations(l, 2)

for combo in combos:
  ans = max(ans, abs(combo[0] - combo[1]))

print(ans)

Solution (Python):


 
def main():
	N = int(input())
	A = list(map(int, input().split()))
	print(max(A)-min(A))

if __name__ == '__main__':
	main()

Solution (Python):
N = input()
A_list = input()
mapped_A  = map(int, A_list.split())
list_map =  list(mapped_A)
print(abs(max(list_map)-min(list_map)))

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

Solution (Python):
N = input()
A_list = input()
mapped_A  = map(int, A_list.split())
list_map =  list(mapped_A)
difference = max(list_map)-min(list_map)
if difference >=0:
    print(difference)
else:
    print(-difference)

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

Solution (Python):
N=int(input())
A=[int(i) for i in input().split()]
ans=0
for i in range(N):
  for j in range(N):
    if abs(A[i]-A[j])>ans:
      ans=abs(A[i]-A[j])
print(ans)

Solution (Python):
from sys import stdin
n = int(stdin.readline())
a = map(int,stdin.readline().split())
a.sort()
print a[-1] - a[0]

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

Solution (Python):
n = int(input().strip())
an = list(map(int, input().strip().split(' ')))

an.sort()

print(an[-1]-an[0])

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

B=max(A)
C=min(A)
ans=B-C

print(ans)

Solution (Python):
n = int(input())
x = [int(i) for i in input().split()]
print(max(x)-min(x))

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]

ans = max(A) - min(A)
print(ans)

Solution (Python):
N = int(input())
nlists = list(map(int, input().split()))
r = 0

for i in nlists:
    newnlists = [abs(i-j) for j in nlists]
    M = max(newnlists)
    if M > r:
        r = M

print(r)

Solution (Python):


input()
lis = [int(i) for i in input().split()]

print(max(lis) - min(lis))

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

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

Solution (Python):
n = input()
an = input()
an = an.split()
list = []

for i in an:
    i = int(i)
    list.append(i)
min_an = min(list)
max_an = max(list)

print(max_an - min_an)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]

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

Solution (Python):
N = input()
aryA = input().split(" ")

N = int(N)
aryA = [int(s) for s in aryA]
ans = []
for x in range(len(aryA) - 1):
    for y in range(len(aryA)):
        ans.append(abs(aryA[x] - aryA[y]))

print(max(ans))

Solution (Python):
count = int(input())
num = input().split()
ans = 0
for x in range(count):
    for y in range(count):
        if x != y:
            temp = int(num[x]) - int(num[y])
            if ans <= temp:
                ans = temp
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
hi = a[0]
low = a[0]
counter = 0
while n > counter:
    if hi < a[counter]:
        hi = a[counter]
    if low > a[counter]:
        low = a[counter]
    counter+=1
print(hi-low)

Solution (Python):

N = int(input())
A = input()
A = A.split()
n = []
for i in A:
    n.append(int(i))

n.sort()
print(n[-1] - n[0])

Solution (Python):
def combinations(iterable, r):
    
    
    pool = tuple(iterable)
    n = len(pool)
    if r > n:
        return
    indices = list(range(r))
    yield tuple(pool[i] for i in indices)
    while True:
        for i in reversed(range(r)):
            if indices[i] != i + n - r:
                break
        else:
            return
        indices[i] += 1
        for j in range(i+1, r):
            indices[j] = indices[j-1] + 1
        yield tuple(pool[i] for i in indices)


laa = []
N = int(input())
A = map(int, input().split())
for i in combinations(A,2):
    a, b = i
    c = abs(a-b)
    laa.append(c)

print(max(laa))

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

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


ans = 0
for i in a:
    for j in a:
        t = abs(j - i)
        if t > ans:
            ans = t

print(ans)

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

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

Solution (Python):

n = int(input())
a = input().split()
min = int(a[0])
max = int(a[0])
for i in range(n):
	if(int(a[i])<min):
		min = int(a[i])
	if(int(a[i])>max):
		max = int(a[i])
print(max-min)

Solution (Python):
n = int(input())
numbers = input().split(' ')
answer = 0

for i in range(n):
  for j in range(i, n):
    tmp = abs(int(numbers[i]) - int(numbers[j]))
    if answer < tmp:
      answer = tmp

print(answer)

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))

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

Solution (Python):
i = input().rstrip()
a = input().split()

a_int = [int(s) for s in a]
print(max(a_int)-min(a_int))

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

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

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

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

max = 0
min = 10**9



for i in range(N):
    
    if A[i] > max:
        max = A[i]
        

for i in range(N):
    
    if A[i] < min:
        min = A[i]
        



print(max - min)

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

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

Solution (Python):
from itertools import accumulate

n = int(input())

a_list = list(map(int, input().split()))

min_num = min(a_list)
max_num = max(a_list)

print(abs(min_num - max_num))

Solution (Python):
N=int(input())
A=[None]*N
A=list(map(int,input().split()))
print(max(A)-min(A))

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

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
Amin = min(A)
Amax = max(A)
print(abs(Amax-Amin))

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
b = []
for i in range(n):
    for j in range(n):
        b.append(abs(a[i]-a[j]))
print(max(b))

Solution (Python):
import sys
from collections import deque
import copy

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    A_i = []
    for i in range(N):
        A_i.append(int(input_raw[i]))
    print abs(max(A_i) - min(A_i))

if __name__ == '__main__':
    main()

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

A.sort()
print(str(A[N-1] - A[0]))

Solution (Python):
from sys import stdin

a = stdin.readline().rstrip()
l = [int(x) for x in stdin.readline().rstrip().split()]
ma = max(l)
mi = min(l)
sub = ma - mi
print(sub)

Solution (Python):
import itertools

N = int(input())
A = list(map(int,input().split()))

MAX = 0
for (i,j) in itertools.product(range(N),range(N)):
	tmp = abs(A[i] - A[j])
	if tmp >= MAX:
		MAX = tmp
print(MAX)

Solution (Python):
N=int(raw_input())
array=map(int, raw_input().split())

max_abs=0

for i in range(N):
    a1 = array[i]
    for j in range(i+1,N):
        a2 = array[j]
        tmp_abs = abs(a1-a2)

        if tmp_abs > max_abs:
            max_abs = tmp_abs

print max_abs

Solution (Python):
n=input()
l = [int(i) for i in input().split()]
mx = 1
mn = 1


mx = max(l)
mn = min(l)
	
print(abs(mx-mn))

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

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

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

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

Solution (Python):



N = int(input())
A = list(map(int, input().split()))

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

Solution (Python):
def m():
    n = int(input())
    a = list(map(int, input().split()))
    return abs(max(a)-min(a))

print(m())

Solution (Python):



n = (int)(input())
list = list(int(i) for i in input().split())
mx = max(list)
mn = min(list)
print(mx - mn)

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

Solution (Python):
N = int(input())
arr = map(int, input().split())
arr = sorted(arr, reverse=True)
print(arr[0] - arr[len(arr)-1])

Solution (Python):
n = int(input())-1
a = list(map(int,input().split()))

a_max = a[0]
a_min = a[0]

for i in range(n):
  if(a_max < a[i+1]):
    a_max = a[i+1]
  if(a[i+1] < a_min):
    a_min = a[i+1]

print(a_max - a_min)

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

Solution (Python):


n = input()
li = list(map(int,input().split()))

print(max(li) - min(li))

Solution (Python):
N = int(raw_input())
A = map(int, raw_input().split())
ans = 0
for i in range(N-1):
 for j in range(i+1, N):
  tmp = abs(A[i]-A[j])
  if tmp > ans:
   ans = tmp
print ans