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):
n = int(input())
x = list(map(int, input().split()))
b = max(x)
m = min(x)
s = sum(x)
print(f"{m} {b} {s}")

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

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

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

print(m, M, S)

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

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

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

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

m = 1000000
M = -1000000
s = 0

for j in N:
    s += j

    if j > M:
        M = j
    if j < m:
        m = j
    
print(m,M,s)

Solution (Python):

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

Solution (Python):
n = int(input())
s=0
b=0
p=0
l = list(map(int, input().split()))
for i in l:
    s=s+l[p]
    p+=1
l.sort()
print(str(l[0]),end=" ")
print(str(l[n-1]),end=" ")
print(s)

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

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

vmin = min(deta)
vmax = max(deta)
vsum = sum(deta)
print(vmin,vmax,vsum)

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

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

Solution (Python):
import sys
n=int(input())
a=list(map(int, input().split()))
max1=max(a)
min1=min(a)
sum1=sum(a)
print(str(min1)+' '+str(max1)+' '+str(sum1))

Solution (Python):

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


min = min(list)
max = max(list)
sum = sum(list)

print(min, max, sum)

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

minimum = min(A)
maximum = max(A)
A_sum = sum(A)

print(minimum, maximum, A_sum)

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

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

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

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

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

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

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

if len(lst) == n:
    max_lst = max(lst)
    min_lst = min(lst)
    sum_lst = sum(lst)
    print("{} {} {}".format(min_lst, max_lst, sum_lst))

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

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

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

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

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

mi = min(lst)
ma = max(lst)
su = sum(lst)

print(f'{mi} {ma} {su}')

Solution (Python):
n = input()
results = list(map(int, input().split()))
m_n = min(results)
m_x = max(results)
s = sum(results)
print(m_n, m_x, s)

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

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

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

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

a = min(list1)
b = max(list1)
c = sum(list1)

print('{} {} {}'.format(a, b, c))

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

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

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

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


mini = min(table)
maxi = max(table)
total = sum(table)

print(mini,maxi,total)

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())
a = list(map(int, input().split()))

sum = 0
max = -1000000
min = 1000000
for i in range(n):
    sum = sum + a[i]
    if max < a[i]:
        max = a[i]
    if min > a[i]:
        min = a[i]
        
print(min, max, sum)

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

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

Solution (Python):
count = int(input())
min = 99999999
max = -99999999
sum = 0
numbers=[]
numbers = list(map(int,input().split()))

for num in numbers:
    if num > max:
        max = num
    if num < min:
        min = num
    sum += num
print(min, max, sum)

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

Solution (Python):
num = int(input())
list = [int(x) for x in input().split()]
sum = 0
min = list[0]
max = list[0]
for x in list:
    sum += x
    if x > max:
        max = x
    if x < min:
        min = x
print(min, max, sum)

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(x) for x in input().split()]
print(min(a), max(a), sum(a))

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

a_sorted = sorted(a_list)
min = a_sorted[0]
output.append(min)
max = a_sorted[n-1]
output.append(max)
sum = sum(a_sorted)
output.append(sum)
print(output[0], output[1], output[2])

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

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

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

print(f"{x} {y} {z}")

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
mina = maxa = a[0]
suma = 0
for i in range(n):
    if a[i] < mina:
        mina = a[i]
    if a[i] > maxa:
        maxa = a[i]
    suma += a[i]
print(mina, maxa, suma)

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

Solution (Python):
_ = int(input())
a = list(map(int, input().split()))
print(f'{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):
n=int(input())
l=list(map(int,input().split()))
print(min(l),max(l),sum(l))

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

a = min(data)  
b = max(data)  
c = sum(data)  

print(a, b, c)

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

print(min, max, sum)

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

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

min = 1000001
max = -1000001
sum = 0

for i in a:
    if i < min: min = i
    if i > max: max = i
    sum += i
    
print(str(min) + " " + str(max) + " " + str(sum))

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

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

Solution (Python):
BIG_NUM = 2 * 10**9

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

vmax = - BIG_NUM
vmin = BIG_NUM
vsum = 0

for x in table:
    if x > vmax:
        vmax = x
    if x < vmin:
        vmin = x
    vsum += x

print("{} {} {}".format(vmin, vmax, vsum))

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(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()))
m = min(A)
M = max(A)
S = sum(A)
print(m,M,S)

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
sys.setrecursionlimit(100001)






