Problem:
Min, Max and Sum Write a program which reads a sequence of $n$ integers $a_i (i = 1, 2, ... n)$, and prints the minimum value, maximum value and sum of the sequence. Input In the first line, an integer $n$ is given. In the next line, $n$ integers $a_i$ are given in a line. Output Print the minimum value, maximum value and sum in a line. Put a single space between the values. Constraints  $0 < n \leq 10000$  $-1000000 \leq a_i \leq 1000000$  Sample Input 5
10 1 5 4 17 Sample Output 1 17 37

Solution (Python):
int_list =[]

n = input ()
s = input ()

for val in s. split ():
    int_list.append(int(val))
    
print (min(int_list), max(int_list), sum(int_list))

Solution (Python):
int_list = []

n=input()
s=input()

for Val in s.split():
    int_list.append(int(Val))
    
print(min(int_list),max(int_list),sum(int_list))

Solution (Python):
int_list =[]
n = input()
s = input()
for val in s.split():
    int_list.append(int(val))
  
print(min(int_list), max(int_list), sum(int_list))

Solution (Python):
a = input()
b = input()

numbers = b.split(" ")


print (min(int(i) for i in numbers),max(int(i) for i in numbers),sum(int(i) for i in numbers))

Solution (Python):
n = map(int,input())
list = [int(i) for i in input().split()]


print(min(list), max(list), sum(list))

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

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

print("%d %d %d" % (min(a), max(a), sum(a)))

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
print("%d %d %d" %(min(a), max(a), sum(a)))

Solution (Python):
input();a=sorted(map(int,input().split()));print("{} {} {}".format(a[0],a[-1],sum(a)))

Solution (Python):
input_int = int(input())
list_val = list(map(int, input().split()))
list_outval = [sorted(list_val)[0], sorted(list_val)[-1], sum(list_val)]
print(" ".join(map(str, list_outval)))

Solution (Python):
n = int(input())
ns = input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
Sum = sum(ns)
Min = min(ns)
Max = max(ns)
print(Min,Max,Sum)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
minimum = 1000001
maximum = -1000001
sum = 0
for i in range(n):
    if(a[i] < minimum):
        minimum = a[i]
    if(maximum < a[i]):
        maximum = a[i]
    sum += a[i]
print("%d %d %d" % (minimum, maximum, sum))

Solution (Python):
n = int(input())
lst = list(map(int,input().split()))
a = min(lst)   
b = max(lst)   
c = sum(lst)   
print(a,b,c)

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

a = min(ns)  
b = max(ns)   
c = sum(ns)   
print(a,b,c)

Solution (Python):
i = int(input())
data = list(map(int,input().split()))
min = min(data)
max = max(data)
sum = sum(data)
print(min, max,sum)

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

Solution (Python):
input()
lst = list(map(int, input().split()))
print(f'{min(lst)} {max(lst)} {sum(lst)}')

Solution (Python):
num = int(input())
array = input().split()
min = 1000000
max = -1000000
sum = 0
for i in range(num):
    a = int(array[i])
    sum += a
    if a < min:
        min = a
    if a > max:
        max = a
print(min, max, sum)

Solution (Python):
N = int(input())
a = list(map(int, input().strip().split()))
print(min(a), end=" ")
print(max(a), end=" ")
print(sum(a))

Solution (Python):
n = int(input())
A = [int(c) for c in input().split()]

print(min(A), max(A), sum(A))

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

a = input().split()

b = []*10
for i in a:
    b.append(int(i))

x = min(b)
y = max(b)
z = sum(b)

print(x, y, z)

Solution (Python):
x = int(input())
a = list(map(int, input().split()))
max = -1000000
min = 1000000
total = 0

for x in a:
  if max < x:
    max = x
  if min > x:
    min = x
  
  total = total + x
  
print(min, max, total)

Solution (Python):
n=int(input())
d=[int(x) for x in input().split()]
 
a=min(d)
b=max(d)
c=sum(d)
print(a,b,c)

