Problem:


  MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});

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



Sample input:
5
10 1 5 4 17


Sample output:
1 17 37

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
import math

# import numpy as np

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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
data = list(map(int, input().split()))   # 1行にある複数の値を整数にして、リストにしまう
#
vmin = min(data)  # 最小値
vmax = max(data)  # 最大値
vsum = sum(data)  # 合計
#
print(vmin, vmax, vsum)  # 結果表示

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
a = list(map(int, input().split()))
mina = str(min(a))
maxa = str(max(a))
suma = str(sum(a))
print(mina + ' ' + maxa + ' ' + suma)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
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}")

Submission status: Accepted

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

min_value = min(a)
max_value = max(a)
sum_value = sum(a)

print (min_value,max_value,sum_value)

Submission status: Accepted

Solution code:

count = int(input())
input_nums = list(map(int, input().split()))

num_min = min(input_nums)
num_max = max(input_nums)
num_sum = sum(input_nums)

print(num_min, num_max, num_sum)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

print(b,c,d)

Submission status: Accepted

Solution code:
a=int(input())
list=map(int,raw_input().split())
print str(min(list))+" "+str(max(list))+" "+str(sum(list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
	number = int(input())
	li = list(map(int,input().split()))

	sum = 0
	min = li[0]
	max = li[0]

	for i in li:
		if i > max:
			max = i
		if i < min:
			min = i
		sum += i


	print(min,max,sum)


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
n = int(input()) # nは用いないが、とりあえず受け取っておく
A = [int(x) for x in input().split()]   # list型でa_1, ... a_nまで受け取る
print("{} {} {}".format(min(A), max(A), sum(A)))

Submission status: Accepted

Solution code:
def get_min_max_sum(arr):
    array = sorted(arr)
    minimum = array[0]
    maximum = array[-1]
    s= sum(array)

    print( str(minimum) + " " + str(maximum) + " " + str(s))

if __name__ == "__main__":

    number = int(input())
    seq = input().split(" ")
    array = [int(a) for a in seq ]

    get_min_max_sum(array)

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0
for i in range(n):
    sum += list[i]

list.sort()
max = list[-1]
min = list[0]
print(min, max, sum)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())
print(f'{min(a)} {max(a)} {sum(a)}')

Submission status: Accepted

Solution code:
num = input()
data = input().split()
min = 1000000
max = -1000000
sum = 0

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

Submission status: Accepted

Solution code:
n = int(input())

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

mn = min(data)
mx = max(data)
sm = sum(data)

print(mn,mx,sm)

Submission status: Accepted

Solution code:
t = input()
lista = list(input().split())
lista = list(map(int,lista))

ANS = [min(lista),max(lista),sum(lista)]

print(ANS[0],ANS[1],ANS[2])

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

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

main()

Submission status: Accepted

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

minX = min(X)
maxX = max(X)
sumX = sum(X)
print(minX, maxX, sumX)

Submission status: Accepted

Solution code:

def Min_Max_Sum(n,list):
    max_num = list[0]
    min_num = list[0]
    sum = list[0]
    for i in range(1,len(list)):
        if list[i] > max_num:
            max_num = list[i]
        elif list[i] < min_num:
            min_num = list[i]
        sum += list[i]
    return min_num,max_num,sum


def main():
    n = int(input())
    num_list = list(map(int, input().split()))
    print("%d %d %d"%(Min_Max_Sum(n,num_list)))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
_ = input()

n = [ int(s) for s in input().split() ]
print(min(n), max(n), sum(n))

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int,input().split()))
b = sorted(b)
print(b[0],b[-1],sum(b))

Submission status: Accepted

Solution code:
n = int(input())

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l = int(input())
nums = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
line=int(input())
x = list(map(int,input().split()))
max=-10000000
min=10000000
sum=0
for i in range(line):
    if x[i] > max:
        max = x[i]
    if x[i] < min:
        min = x[i]
    sum = sum + x[i]
print(f"{min} {max} {sum}")

Submission status: Accepted

Solution code:
_ = input()
a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))
sum = 0
for i in range(len(A)):
    sum += A[i]
print(min(A),max(A),sum)