def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




n = int(input())
d = getInputListInt()

d.sort()

print(d[0], d[n-1], sum(d))

Solution (Python):

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

Solution (Python):
n=int(input())
l=[int(i) for i in input().split()]
min=l[0]
max=l[0]
sum=0
for i in range(n):
    if l[i]>max:
        max=l[i]
    elif l[i]<min:
        min=l[i]
    sum+=l[i]
print(min,max,sum)

Solution (Python):
num = int(input())
s = input().rstrip().split(' ')
sum = int(s[0])
maxi = int(s[0])
mini = int(s[0])
lst = []
for i in range(1, num):
  sum += int(s[i])
  if maxi < int(s[i]):
    maxi = int(s[i])
  elif mini > int(s[i]):
    mini = int(s[i])
print(str(mini) + " " + str(maxi) + " " + str(sum))

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 = input()
an = list(map(int, input().split()))

s = sum(an)
ma = max(an)
mi = min(an)
print(mi, ma, s)

Solution (Python):

num = 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()))   
a_max = max(a)
a_min = min(a)
a_sum = sum(a)

print(a_min,a_max,a_sum)

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

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

Solution (Python):
BIG = 20000000
SMALL =-20000000
n = int(input())
table = list(map(int, input().split()))

maxnum=SMALL
minnum=BIG
total=0
for a in table:
    total=total+a
    if a <minnum:
        minnum=a
    
    if a>maxnum:
        maxnum=a
        
print("%d %d %d"%(minnum,maxnum,total))

Solution (Python):
num = input()
table = list(map(int,input().split()))
min = sorted(table)[0]
max = sorted(table,reverse=True)[0]
sum = 0

for i in table:
    sum += i
print(min,max,sum)

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

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

Solution (Python):
N = int(input())
A = [int(n) for n 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):
input()
a=list(map(int,input().split()))
a.sort()
print(a[0],a[-1],sum(a),sep=' ')

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()))
vmin = min(data)
vmax = max(data)
vsum = sum(data)
print(vmin,vmax,vsum)

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

Solution (Python):

n = int(input())
lis = list(map(int, input().split()))
lis.sort()
sum = 0
for i in range(n):
    sum += lis[i]

print(lis[0], lis[-1], sum)

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(min(lst),max(lst),sum(lst))

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

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

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())
a_list = list(map(int, input().split()))


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

print("%d %d %d"%(min_num, max_num, sum_num))

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

max=num[0]
min=num[0]
sum=num[0]

for c in range(1,n):
  if max < num[c]:
    max=num[c]
  if min > num[c]:
    min=num[c]
  sum+=num[c]

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

Solution (Python):
n = 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):
num_integers = int(input())

input_value = input()

integers = list(map(int, input_value.split()))

min_int = min(integers)
max_int = max(integers)
sum_int = sum(integers)

print('{min} {max} {sum}'.format(min=min_int, max=max_int, sum=sum_int))

Solution (Python):
n = int(input())
x = list(map(int, input().split()))
ans = []
ans.extend([min(x), max(x), 0])
for i in x:
  ans[2] += i
print("{} {} {}".format(ans[0], ans[1], ans[2]))

Solution (Python):
a = 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("%d %d %d"%(min(a),max(a),sum(a)))

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

print(min(arr), max(arr), sum(arr))

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
m = l[0]
M = l[-1]
s = sum(l)
print(f"{m} {M} {s}")

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

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

print(min(num),max(num),sum(num))

Solution (Python):
x=int(input())
li = list(map(int,input().split()))
min_no=min(li)
max_no=max(li)
sum_no=sum(li)
print(min_no,max_no,sum_no)

Solution (Python):
n=int(input())
x=list(map(int,input().split()))
print(str(min(x))+' '+str(max(x))+' '+str(sum(x)))

Solution (Python):
_ = input()

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

minimum = a[0]
maximum = a[0]
sum = 0