Solution (Python):
n=int(input())
d=[int(x) for x in input().split()]

a=min(d)
b=max(d)
c=sum(d)
print(a,b,c)

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

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

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

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

for i in range(len(data)):
    data[i] = int(data[i])
    
print(min(data), max(data), sum(data))

Solution (Python):
n=int(input())
 
ns=input().split()
 
for i in range(len(ns)):
    ns[i]=int(ns[i])
 
asum=sum(ns)
amin=min(ns)
amax=max(ns)
 
print(amin,amax,asum)

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

ns=input().split()

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

asum=sum(ns)
amin=min(ns)
amax=max(ns)

print(amin,amax,asum)

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

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

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

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a_min = min(a)
a_max = max(a)
a_sum = sum(a)
print(a_min,a_max,a_sum)

Solution (Python):
n=int(input())
arr=list(map(int,input().split()))
min=10**10
max=-10**10
sum=0
for i in range(n):
  tmp=arr[i]
  sum+=tmp
  if tmp>max:
    max=tmp
  if tmp<min:
    min=tmp
print(min,max,sum)

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

a = [int(x) for x in input().split()]

print(min(a),max(a),sum(a))

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

Solution (Python):
n = int(input())
data = list(map(int, input().split()))
print("%d %d %d" %(min(data), max(data), sum(data)))

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

print("%d %d %d" %(min(a),max(a),sum(a)))

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
print(min(a),max(a),sum(a))

Solution (Python):
n = int(input())
lst = [int(v) for v in input().split()]

print(min(lst), max(lst), sum(lst))

Solution (Python):
n = int(input())
x = input().split()
a = [int(i) for i in x]
ans = [str(i) for i in [min(a), max(a), sum(a)]]
print(' '.join(ans))

Solution (Python):
import math


def main():

    
    count = input()
    num = [int(x) for x in input().split(' ')]

    print('{0} {1} {2}'.format(min(num), max(num), sum(num)))


if __name__ == "__main__":
    main()

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

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

print("%d %d %d"%(min(l),max(l),sum(l)))

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

print("{} {} {}".format(min(L),max(L),sum(L)))

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

Solution (Python):
if __name__ == '__main__':
	n = int(input())
	d = [int(x) for x in input().split()]
	d.sort()
	s = 0
	for i in d:
		s = s + i
	
	print("%d %d %d" % (d[0],d[-1],s))

Solution (Python):
n=int(input())
lst=input().split()
for i in range(n):
	lst[i]=int(lst[i])
print(min(lst),max(lst),sum(lst))

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

print('{} {} {}'.format(min(a),max(a),sum(a)))

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

Solution (Python):





class math:
    
    pi = 3.14159265358979323846264338

    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

math = math()











N = int(input())
mat = [int(w) for w in input().split()]

print(min(mat), max(mat), sum(mat))

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

l_max=max(l)
l_min=min(l)
l_sum=0
for i in l:
	l_sum+=i
print(str(l_min)+' '+str(l_max)+' '+str(l_sum))

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

line = list(map(int, input().split()))
a = min(line)
b = max(line)
c = sum(line)
print(a, b, c)

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

Solution (Python):
n = int(input())
li = [int(i) for i in input().split()]
print("{} {} {}".format(min(li),max(li),sum(li)))

Solution (Python):
BIGNUM=2000000000

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

max=-BIGNUM
min=BIGNUM
total=0

for x in nums:
    if x>max:
        max=x
    if x<min:
        min=x
    total += x

print(min,max,total)

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

Solution (Python):
input()
a = list(map(int, input().split()))
print(f'{min(a)} {max(a)} {sum(a)}')

Solution (Python):
n=int(input())
ai=list(map(int, input().split()))
a=min(ai)
b=max(ai)
c=sum(ai)
print(a, b, c)

Solution (Python):
x = input()
y = input()

list = y.split()

list_i = [int(s) for s in list]