Submission status: Accepted

Solution code:
n = int(input())

numbers = list(map(int, input().split()))
# print(numbers)
print(min(numbers), max(numbers), sum(numbers))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
nlst = []
nlst = input().split()
nlst_i = [int(s) for s in nlst]
nlst_i.sort()
    
print(f"{nlst_i[0]} {nlst_i[n-1]} {sum(nlst_i)}")

Submission status: Accepted

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

min = 1000000
max = -1000000
tt = 0
for i in x:
	if min > i : min = i
	if max < i : max = i
	tt = tt + i
print(min, max, tt)

Submission status: Accepted

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

Submission status: Accepted

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

print(min(data), max(data), sum(data))

Submission status: Accepted

Solution code:
n = input()
nlist = list(map(int,input().split()))
min = min(nlist)
max = max(nlist)
sum = sum(nlist)
print(f"{min} {max} {sum}")

Submission status: Accepted

Solution code:
import sys

n=int(input())
min=sys.maxsize
max=-sys.maxsize
sum=0

line=input().rstrip().split()
for i in range(n):
    tmp=int(line[i])
    sum+=tmp
    if max<tmp:
        max=tmp
    if tmp<min:
        min=tmp

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

Submission status: Accepted

Solution code:
n = int(input())
x = []
x = list(map(int, input().split()))

print(min(x), max(x), sum(x))

Submission status: Accepted

Solution code:
BIG_NUM = 2000000000

N=int(input())

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

maxinum = -BIG_NUM
mininum = BIG_NUM
total = 0

for x in table:
    if maxinum< x:
        maxinum =x
    if mininum > x:
        mininum = x
    total += x
    
print("%d %d %d"%(mininum, maxinum, total))

Submission status: Accepted

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

vmin = min(data)  # 最小値
vmax = max(data)  # 最大値
vsum = sum(data)  # 合計

print(vmin, vmax, vsum)  # 結果表示

Submission status: Accepted

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

MIN = min(list)
MAX = max(list)
SUM = sum(list)
print(MIN, MAX, SUM)

Submission status: Accepted

Solution code:
import math
input()
x=input().split()
for i,v in enumerate(x):
    x[i]=int(v)
print(min(x),max(x),sum(x))

Submission status: Accepted

Solution code:
number = int(input())
x = input().split(" ")
sum = 0
max = int(x[0])
min = int(x[0])
for i in range(0, number):
    sum = sum + int(x[i])
    if max < int(x[i]):
        max = int(x[i])
    elif int(x[i]) < min:
        min = int(x[i])