for num in a:
    minimum = min(minimum, num)
    maximum = max(maximum, num)
    sum+=num

print("%d %d %d" %(minimum, maximum, sum))

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

Solution (Python):

import math

def main():
  n = int(input())
  a = list(map(int, input().split(' ')))
  
  print(min(a), max(a), sum(a))
  
if __name__ == "__main__":
  main()

Solution (Python):
BIG_NUM = 2000000000

N = int(input())

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

maximum = -BIG_NUM
minimum = BIG_NUM
total = 0

for y in table:
    if maximum < y:
        maximum = y
    if minimum > y:
        minimum = y
    total += y

print("%d %d %d"%(minimum,maximum,total))

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
m = min(l)
M = max(l)
s = sum(l)
print(f"{m} {M} {s}")

Solution (Python):
n = int(input())
value = input().split()
ans = []
for i in range(n):
    ans.append(int(value[i]))

print(f"{min(ans)} {max(ans)} {sum(ans)}")

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(min(a), max(a), sum(a))

Solution (Python):
n = int(input())
x = [int(y) for(y) in input().split()]
mi = x[0]
ma = x[0]
total = 0

for z in x :
    if mi > z :
        mi = z
    if ma < z :
        ma = z
    total += z
    
print("%d %d %d" %(mi, ma, total))

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

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

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

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

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

Solution (Python):
n = int(input())
lst = list(map(int, input().split()))
a = lst[0]
A = lst[0]
s = lst[0]
for i in range(1, n):
    a = min(a, lst[i])
    A = max(A, lst[i])
    s += lst[i]
print(a, A, s)

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()))
a = sorted(a)

min = a[0]
max = a[-1]
sum = 0
for i in a:
    sum += i

print(min, max, sum)

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


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

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

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

Solution (Python):
def calc(n, arr):
    min = arr[0]
    max = arr[0]
    sum = arr[0]
    for i in range(n - 1):
        target = arr[i + 1]
        if target < min:
            min = target
        if target > max:
            max = target
        sum += target

    return '{} {} {}'.format(min, max, sum)


if __name__ == "__main__":
    n = input()
    arr = list(map(int, input().split()))
    print(calc(int(n), arr))

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

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

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

Solution (Python):

import sys

n= int(input())


min=1000000
max=-1000000
total=0

tmp = input().split()
a = list(map(lambda a: int(a), tmp))


for i in range(n):
    if(a[i]<min):
        min=a[i]
    if(a[i]>max):
        max=a[i]
    total+=a[i]
print(min,max,total)

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())
c=list(map(int,input().split()))
sum=0
for i in c:
    sum+=i 
print("{0} {1} {2}".format(min(c),max(c),sum))

Solution (Python):

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

a.sort()
s = sum(a)

print("%d %d %d"%(a[0],a[n-1],s))

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

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

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

Solution (Python):
n = int(input())
x = list(map(int, input().split()))
top = x[0]
und = x[0]
add = x[0]
for i in range(1, n):
    if top < x[i]: top = x[i]
    if und > x[i]: und = x[i]
    add += x[i]
print(und, top, add)

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


    
print(min(nums), max(nums), sum(nums), sep=' ')

Solution (Python):
def sumNum(lst):
    ret = sum(lst)
    return ret

def minNum(lst):
    ret = min(lst)
    return ret

def maxNum(lst):
    ret = max(lst)
    return ret

def convertLst(lst):
    l = lst.split()
    lst_int = [int(n) for n in l]
    return lst_int

def main():
    num = input()
    lst = input()
    lst_int = convertLst(lst)
    print(minNum(lst_int), maxNum(lst_int), sumNum(lst_int))

if __name__ == '__main__':
    main()

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

min = min(data)
max = max(data)
sum = sum(data)

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

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()
nl = input()
nl = nl.split()
minn = maxn = sumn = int(nl[0])
for i in range(1,int(n)):
    minn = min(minn,int(nl[i]))
    maxn = max(maxn,int(nl[i]))
    sumn = sumn + int(nl[i])
else:
    print(minn,maxn,sumn)

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

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

mini = min(num_list)
maxi = max(num_list)
total = sum(num_list)