Min = min(list_i)
Max = max(list_i)
Sum = sum(list_i)

mi = str(Min)
ma = str(Max)
su = str(Sum)
sp = " "

ans = mi + sp + ma + sp + su
print(ans)

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

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

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

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

vmin = min(data)
vmax = max(data)
vsum = sum(data)

print(vmin, vmax, vsum)

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

print(min(A), max(A), sum(A))

Solution (Python):
num = int(input())
numbers = [int(i) for i in input().split()]

min_num = min(numbers)
max_num = max(numbers)
sum_num = sum(numbers)

print(min_num, max_num, sum_num)

Solution (Python):
x = int(input())
lst = list(map(int,input().split()))
if len(lst) != x:
    print("1行目と２行目の要素の数が違います")
else:    
    print("{} {} {}".format(min(lst),max(lst),sum(lst)))

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

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

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

print(min(a), max(a), sum(a))

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

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

print(min(a), max(a), sum(a))

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

min = min(num)
max = max(num)
sum = sum(num)

print(min,max,sum)

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

min=max=sum=data[0]
for i in range(1,n):
    if data[i]<min:
        min=data[i]
    if data[i]>max:
        max=data[i]
    
    sum+=data[i]


print(min,max,sum)

Solution (Python):
n = int(input())
m = list(map(int,input().split()))
minm,maxm,summ = m[0],m[0],0
for x in range(n):
    if m[x] < minm:
        minm = m[x]
    elif m[x] > maxm:
        maxm = m[x]
    summ = summ + m[x]
print(minm,maxm,summ)

Solution (Python):



input()
d = list(map(int, input().split()))
print("{} {} {}".format(min(d), max(d), sum(d)))

Solution (Python):
n = int(input())
a =[]
a = list(map(int,input().split()))
s = 0

a.sort()
for i in range(n):
    s+=a[i]
    
print(a[0],a[-1],s)

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

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

print(min(ls) , max(ls), sum(ls))

Solution (Python):
BIG_NUM = 2000000000
 
N = int(input())
 
table = list(map(int,input().split()))
 
maximum = -BIG_NUM
minimum = BIG_NUM
total = 0
 
for x in table:
    if maximum < x:
        maximum = x
    if minimum > x:
        minimum = x
    total += x
 
print("%d %d %d"%(minimum,maximum,total))

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

print('{0} {1} {2}'.format(min(lst), max(lst), sum(lst)))

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

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

inputdata = []
inputdata = list(map(int, input().split()))

print("{0} {1} {2}".format(min(inputdata), max(inputdata), sum(inputdata)))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
amin = min(a)
amax = max(a)
asum = sum(a)
print(amin, amax, asum)

Solution (Python):
n = int(input())
lst = input().split(' ')
lst = list(map(int, lst))
ma = max(lst)
mi = min(lst)
su = sum(lst)
print(mi, ma, su)

Solution (Python):
from functools import reduce
n = int(input())
values = list(map(int, input().split()))

def minNum(a,b):
    if a < b:
        return a
    return b 

def maxNum(a,b):
    if a < b:
        return b
    return a

def sumNum(a,b):
    return a + b

print(reduce(minNum, values, 1000001), reduce(maxNum, values, -1000001), reduce(sumNum, values, 0))

Solution (Python):
from functools import reduce

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

def mymin(a, b):
    if a<b :
        return a
    else :
        return b

def mymax(a, b):
    if a>b :
        return a
    else :
        return b

def mysum(a, b):
    return a+b

print(reduce(mymin, values, 1000001), reduce(mymax, values, -1000001), reduce(mysum, values, 0))

Solution (Python):
from functools import reduce

def myMin(v1,v2):
    if v1 > v2:
        return v2
    return v1

def myMax(v1,v2):
    if v1 < v2:
        return v2
    return v1

def mySum(v1,v2):
    return v1 + v2

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

print(reduce(myMin, values, 1000001), reduce(myMax, values, -1000001), reduce(mySum, values, 0))