print(str(min)+" "+str(max)+" "+str(sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

min = min(a)
max = max(a)
sum = 0
for i in range(n):
    sum += a[i]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dev = input()
l = [int(i) for i in input().split()]
print(min(l), max(l), sum(l))

Submission status: Accepted

Solution code:
n = input()
nums = [int(e) for e in input().split()]
print ("{0} {1} {2}".format(min(nums),max(nums),sum(nums)))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
n = int(input())
a = []
a[:] = map(int, input().split())
max = -2000000
min = 2000000
sum = 0
for _ in range(0,n):
    sum += a[_]
    if (a[_]>max):
        max = a[_]
    if (a[_]<min):
        min = a[_]
print('{} {} {}'.format(min, max, sum))

Submission status: Accepted

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

print(str(min(num)) + ' ' + str(max(num)) + ' ' + str(sum(num)))

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = min(a)
c = max(a)
d = sum(a)
print(f"{b} {c} {d}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    print(min(A),max(A),sum(A))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())

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

max=a[0]
min=a[0]
sum=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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n=int(input())
l=input().split()
s=0

max=int(l[0])
min=int(l[0])

for i in range(n):
    a=int(l[i])
    
    if min > a:
        min=a
        s+=a
        
    elif max<a:
        max=a
        s+=a
    else:
        s+=a

print(min,max,s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = int(input())
nd = input().split()
for i in range(len(nd)):
    nd[i] = int(nd[i])
bsum = sum(nd)
bmax = max(nd)
bmin = min(nd)
print(bmin,bmax,bsum)

Submission status: Accepted

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

Submission status: Accepted

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

data_min = min(data)
data_max = max(data)
data_sum = sum(data)

print(data_min, data_max, data_sum)

Submission status: Accepted

Solution code:
import math
n = int(input())
a = input()
list1 = list(map(int,a.split()))
print(min(list1),max(list1),sum(list1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a_i = list(map(int, input().split(" ")))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
max_num = None
min_num = None
sum_num = 0
n = input()
num_list = list(map(int,input().split()))
for i in num_list:
        if max_num is None or max_num < i:
            max_num = i
        if min_num is None or min_num > i:
            min_num = i
        sum_num += i
print("{} {} {}".format(min_num,max_num,sum_num))

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
lst = [int(x) for x in l]
m = min(lst)
M = max(lst)
s = sum(lst)
print(m,M,s)

Submission status: Accepted

Solution code:
n = int(input())
b = input().split(" ")
min = int(b[0])
max = int(b[0])
total = 0
for i in range(n):
    if int(b[i]) <= min:
        min = int(b[i])
    if int(b[i]) >= max:
        max = int(b[i])
    total += int(b[i])
print("%d %d %d"%(min, max, total))

Submission status: Accepted

Solution code:
n = int(input())
vals = list(map(int, input().split()))
print('%d %d %d' %(min(vals), max(vals), sum(vals)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

times = input()

nums = input().split()

max = -1000000
min = 1000000
total = 0

for num in nums:

    num = int(num)
    total += num

    if max < num:
        max = num

    if min > num:
        min = num


print(min, max, total)

Submission status: Accepted

Solution code:
n = int(input().strip())
li = list(map(int, input().split()))

print(min(li), max(li), sum(li))

Submission status: Accepted

Solution code:
n=int(input())
myValue=list(map(int,input().split(" ")))
myMin=min(myValue)
myMax=max(myValue)
mySum=sum(myValue)
print(myMin,myMax,mySum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
nums = list(map(int, input().split()))
mi = min(nums)
ma = max(nums)
su = sum(nums)

print(mi, ma, su)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(min(numbers), max(numbers), sum(numbers))

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

Submission status: Accepted

Solution code:
mina=+1000*1000;maxa=-1000*1000;suma=0
input()
for a in tuple(map(int,input().split())):
    mina=min(mina,a);maxa=max(maxa,a);suma+=a
print(mina,maxa,suma)

Submission status: Accepted

Solution code:
A = []
B = []
x = input()
A = list(input().split())
for i in A:
    i = int(i)
    B.append(i)
print("{} {} {}".format(min(B),max(B),sum(B)))

Submission status: Accepted

Solution code:
line1 = int(input())
line2 = list(map(int, input().split(' ')))

min = min(line2)
max = max(line2)
sum = sum(line2)
print(f"{min} {max} {sum}")

Submission status: Accepted

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

Submission status: Accepted

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

vmini = min(table)
vmaxi = max(table)
vsumn = sum(table)

print(vmini, vmaxi, vsumn)

Submission status: Accepted

Solution code:
n = int(input())
x = list(map(int, input().split() ))
min_value = min(x)
max_value = max(x)
sum_value = sum(x)
print('{0} {1} {2}'.format(min_value, max_value, sum_value))

Submission status: Accepted

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

Submission status: Accepted

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

print(min(x), max(x), sum(x))

Submission status: Accepted

Solution code:
input()
li = list(map(int, input().split()))

print(min(li), end=' ')
print(max(li), end=' ')
print(sum(li))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())


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

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

Submission status: Accepted

Solution code:
n = int(input())
ai = list(map(int, input().split()))
min = 1000000
max = -1000000
sum = 0
for i in range(n):
    if ai[i] >= max:
        max = ai[i]
    if min >= ai[i]:
        min = ai[i]
    sum += ai[i]
print("%d %d %d" % (min, max, sum))

Submission status: Accepted

Solution code:
N = int(input())

A = [int(x) for x in input().split()]
    
a = min(A)   # 2
b = max(A)   # 50
c = sum(A)   # 256

print(str(a) + " " + str(b) + " " + str(c))

Submission status: Accepted

Solution code:
#coding: utf-8

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())
a = list(map(int, input().split()))

min_num = max_num = a[0]
total = 0
for i in a:
    if min_num > i : min_num = i
    if max_num < i : max_num = i 
    total += i

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

Submission status: Accepted

Solution code:
def test():

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

	max = -1000000
	min = 1000000
	sum = 0

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

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

if __name__ == "__main__":
	test()

Submission status: Accepted

Solution code:
#read element count
count = input()
count = int(count)

#read integers
s = input().split()

list=[]
for i in range(count):
    list.append(int(s[i]))

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

print(Min,Max,Sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
lmax=max(l)
lmin=min(l)
lsum=sum(l)
print(lmin,lmax,lsum)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
b = min(a)
c = max(a)
d = sum(a)
print("{} {} {}".format(b, c, d))

Submission status: Accepted

Solution code:
m = raw_input()
n = int(m)
a = map(int,raw_input().split())
su=0
i=0
ma=-1000000
mi=1000000
while i<n:
	if ma<a[i]:
		ma=a[i]
	if mi>a[i]:
		mi=a[i]
	su += a[i]
	i+=1
print"%d %d %d"%(mi,ma,su)

Submission status: Accepted

Solution code:
# -*- coding:utf-8
N = int(input())
A = list(map(int,input().split()))

A.sort()
Min = A[0]
A.reverse()
Max = A[0]
Sum = 0
for i in A:
    Sum += i

print("{} {} {}".format(Min,Max,Sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
l = list(map(int,input().split()))
l2 = sorted(l)
print(l2[0], l2[-1], sum(l2))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
s = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
i=int(input())
lst=list(int(i)for i in input().split())
a = min(lst)   	
b = max(lst)   
c = sum(lst)   
print(str(a)+" "+str(b)+" "+str(c))

Submission status: Accepted

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

print(min(As), max(As), sum(As))

Submission status: Accepted

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

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

print(min, max, sum)

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
min_val = min(a_list)
max_val = max(a_list)
sum_val = sum(a_list)
print(min_val, max_val, sum_val)

Submission status: Accepted

Solution code:
i=int(input())
lst=list(int(i)for i in input().split())
a=min(lst)
b=max(lst)
c=sum(lst)
print(str(a)+" "+str(b)+" "+str(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=int(input())
lst=list(int(i)for i in input().split())
a = min(lst)   	
b = max(lst)   
c = sum(lst)   
print(str(a)+" "+str(b)+" "+str(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
max = -1e9;min = 1e9;sum = 0
for i in range(n):
    sum+=int(l[i])
    if max<int(l[i]):
        max = int(l[i])
    if min>int(l[i]):
        min = int(l[i])
print(min,max,sum)

Submission status: Accepted

Solution code:
i=int(input())
table=list(map(int,input().split()))

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

print(amin,amax,asum)

Submission status: Accepted

Solution code:
n=int(input())

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

maxd=max(d)
mind=min(d)
sum=sum(d)

print(mind, maxd, sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=[]
l=list(map(int,input().split()))
print(str(min(l))+' '+str(max(l))+' '+str(sum(l)))

Submission status: Accepted

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

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

print(f"{a} {b} {c}")

Submission status: Accepted

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

print(min(num_list), max(num_list), sum(num_list))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
data = list(map(int, input().split()))  
#
vmin = min(data)  
vmax = max(data)  
vsum = sum(data)  
#
print(vmin, vmax, vsum)

Submission status: Accepted

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

Submission status: Accepted

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

print(min(li), max(li), sum(li))

Submission status: Accepted

Solution code:
N=int(input())
vals = [int(x) for x in input().split()]
print(min(vals),max(vals),sum(vals))

Submission status: Accepted

Solution code:
n = int(input())
ns = list(map(int, input(). split()))
a = min(ns)
b = max(ns)
c = sum(ns)
print(f"{a} {b} {c}")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
mn = a[0]
mx = a[0]
sum = a[0]
for i in range(1, n):
    mn = min(mn, a[i])
    mx = max(mx, a[i])
    sum += a[i]
print(mn, mx, sum)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    elem_num = int(input())
    int_list = list(map(lambda x: int(x), input().split(" ")))

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