print("{0} {1} {2}".format(mini, maxi, total))

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

list_max = max(list)
list_min = min(list)
list_sum = sum(list)

print(list_min, list_max, list_sum)

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

max = max(n)
min = min(n)
total = sum(n)

print("{} {} {}".format(min, max, total))

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

print(min(integers), max(integers), sum(integers))

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

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

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

a_min = min(al)
a_max = max(al)
a_sum = sum(al)
print(a_min, a_max, a_sum)

Solution (Python):
n = int(input())
*a, = 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):

input()
*x, = map(int,input().split())

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

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

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(f"{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):
count = int(input())

num = map(int, input().split())

n_max = -1000001
n_min = 1000001
n_sum = 0

for n in num:
    n_sum += n
    if n_max < n:
        n_max = n
    
    if n_min > n:
        n_min = n

print(f'{n_min} {n_max} {n_sum}')

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

num_list = list(map(int,input().split()))
num_min = min(num_list)
num_max = max(num_list)
num_sum = sum(num_list)

print("%d %d %d"%(num_min,num_max,num_sum))

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

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

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

kmin=min(k)
kmax=max(k)
ksum=sum(k)

print("%d %d %d"%(kmin,kmax,ksum))

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

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

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

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

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

print(min(ai), max(ai), sum(ai))

Solution (Python):
int(input())
S = list(map(int,input().split()))
dmin = min(S)
dmax = max(S)
dsum = sum(S)
print(dmin, dmax, dsum)

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

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

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

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

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

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

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

print(f"{min(data)} {max(data)} {sum(data)}")

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

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

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

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

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

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

Solution (Python):
i=int(input())
num=list(map(int,input().split()))
while(i<len(num)):
    num.pop()
print(min(num),max(num),sum(num))

Solution (Python):
import sys
import itertools
import math



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,*A=map(int,read().split())
print(min(A),max(A),sum(A))

Solution (Python):
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()))   

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

print(vmin, vmax, vsum)

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
min = l[0]
max = l[0]
sum = l[0]
for num in range(1,n):
    if min > l[num]:
        min = l[num]
    if max < l[num]:
        max = l[num]
    sum += l[num]

ans = [min,max,sum]
print(ans[0],ans[1],ans[2])

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

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

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

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

Solution (Python):
n = int(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()))
mina = str(min(a))
maxa = str(max(a))
suma = str(sum(a))
print(mina + ' ' + maxa + ' ' + suma)

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

print(f"{min(nums)} {max(nums)} {sum(nums)}")

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

Solution (Python):
str2 = input()
str = input()
list = str.split() 
numList = [int(s) for s in list]
minNum = min(numList)
maxNum = max(numList)
test ="{} {} {}".format(minNum,maxNum,sum(numList))
print(test)

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

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

min=a[0]
max=a[0]
sum=a[0]
num=1
while True:
    if num==n:
        break
    if a[num]>max:
        max=a[num]
    if a[num]<min:
        min=a[num]
    sum=sum+a[num]
    num+=1
    

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

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

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

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

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

min = min(a)
max = max(a)
sum = sum(a)

print(str(min) + " " + str(max) + " " + str(sum))

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

Solution (Python):
n=int(input())
list=list(map(int,input().split()))
sm=min(list)
b=max(list)
s=sum(list)
print(f"{sm} {b} {s}")

Solution (Python):
n=int(input())       
l=[int(x) for x in input().split()]
s=0
for i in range(len(l)):
    s+=l[i]
print(min(l),max(l),s)

Solution (Python):
n=int(input())
a=input()
a=a.split(' ')
fu=int(a[0])
ma=a[0]
mi=a[0]
for w in range(n-1):
    if int(ma)<int(a[w+1]):
        ma=int(a[w+1])
        
    if int(mi)>int(a[w+1]):
        mi=int(a[w+1])
    fu+=int(a[w+1])
print(mi,ma,fu)

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

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

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

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

Solution (Python):
for i in range(2):
    inp = input()

line = list(map(int, ' '.join(inp.splitlines()).split()))

maxnum = max(line)
minnum = min(line)
sumnum = sum(line)

print(f"{minnum} {maxnum} {sumnum}")