Solution (Python):
from functools import reduce

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

def mymin(a, b):
    if a < b:
        return a
    else:
        return b

def mymax(a, b):
    if b < a:
        return a
    else:
        return b

def mysum(a, b):
    return a + b

print(reduce(mymin, values), reduce(mymax, values), reduce(mysum, values))\

Solution (Python):
from functools import reduce

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

def mymin(a, b):
    
    if a < b:
        return a
    else :
        return b

def mymax(a, b):
    
    if a < b:
        return b
    else :
        return a


def mysum(a, b):
    
    return a + b

print(reduce(mymin, values), reduce(mymax, values), reduce(mysum, values))

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

def min(values):
    return min(values)
    
def min(values):
    return max(values)
    
def min(values):
    return sum(values)

Solution (Python):
from functools import reduce

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


def mymin(a, b):
    if a < b:
        return a
    else:
        return b

def mymax(a, b):
    if a > b:
        return a
    else:
        return b

def mysum(a, b):
    return a + b

print(reduce(mymin, values, 1000001), reduce(mymax, values, -1000001), reduce(mysum, values, 0))

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

print(min(a), max(a), sum(a))

Solution (Python):
x = input()
x = int(x)
y = list(map(int, input().split()))

Max = y[0]
Min = y[0]
Sum = y[0]
for i in range((x-1)):
    if Max < y[(i+1)]:
        Max = y[(i+1)]
    if Min > y[(i+1)]:
        Min = y[(i+1)]
    Sum += y[(i+1)]
    
print(Min, Max, Sum)

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

Solution (Python):
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns,key=int)
amax=max(ns,key=int)
print(amin,amax,asum)

Solution (Python):
input()
n = [int(x) for x in input().split()]
print('{0} {1} {2}'.format(min(n), max(n), sum(n)))

Solution (Python):
min, max, sum = 1000000, -1000000, 0
n = input()
n = int(n)
string = input()
numbers = list(map(int, string.split(' ')))
for i in range(n):
    if numbers[i] < min:
        min = numbers[i]
    if numbers[i] > max:
        max = numbers[i]
    sum = sum + numbers[i]
print(min, max, sum)

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

print (min(s),max(s),sum(s))

Solution (Python):
n = int(input())
x = input().rstrip().split()
x = [int(s) for s in x ]
print('{0} {1} {2}'.format(min(x),max(x),sum(x)))

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

Solution (Python):
n = int(input())
arr = list(map(int ,input().split()))
n_sum = 0
for i in range(n):
        n_sum += arr[i]
n_max = arr[0]
n_min = arr[0]

for i in range(n):
        if n_max < arr[i]:
                n_max = arr[i]
        if n_min > arr[i]:
                n_min = arr[i]

print('%d %d %d' % (n_min, n_max, n_sum))

Solution (Python):
line = input()
linea = input().split(" ")
linea = [int(i) for i in linea]

linemin = min(linea)
linemax = max(linea)
linesum = sum(linea)

print(str(linemin) + " " + str(linemax) +" " + str(linesum))

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

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

amin = min(l)
amax = max(l)
asum = sum(l)
print(amin, amax, asum)

Solution (Python):
_ = input()
li = list(map(int, input().split()))
print("{} {} {}".format(min(li), max(li), sum(li)))

Solution (Python):
x = int(input())
N = list(map(int,input().split()))
a = max(N)
b = min(N)
c = sum(N)
print("{0} {1} {2}".format(b,a,c))

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

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

sort_num = sorted(num)
print(sort_num[0], sort_num[N-1], sum(sort_num))

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

nmin = min(nlist)
nmax = max(nlist)
nsum = sum(nlist)

print(nmin, nmax, nsum)

Solution (Python):

num = int(input().rstrip())
ai = input().rstrip().split()
for i in range(len(ai)):
    ai[i] = int(ai[i])
print(str(min(ai)) + " " + str(max(ai)) + " " + str(sum(ai)))

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

