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:
input()
d = [int(x) for x in input().split()]
print(min(d), max(d), sum(d))

Submission status: Accepted

Solution code:
n = input()

min_num = 1000001
max_num = -1000001
sum = 0

tmp = map(int, raw_input().split())
for i in xrange(n):
    min_num = min(min_num, tmp[i])
    max_num = max(max_num, tmp[i])
    sum += tmp[i]
    
print "%d %d %d" % (min_num, max_num, sum)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

min_a = min(a)
max_a = max(a)
sum_a = sum(a)

print(min_a, max_a, sum_a)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(str(a),str(b),str(c))

Submission status: Accepted

Solution code:
while True:
    l = map(int, raw_input().split())
    num = map(int, raw_input().split())
    print "%d %d %d" % (min(num),max(num),sum(num))
    break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: UTF-8
a = raw_input()
l = map(int, raw_input().split())


l.sort()
x =l[0]


l.reverse()
y = l[0]

z = sum(l)


print "%d %d %d" %(x, y, z)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def calc(list):
    """
    return (min,max,sum)

    >>> calc([10, 1, 5, 4, 17])
    (1, 17, 37)
    >>> calc([-2, -1, 0])
    (-2, 0, -3)
    >>> calc([-1000000,1000000,0])
    (-1000000, 1000000, 0)
    """

    return (min(list),max(list),sum(list))


if __name__ == '__main__':
    n = int(raw_input())
    list = map(int,raw_input().split())
    print " ".join(map(str,calc(list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

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

num_min = min(b)
num_max = max(b)
sum = sum(b)

print num_min, num_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 = int(raw_input())
numbers = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

max = a[0]
min = a[0]
sum = 0

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

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

Submission status: Accepted

Solution code:
# encoding:utf-8
input()
   
data = [int(x) for x in input().split()]
print(min(data), max(data), sum(data))

Submission status: Accepted

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

Submission status: Accepted

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

max = x_list[0]
min = x_list[0]
sum = x_list[0]

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

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

Submission status: Accepted

Solution code:
input()
# map returns an iterator rather than a list, 
# and an iterator can traverses the data only once.
# so we need to 'list' here
ns=list(map(int,input().split())) 
print(min(ns),max(ns),sum(ns))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
class MinMaxAndSum:
    def output(self, a):
        print "%d %d %d" % (min(a), max(a), sum(a))

if __name__ == "__main__":
    mms = MinMaxAndSum()
    raw_input()
    a = map(int, raw_input().split())
    mms.output(a)

Submission status: Accepted

Solution code:
S = int(input())
N = list(map(int, input().split(' ')))
N.sort()
sum = 0
for i in range(S):
	sum += N[i]
	
print(N[0], N[-1], sum)

Submission status: Accepted

Solution code:
k=raw_input().split()
k=raw_input().split()
k.sort()
for i in range(len(k)):
        k[i]=int(k[i])
        k.sort()
print min(k),
print max(k),
print sum(k)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
a = int(input())
b_int = map(int, input().split())
max = -1000000
min = 1000000
total =0
for i in b_int:
    if i > max:
        max = i
    if i < min:
        min = i
    total += i
print(min, max, total)

Submission status: Accepted

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

Submission status: Accepted

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

print(min(vals), max(vals), sum(vals))

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
min = int(a[0])
max = int(a[0])
sum = 0
for i in a:
    if min > int(i):
        min = int(i)
    if max < int(i):
        max = int(i)
    sum += int(i)
print("{0} {1} {2}".format(min, max, sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 09-Computation-Min_Max_and_Sum.py

# ????°????????????§??????????¨????
# n ????????´??° ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????

# Input
# ??????????????´??°?????° n ???????????????????????????????????? n ????????´??° ai ????????????????????§?????????????????????
# Output
# ????°????????????§??????????¨????????????????????????§????????????????????????????????????

# Constraints
# 0<n???10000
# ???1000000???ai???1000000
# Sample Input
# 5
# 10 1 5 4 17
# Sample Output
# 1 17 37

num_min = 1000001
num_max = -1000001
num_sum = 0
num = int(input())

# a = []
# a = [ *map(int,input().split() ) ]
a = input().split()

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

for i in range(num):
	if a[i]<num_min:
		num_min = a[i]

	if a[i]>num_max:
		num_max = a[i]

	num_sum+=a[i]

print("{0} {1} {2}".format(num_min,num_max,num_sum) );

Submission status: Accepted

Solution code:
# 09-Computation-Min_Max_and_Sum.py

# ????°????????????§??????????¨????
# n ????????´??° ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????

# Input
# ??????????????´??°?????° n ???????????????????????????????????? n ????????´??° ai ????????????????????§?????????????????????
# Output
# ????°????????????§??????????¨????????????????????????§????????????????????????????????????

# Constraints
# 0<n???10000
# ???1000000???ai???1000000
# Sample Input
# 5
# 10 1 5 4 17
# Sample Output
# 1 17 37

num_min = 1000001
num_max = -1000001
num_sum = 0
num = int(input())

# a = []
# a = [ *map(int,input().split() ) ]
a = input().split()

for i in range(num):
	a[i]=int(a[i])
	if a[i]<num_min:
		num_min = a[i]

	if a[i]>num_max:
		num_max = a[i]

	num_sum+=a[i]

print("{0} {1} {2}".format(num_min,num_max,num_sum) );

Submission status: Accepted

Solution code:
n = int(input())
InputNum = input().split()
a = []
for x in range(n):
    a.append(int(InputNum[x]))
a.sort()
min = a[0]
a.reverse()
max = a[0]
sum = 0
for y in range(n):
    sum += int(a[y])

print(min,max,sum)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
	input()
	nums = [int(i) for i in input().split(" ")]
	print("%d %d %d" % (min(nums),max(nums),sum(nums)))
if __name__ == '__main__':
  main()

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 = int(input())
a = sorted([int(x) for x in input().split()])
print(a[0],a[-1],sum(a))

Submission status: Accepted

Solution code:
n = int(input())
a =[]
a = list(input().split())
for i in range(len(a)):
    a[i] = int(a[i])

if n < 0 or n > 10000:
    pass
else:
    sum = 0
    for i in range(len(a)):
        sum += a[i]
    print(min(a), max(a), sum)

Submission status: Accepted

Solution code:
import math

n = input()

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

minNum = 100000000000
maxNum = -100000000000
sumNum = 0

for x in a :
    minNum = min(minNum, x)
    maxNum = max(maxNum, x)
    sumNum += x

minNum, maxNum, sumNum = map(str, [minNum, maxNum, sumNum])

print minNum + ' ' + maxNum + ' ' + sumNum

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
n = input().split()
a = []
for i in range(N):
    a.append(int(n[i]))
a = sorted(a)
print('{0} {1} {2}'.format(a[0], a[-1], sum(a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
arr = [int(s[i]) for i in range(n)]
arr.sort()
sum = 0
for i in range(len(arr)):
    sum += arr[i]
print(arr[0], arr[len(arr)-1], sum)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n=int(input())
list=list(map(int,input().split()))
list.sort()
print(str(list[0])+" "+str(list[n-1])+" "+str(sum(list)))

Submission status: Accepted

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

min = data[0]
max = data[0]
sum = 0
for x in data:
    sum += x
    if x > max:
        max = x
    if x < min:
        min = x

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
max = -float('inf')
min = float('inf')
sum = 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 = list(map(int, input().split()))
print("{} {} {}".format(min(l), max(l), sum(l)))

Submission status: Accepted

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

print(min(ls), end=" ")
print(max(ls), end=" ")
print(sum(ls))

Submission status: Accepted

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

Submission status: Accepted

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

mi = l[0]
ma = l[0]
s = 0
for i in l :
    if i > ma :
        ma = i
    if i < mi :
        mi = i
    s += i
print(mi,ma,s)

Submission status: Accepted

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

print(min(a),max(a),sum(a),sep=" ")

Submission status: Accepted

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

min = arr[0]
max = arr[0]
sum = 0

for a in arr:
	if a < min:
		min = a
	if max < a:
		max = a
	sum += a

print(min, max, sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()

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

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

Submission status: Accepted

Solution code:
input()


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

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

Submission status: Accepted

Solution code:
count = input()

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

Submission status: Accepted

Solution code:
count = input()

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

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

Submission status: Accepted

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

print(min(date),max(date),sum(date))

Submission status: Accepted

Solution code:
count = input()

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

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

Submission status: Accepted

Solution code:
input()

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

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

Submission status: Accepted

Solution code:
count = input()
data = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
lis = map(int, raw_input().split())
min = 1000000
max = - min
sum = 0
for t in lis:
	sum += t
	if min > t:
		min = t
	if max < t:
		max = t

print min, max, sum

Submission status: Accepted

Solution code:
n = input()
lis = map(int, raw_input().split())
min = 1000000
max = - min
sm = 0
for t in lis:
	if min > t:
		min = t
	if max < t:
		max = t

sm = sum(lis)
print min, max, sm

Submission status: Accepted

Solution code:
n = input()
lis = map(int, raw_input().split())
mn = lis[0]
mx = lis[0]
for t in lis:
	if mn > t:
		mn = t
	if mx < t:
		mx = t
print mn, mx, sum(lis)

Submission status: Accepted

Solution code:
n = input()
lis = map(int, raw_input().split())
mn = lis[0]
mx = lis[0]
for t in lis:
	if mn > t:
		mn = t
	if mx < t:
		mx = t
print "%s %s %s" % (mn, mx, sum(lis))

Submission status: Accepted

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

L.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
z = input()
r = input()
a = r.split(' ')    
list =[]
for i in a:
    list.append(int(i))
b = max(list)
c = min(list)
d = sum(list)
print('%s %s %s'%(c,b,d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

n = input()

a = []

a_input = raw_input().split()

for i in a_input:
    a.append(int(i))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline().strip())
data = sys.stdin.readline().strip().split(' ')

min = None
max = None
sum = 0

for i in range(n):
    num = int(data[i])
    if max is None or num > max:
        max = num

    if min is None or num < min:
        min = num

    sum += num

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

Submission status: Accepted

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

max = a[0]
min = a[0]
sum = 0

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

print min,max,sum

Submission status: Accepted

Solution code:
n=int(raw_input())
if n:
    l=[int(x) for x in raw_input().split()]
    print min(l),max(l),sum(l)
else:
    print "0 0 0"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
for i in range(0,2):
    a.append(input())
d = list(map(int,a[1].split()))
print('{} {} {}'.format(min(d),max(d),sum(d)))

Submission status: Accepted

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

print(min,max,sum)

Submission status: Accepted

Solution code:
#coding: UTF-8
import math

def MMS(n,a):
    min = max = int(a[0])
    sum = int(a[0])
    for i in range(1,n):
        if min > int(a[i]):
            min = int(a[i])
        if max < int(a[i]):
            max = int(a[i])
        sum += int(a[i])
    print(min,max,sum)
    
if __name__=="__main__":
    n = int(input())
    a = input().split(" ")
    MMS(n,a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
data = map(int, raw_input().split())
newdata = sorted(data)
sum = 0
for i in range(n):
    #print newdata[i]
    sum += newdata[i]

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

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:
input()
x=[int(i) for i in input().split()]
print(min(x),max(x),sum(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# get line input split by space
def getLnInput():
    return input().split()


# ceil(a / b) for a > b
def ceilDivision(a, b):
    return (a - 1) // b + 1


def main():
    getLnInput()
    nums = list(map(int, getLnInput()))
    print(min(nums), max(nums), sum(nums))
    return


main()

Submission status: Accepted

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

sum = 0

for i in ai:
    sum += i

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
n= int(input())
l= list(map(int,input().split()))
s= 0
for i in range(n):
	if(l[i]<l[0]):
		l[0],l[i]= l[i],l[0]
for j in range(n):
	if(l[n-1]<l[j]):
		l[n-1],l[j]= l[j],l[n-1]
for k in range(n):
	s+= l[k]
print(l[0],l[n-1],s)

Submission status: Accepted

Solution code:
n = input()
a = map(int,raw_input().split())
s = 0
m = a[0]
M = a[0]
for i in range(0,n):
    s = s + a[i]
    if m > a[i]:
        m = a[i]
    if M < a[i]:
        M = a[i]
print m,M,s

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
n=int(input())
a=map(int,input().split())

min,max,sum=2**63-1,-2**63,0

for i in a:
    if i<min:
        min=i
    if max<i:
        max=i
    sum+=i

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	input()
	lis = [ int(i) for i in input().split()]
	print("%d %d %d"%(min(lis),max(lis),sum(lis)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

[num, values] = sys.stdin.readlines()
values = [int(x) for x in values.split()]

min_value = 999999999999
max_value = -999999999999
total_value = 0

for value in values:
    if value < min_value:
        min_value = value
    if max_value < value:
        max_value = value

    total_value += value

print("{0} {1} {2}".format(min_value, max_value, total_value))

Submission status: Accepted

Solution code:
x = input()
x = input()
x = x.split(" ")
x = [int(z) for z in x]
cmax = -1000000
cmin = 1000000
csum = 0
for z in x:
    if cmax < z:
        cmax = z
    if cmin > z:
        cmin = z
    csum += z
print("%d %d %d" % (cmin, cmax, csum))

Submission status: Accepted

Solution code:
n = int(raw_input())

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

Submission status: Accepted

Solution code:
i=input()
a=[x for x in map(int, input().split()) ]
a.sort()
print("{0} {1} {2}".format(a[0], a[-1], sum(a)))

Submission status: Accepted

Solution code:
import sys
import functools

def minmaxsum(*t):
    (x,y,z),e=t
    if x > e:
        x=e
    if y < e:
        y = e
    z += e
    return (x,y,z)

input()
m,x,s = functools.reduce(minmaxsum,map(int,input().split()),(1000000,-1000000,0\
))
print(m,x,s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    data_num = int(input())
    data = [int(x) for x in input().split(' ')]
    assert data_num == len(data), "invalid input"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
num = list(map(int,input().split()))
min = num[0]
max = num[0]
for i in range(x):
    if num[i]<min:
        min=num[i]
    if max<num[i]:
        max=num[i]
print(min,max,sum(num),sep=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
n = int(input())
a = list(map(int, input().split()))

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

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:
'''
ITP-1_4-D
 ????°????????????§??????????¨????
n????????´??° ai(i=1,2,...n)ai(i=1,2,...n)?????\?????????????????????????°????????????§??????????¨????????±???????????????°????????????????????????????????????
???Input
??????????????´??°?????° nn ???????????????????????????????????? nn ????????´??° aiai ????????????????????§?????????????????????
???Output
????°????????????§??????????¨????????????????????????§????????????????????????????????????
'''
# import
import sys

# ?????°??????????????????
n = int(input())
inputData = map(int, input().split())
maxData = -1000000
minData = 1000000
totalData = 0

for inputVal in inputData:

    # max value check
    if inputVal > maxData:
        maxData = inputVal

    # minimum value check
    if inputVal < minData:
        minData = inputVal

    # total value add
    totalData += inputVal

# ????????????
print(minData, maxData, totalData)

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:
listed = []
nmin = 0
nmax = 0
nsum = 0

n = int(input())
if n > 0 and n <= 10000:
    listed = list(map(int, input().split(maxsplit=n-1)))
    nmin = listed[0]
    nmax = listed[0]
    for i in listed:
        if i >= -1000000 and i <= 1000000:
            if nmin > i:
                nmin = i
            if nmax < i:
                nmax = i
            nsum += i
        else:
            pass
else:
    pass

print("{0} {1} {2}".format(nmin, nmax, nsum))

Submission status: Accepted

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

Submission status: Accepted

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

total = 0
for i in range(n):
    total += array[i] 
array.sort()

print(array[0], array[-1], total)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
data = input()
data = data.split()

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

sum = 0
for i in range(n):
    sum += data[i]
print(min(data), max(data), sum, sep = ' ')

Submission status: Accepted

Solution code:
count = int(input())
alist = [int(i) for i in input().split()]
minol = min(alist)
maxol = max(alist)
total = 0
for x in alist :
    total += x
print(minol,maxol,total)

Submission status: Accepted

Solution code:
#coding:utf-8

input()
data = [int(x) for x in input().split()]
print(str(min(data))+" "+str(max(data)) + " "+str(sum(data)))

Submission status: Accepted

Solution code:
import sys
 
l = [map(int,line.split()) for line in sys.stdin]
n = l[0]
l = l[1]
 
print "%s %s %s" %(min(l),max(l),sum(l))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def max(a):
	max = -10000000
	for i in a:
		if max < i:
			max = i
	return max

def min(a):
	min = 10000000
	for i in a:
		if min > i:
			min = i
	return min

def sum(a):
	sum = 0
	for i in a:
		sum += i
	return sum


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

Submission status: Accepted

Solution code:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    n = sys.stdin.readline()
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    # XXX: N????????´??°??????????????????????????????AOJ?????£???????????????
    n = sys.stdin.readline()
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()