Solution (Python):
z = int(input())
sums = 0
x = []
x = sorted(map(int,input().split()))
for i in range(len(x)):
    sums += x[i]
print(x[0],x[i],sums)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print('{} {} {}'.format(min(a), max(a), sum(a)))

Solution (Python):
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])

m=min(ns)
M=max(ns)
S=sum(ns)

print(m,M,S)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()] 
print("{} {} {}".format(min(a),max(a),sum(a)))

Solution (Python):
n = int(input())
x = list(map(int,input().split()))
a = min(x)
b = max(x)
c = sum(x)
print(a,b,c)

Solution (Python):
n = input()
table = list(map(int,input().split()))
print("{} {} {}".format(min(table),max(table),sum(table)))

Solution (Python):
num = int(input())
list = input().split()
for i in range(num):
    list[i] = int(list[i])
print(min(list), max(list), sum(list))

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

max = -1000001
min = 1000000
sum = 0
for x in a:
    if(max < x):
        max = x
    if(min > x):
        min = x
    sum += x

print(min, max, sum)

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

lines = [int(n) for n in input().split()]

print(min(lines),max(lines),sum(lines))

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


main()

Solution (Python):
n = int(input())
l = list(map(int,input().split(' ')))
print("{0} {1} {2}".format(min(l),max(l),sum(l)))

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

print(a_min[0],a_min[-1],a_sum)

Solution (Python):
a=input()
b=input()
c=b.split()
e=list()
for d in c:
        e.append(int(d))
print(min(e),max(e),sum(e))

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

print(min(n), max(n), sum(n))

Solution (Python):
x = int(input())
y = list(map(int,input().split()))

print(min(y),max(y),sum(y))

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

Solution (Python):

arrLength=int(input())
a = list(map(int,input().split()))
min = a
max = a
sum = a

for j in range(arrLength):
    if min[0]>min[j]:
        temp=min[0]
        min[0]=min[j]
        min[j]=temp
minans = min[0]

for j in range(arrLength):
    if max[0]<max[j]:
        temp=max[0]
        max[0]=max[j]
        max[j]=temp
maxans=max[0]

sumans =0
for i in range(arrLength):
    sumans += sum[i]


print(minans,maxans,sumans)

Solution (Python):
n = int(input())
num_list = list(map(int, input().split()))
print(min(num_list), end=' ')
print(max(num_list), end=' ')
print(sum(num_list))

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

Solution (Python):
n = eval(input())
items = input().split()
numbers = [eval(x) for x in items]
min = min(numbers)
max = max(numbers)
sum = sum(numbers)
print(min, max, sum)

Solution (Python):
n = int(input())
num = [int(x) for x in input().split()]
print (min(num), max(num), sum(num[0:len(num)]))

Solution (Python):
import sys
_ = sys.stdin.readline()
x=sys.stdin.readline()

arr=x.split()

arrInt=list()

for i in arr:
   
    arrInt.append(int(i))


print(min(arrInt),max(arrInt),sum(arrInt))

Solution (Python):
import math
n = int(input())
num = [int(x) for x in input().split()][:n]
print(min(num),max(num),sum(num))

Solution (Python):
in_str = input()
n = int(in_str) 
in_str = input()
data_seq = [int(i) for i in in_str.split()]
print("{0} {1} {2}".format(min(data_seq), max(data_seq), sum(data_seq)))

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

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

Solution (Python):
n = int(input())
a=list(input().split())
b=[int(i) for i in a]
total = 0
for i in range(n):
    total = total + b[i]
print(min(b),max(b),total)

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

Solution (Python):
n = int(input())
sequence = [int(s) for s in input().split()]
s_min = sequence[0]
s_max = sequence[0]
s_sum = 0
for s in sequence:
    if s < s_min:
        s_min = s
    if s> s_max:
        s_max = s
    s_sum += s
print('{} {} {}'.format(s_min, s_max, s_sum))

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

Solution (Python):
class min_max_sum:
    def __init__(self,n=0,a=[],sum=0):
        self.n=n
        self.a=a
        self.sum=sum
    def mins(self):
        return min(self.a)
    def maxs(self):
        return max(self.a)
    def sums(self):
        for i in range(0,self.n):
            self.sum+=self.a[i]
        return self.sum
    
p=min_max_sum()
p.n=int(input())
p.a=list(map(int,input().split()))
print("%d %d %d"%(p.mins(),p.maxs(),p.sums()))

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

Solution (Python):
X = int(input())
number = [int(i) for i in input().split()]
print(min(number),max(number),sum(number))

Solution (Python):
import sys

values = list(map(int, sys.stdin.readlines()[1].split()))
print(f'{min(values)} {max(values)} {sum(values)}')

Solution (Python):

l=[]
n=int(input())
min=10000000
max=-1000000
sum=0
l=list(map(int,input().split()))
for i in range(n):
 sum+=l[i]
 if(min>l[i]):
  min=l[i]
 if(max<l[i]):
  max=l[i]
print(min,max,sum)

Solution (Python):
n = int(input())
lst = list(map(int, input().split()))
print("{} {} {}".format(min(lst), max(lst), sum(lst)))

Solution (Python):
num = int(input() )
sum = 0
min = 1000000
max = -1000000
li = list(map(int, input().split() ))
for i in range(num):
  tmp = li[i]
  sum += tmp
  if tmp > max:
    max = tmp
  if tmp < min:
    min = tmp
print(min, max, sum)

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

Solution (Python):
input()
nums = list(map(int, input().split()))
print(f'{min(nums)} {max(nums)} {sum(nums)}')

Solution (Python):
count = int(input())
number = input()
number_list = number.split(" ")
max = int(number_list[0])
min = max
sum = 0
for cur in number_list:
    int_cur = int(cur)
    if int_cur > max:
        max = int_cur
    if int_cur < min:
        min = int_cur
    sum += int_cur
print(str(min) + " " + str(max) + " " + str(sum))

Solution (Python):
n = int(input())
data = [int(i) for i in input().split()]
min_data = min(data)
max_data = max(data)
sum_data = sum(data)
print(min_data,max_data,sum_data)

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

Solution (Python):

w = input()
n = int(w)

w = input().split()
dat =[]
for num in w:
    dat.append(int(num))
    
min1 = min(dat)
max1 = max(dat)

sum1 = 0
for num in dat:
    sum1 = sum1+num

print(min1,end=" ")
print(max1,end=" ")
print(sum1)

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

min_ai=min(ai)
max_ai=max(ai)
sum_ai=sum(ai)

print(str(min_ai)+" "+str(max_ai)+" "+str(sum_ai))

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

Solution (Python):
n = int(input())
a = input().split()
ammount = 0
mini = int(a[0])
maxi = int(a[0])
for i in range(n):
	ammount += int(a[i])
	if mini > int(a[i]):
		mini = int(a[i])
	if maxi < int(a[i]):
		maxi = int(a[i])
print(mini, maxi, ammount)

Solution (Python):
num = int(input())
maxi = -1000001
mini = 1000001
total = 0
curr = 0
z = input()
for item in z.split():
    curr = int(item)
    if curr > maxi:
        maxi = curr
    if curr < mini:
        mini = curr
    total += curr
print (str(mini) + " " + str(maxi) + " " + str(total))

Solution (Python):
try:
    n  =  int(input())
except:
    exit

    
try:
    l =  input().split()
except:
    exit

l_n = [int(i) for i in l]

print (min(l_n),max(l_n),sum(l_n))

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

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

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

print(min(l), max(l), sum(l))

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

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

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

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

max = line[0]
min = line[0]
sum = line[0]

for i in range(1, n):
    if max < line[i]:
        max = line[i]
    elif min > line[i]:
        min = line[i]
    sum += line[i]

print(min, max, sum)

Solution (Python):
n = input()
a = list(map(int, input().split()))
sum = 0
for i in a:
    sum += i
print(min(a), max(a), sum)

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

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

Solution (Python):
n = int(input())
n_list = list(map(int,input().split()))
print('{} {} {}'.format(min(n_list),max(n_list),sum(n_list)))

Solution (Python):
n = input()
a = input()
n = int(n)
a = a.split(' ')
max = int(a[0])
min = int(a[0])
sum = int(a[0])
for i in range(1, n):
    x = int(a[i])
    if x > max:
        max = x
    if x < min:
        min = x
    sum += x

print('%d %d %d'%(min, max, sum))

Solution (Python):
count = int(input())
num_line = list(map(int, input().split()))
num_line.sort()
sum_num = 0
for i in num_line:
    sum_num += i
print("{0} {1} {2}".format(num_line[0], num_line[-1], sum_num))

Solution (Python):
import sys
a=sys.stdin.readline()
numbers = list(map(int, sys.stdin.readline().split()))
print(min(numbers), max(numbers), sum(numbers))

Solution (Python):
n = int(input())
numbers = input().split()
min_n = int(numbers[0])
max_n = int(numbers[0])
sum_n = int(numbers[0])
for i in range(1,n):
    sum_n = sum_n + int(numbers[i])
    if min_n > int(numbers[i]):
        min_n = int(numbers[i])
    if max_n < int(numbers[i]):
        max_n = int(numbers[i])
print("{0} {1} {2}".format(min_n, max_n, sum_n))

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

Solution (Python):
n=input()
A=list(map(int,input().split()))
min=A[0]
max=A[0]
sum=0
for i in A:
  sum+=i
  if(min > i):
      min = i
  if(max <i):
      max=i
print("{} {} {}".format(min,max,sum))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
amin = min(a)
amax = max(a)
asum = sum(a)
print(amin, amax, asum)

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

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

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

maximum = -1000000
minimum = 1000000
total = 0

for i in table:
        if maximum < i:
                maximum = i

        if minimum > i:
                minimum = i

        total += i

print (minimum, maximum, total)

Solution (Python):
n = input()
li = [int(i) for i in input().split()]
print(min(li), max(li), sum(li))

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

Solution (Python):
input()
aa=[int(i) for i in input().split()]
print(min(aa),max(aa),sum(aa))

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

Solution (Python):
a=int(input())
b=input().split()
num=[]
for i in range(len(b)):
	num.append(int(b[i]))
print(min(num),max(num),sum(num))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print("{} {} {}".format(min(a), max(a), sum(a)))

Solution (Python):

N = int(input())
lst = list(map(int, input().split()))
print('{} {} {}'.format(min(lst), max(lst), sum(lst)))

Solution (Python):
import sys
n=int(input())
a=list(map(int,input().split()))
max=-sys.maxsize-1
min=sys.maxsize
sum=0
for i in range(n):
	sum+=a[i]
	if a[i]>max:
		max=a[i]
	if a[i]<min:
		min=a[i]
print(str(min)+" "+str(max)+" "+str(sum))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print('{} {} {}'.format(min(a), max(a), sum(a)))

Solution (Python):
num = int(input())
nList = map(int,input().split())
sList = sorted(nList)
min = sList[0]
max = sList[num - 1]
total = 0
for entry in sList:
    total += entry
print("{} {} {}".format(min, max, total))

Solution (Python):
n = int(input())
input_array = input().split()
sum = min = max = int(input_array[0])
for i in range(1, n):
    temp = int(input_array[i])
    if (min > temp):
        min = temp
    if (max < temp):
        max = temp
    sum += temp
print(min, end = ' ')
print(max, end = ' ')
print(sum)

Solution (Python):
n = map(int,input())
L = list(map(int,input().split()))
minnum = min(L)
maxnum = max(L)
print(minnum,maxnum,sum(L))

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

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

print(min(a), max(a), sum(a))