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:
def print_max_min_sum(args):
    """
    args: a list of integer
    outputs a tuple

    >>> print_max_min_sum([10, 1, 5, 4, 17])
    1 17 37
    """
    print("{0} {1} {2}".format(min(args), max(args), sum(args)))


if __name__ == '__main__':
    cnt = int(input())
    nums = [int(i) for i in input().split(' ')]

    print_max_min_sum(nums[0:cnt])

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

wa = 0
minimum = suretsu[0]
maximum = suretsu[0]

for i in range(n):
    wa += suretsu[i]
    if suretsu[i] > maximum:
        maximum = suretsu[i]
    if suretsu[i] < minimum:
        minimum = suretsu[i]
    
print (minimum,maximum,wa)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()] 
a.sort()
m = a[0]
M = a[n-1]
s = sum(a)
print("{} {} {}".format(m,M,s))

Submission status: Accepted

Solution code:
n = int(input())
min = 2000000
max = -2000000

nums = list(map(int,input().split()))
sum = 0

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

print(min,max,sum)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kazu = int(raw_input())
arr = []
s = raw_input().rstrip().split(" ")
for i in xrange(kazu):
	arr.append(int(s[i]))
print min(arr),max(arr),sum(arr)

Submission status: Accepted

Solution code:
n = int(input())
i = 0
#list_n = [n]

map_n = map(int, input().split())
list_n = list(map_n)

min = min(list_n)
max = max(list_n)
sum = sum(list_n)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[]
for i in range(2):
    m=input().split()
    a.append(m)

list_1=[int(l) for l in a[0]]
list_2=[int(l) for l in a[1]]
total=0
largest=list_2[0]
smallest=list_2[0]


for x in range(list_1[0]):
    if largest<list_2[x]:
        largest=list_2[x]
    if smallest>list_2[x]:
        smallest=list_2[x]

for x in list_2:
    total+=x

print(smallest,largest,total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
summ = 0
for i in range(n):
    summ += a[i]
a.sort()
print(str(a[0])+" "+str(a[n-1])+" "+str(summ))

Submission status: Accepted

Solution code:
num = int(input())
inps = input().split()
num_list = [int(i) for i in inps]
smallest = num_list[0]
largest = num_list[0]
total = 0
for i in num_list:
    if i > largest:
        largest = i
    if i < smallest:
        smallest = i
    total += i
print("{} {} {}".format(smallest, largest, total))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

import sys
import os

input()
lst = list(map(int, input().split()))
minv = min(lst)
maxv = max(lst)
sumv = sum(lst)
print(minv, maxv, sumv)

Submission status: Accepted

Solution code:
# coding: utf-8

count = int(input())
num = input().rstrip().split(" ")

min,max = int(num[0]),int(num[0])
sum = 0

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

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

Submission status: Accepted

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

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

print('{} {} {}'.format(x,y,z))

Submission status: Accepted

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

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

print(mn,mx,sm)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = map(int, input().split())
a = list(a)
x = min(a)
y = max(a)
z = sum(a)

print(x, y, z)

Submission status: Accepted

Solution code:
n = int(input())

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

print(str(a[0]) + " " + str(a[-1]) + " " + str(sum(a)))

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:
n = int(input())
x = input().split()
nums = list(map(int,x))
print(min(nums), end = " ")
print(max(nums), end = " ")
print(sum(nums))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !

def func():
        try:
            nums = input()
            line = input().rstrip()
            numbers = line.split(" ")
            for i,item in enumerate(numbers):
                numbers[i]=int(item)
        except:
            print("input error")
            return -1
        
        print(str(min(numbers))+" "+str(max(numbers))+" "+str(sum(numbers)))
        

func()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    l = input().split()
    num = [int(i) for i in l]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
text = input()

textArray = text.split()
theArray = []

for i in textArray:
    theArray.append(int(i))

minimum = min(theArray)
maximum = max(theArray)
total = sum(theArray)

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

Submission status: Accepted

Solution code:
n = int(input())
a = input().split(' ')
num = [int(str) for str in a]
sum = 0
num.sort()
max = num[n-1]
min = num[0]
for i in num:
 sum += i
print("{0} {1} {2}".format(min,max,sum))

Submission status: Accepted

Solution code:
count = int(input())
num = [int(i) for i in input().split(" ")]
a = min(num)
b = max(num)
c = 0
for n in range(count):
    c += num[n]

print(a,b,c)

Submission status: Accepted

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

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('{0} {1} {2}'.format(min,max,sum))

Submission status: Accepted

Solution code:
# coding : utf-8
'''
????°????????????§??????????¨????
'''
a = int(input())
n1 = input().split()
n1 = [int(i) for i in n1]
print(min(n1), max(n1), sum(n1))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

nums = list(map(int, input().split(' ')))
nums = sorted(nums)

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

Submission status: Accepted

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

min = 1000000
max = -1000000
sum = 0

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

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

Submission status: Accepted

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

M = max(L)
m = min(L)
S = sum(L)
print(str(m) + " " + str(M) + " " + str(S))

Submission status: Accepted

Solution code:
n = input()
xs = list(map(int,input().split()))
print(' '.join(map(str,[f(xs) for f in [min,max,sum]])))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a_min,a_max,a_sum)

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 ]< min:
        min = a[i];
    if a[i] > max:
        max = a[i];
    sum += a[i];
print(min, max, sum)

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]< min:
        min = a[i];
    if a[i] > max:
        max = a[i];
    sum += a[i];
print(min, max, sum)

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] < min:
        min = a[i];
    if a[i] > max:
        max = a[i];
    sum += a[i];
print(min, max, sum)

Submission status: Accepted

Solution code:
N = int(input())
a = input().split()
min = 1000000
max = -1000000
kei = 0
for i in a:
    i = int(i)
    if i < min:
        min = i
    if i > max:
        max = i
    kei += i
print(min, max, kei)

Submission status: Accepted

Solution code:
n = int(input())
s = input().split(" ")
nums = list(map(int, s))
mi = 1000000
ma = -1000000
su = 0
for i in range(n):
    if nums[i] < mi:
        mi = nums[i]
    if nums[i] > ma:
        ma = nums[i]
    su += nums[i]
print(mi,ma,su)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

n = int(input().rstrip())
kazu =[int(i) for i in input().split(" ")]

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

Submission status: Accepted

Solution code:
n = int(input())
n_list = [int(i) for i in input().split(" ")]
mini = min(n_list)
maxi = max(n_list)
total = sum(n_list)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
min = float('inf')
max = float('-inf')
sum = 0
for x in a:
    if x < min:
        min = x
    if x > max:
        max = x
    sum += x

print(min, max, sum)

Submission status: Accepted

Solution code:
g=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()))
min_a = 1000000
max_a = -1000000
sum_a = 0
for i in range(n):
    if min_a > a[i]:
        min_a = a[i]
    
    if max_a < a[i]:
        max_a = a[i]

    sum_a += a[i]

print(min_a, max_a, sum_a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input().strip())
a = list(map(lambda x: int(x), input().strip().split()))
min = 1000000
max = -1000000
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("{0} {1} {2}".format(min, max, sum))

Submission status: Accepted

Solution code:
#!/usr/bin/python

n = int(input())
ar = (int(i) for i in input().split())
ar = sorted(ar)

print(str(ar[0]) + " " + str(ar[-1]) + " " + str(sum(ar)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t=0
a=[]

n=int(input())
s = input().rstrip().split(" ")

for i in range(n):
    a.append(int(s[i]))
    
a.sort()

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

Submission status: Accepted

Solution code:
j = int(input())
numlist = list(int(i) for i in input().split())

minn = min(numlist)
maxn = max(numlist)
sumn = sum(numlist)

print(minn,end=' ')
print(maxn,end=' ')
print(sumn)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = [int(x) for x in input().strip().split(' ')]
print(min(a), max(a), sum(a))

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:
s=int(input())
x=[int(i) for i in input().split()]
print("{0} {1} {2}".format(min(x),max(x),sum(x)))

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()
data = [int(s) for s in input().split(' ')]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(min(nums),max(nums),sum(nums))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(min(int_list), max(int_list), sum(int_list))

Submission status: Accepted

Solution code:
n = int(input())
memo = list(map(int,input().split()))
s = 0
for i in range(n):
    s += memo[i]
memo.sort()
print(str(memo[0]) + " " + str(memo[n-1]) + " " + str(s))

Submission status: Accepted

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

Submission status: Accepted

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

print ("{} {} {}".format(int_list[0],int_list[-1],sum(int_list)))

Submission status: Accepted

Solution code:
n = map(int, raw_input())
x = map(int, raw_input().split())
print('%s %s %s' % (min(x), max(x), sum(x)))

Submission status: Accepted

Solution code:
n = int(input())
s = input().rstrip().split(" ")
min = 1000000
max = -1000000
sum = 0
for i in s:
    x = int(i)
    if x < min:
        min = x
    if x > max:
        max = x
    sum += x
print("%d %d %d" % (min,max,sum))

Submission status: Accepted

Solution code:
num = input()
numbers = list(map(int, input().split()))
mi = str(min(numbers))
ma = str(max(numbers))
total = str(sum(numbers))
print(mi + ' ' + ma + ' ' + total)

Submission status: Accepted

Solution code:
n = 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())
a = [int(i) for i in input().split()]
max_a = max(a)
min_a = min(a)
sum_a = sum(a)
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=int(input())
a=list(map(int,input().split()))
mi=min(a)
ma=max(a)
s=sum(a)
print(mi,ma,s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

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

ansMax = max(lst)
ansMin = min(lst)
ansSum = sum(lst)

print(ansMin,ansMax,ansSum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_4_D: Min, Max and Sum
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

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

Submission status: Accepted

Solution code:
s = int(input())

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

print(min(dataset),max(dataset),sum(dataset))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

mini = a[0]
maxi = a[0]
sum = 0
for x in a:
    sum += x
    if x < mini:
        mini = x
    if maxi < x:
        maxi = x

print('{} {} {}'.format(mini, maxi, sum))

Submission status: Accepted

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

max = -1000000
min = 1000000
sum = 0

for num in nums:
    sum += num
    if num > max:
        max = num
    if num < min:
        min = num
print("{0} {1} {2}".format(min, max, sum))

Submission status: Accepted

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

print(min, max, sum)

Submission status: Accepted

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

M = max(x)
m = min(x)
s = sum(x)

print("{0} {1} {2}".format(m,M,s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
w = int(a[n - 1])
amax = w
amin = w
asum = w
n -= 1
while n - 1 >= 0:
    w = int(a[n - 1])
    if w > amax:
        amax = w
    if w < amin:
        amin = w
    asum += w
    n -= 1

print(str(amin) + ' ' + str(amax) + ' ' + str(asum))

Submission status: Accepted

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

Submission status: Accepted

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

my_sum = 0
for i in range(n):
    my_sum += s[i]

print(min(s),max(s),my_sum)

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:
gokei=0
m=0
N=int(input())


a_i=list(map(int,input().split())) #N回まで要素をいれると次にいくようにしたい。

for i in range(N):  
  gokei=gokei+a_i[m]
  m=m+1               #gokei=sum(a_i)でも
#合計値 list[0]+list[1]+...+list[N]  #Nは定数

#最小値、最大値の比較→それぞれソート
saidai=max(a_i)
saitei=min(a_i)
print(saitei,saidai,gokei)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = list(map(int,input().split()))
max = a[0]
min = a[0]


for i in a:
    if(i > max):
        max = i
    if(i < min):
        min = i

print(min,max,sum(a))

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

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

Submission status: Accepted

Solution code:
first = int(input())

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

print(min(inputs), max(inputs), sum(inputs))

Submission status: Accepted

Solution code:
numbers=[]
count_of_numbers=int(input())
numbers=input().split()
for i in range(0,len(numbers)):
    numbers[i]=int(numbers[i])
print(min(numbers),max(numbers),sum(numbers))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# my_value_list = []
#
# while True:
#     try:
#         my_value_list.append(input().split())
#     except EOFError:
#         break
#
# for i in range(0, len(my_value_list)):
#     if my_value_list[i][1] == "+":
#         print(int(my_value_list[i][0]) + int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "-":
#         print(int(my_value_list[i][0]) - int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "/":
#         print(int(my_value_list[i][0]) // int(my_value_list[i][2]))
#     elif my_value_list[i][1] == "*":
#         print(int(my_value_list[i][0]) * int(my_value_list[i][2]))
#     else:
#         break

my_value = int(input())
my_value_list_str = input().split()

my_value_list = [int(i) for i in my_value_list_str]
my_value_list.sort()

print("{} {} {}".format(my_value_list[0], my_value_list[my_value-1], sum(my_value_list)))

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())
a = input().split()
for i in range(n):
 a[i] = int(a[i])

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

Submission status: Accepted

Solution code:
n = int(input())
input_numbers = input().split()

numbers = []

for number in input_numbers:
    numbers.append(int(number))

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

print(min_num, max_num, sum_num)

Submission status: Accepted

Solution code:
# (c) midandfeed
int(input())
q = [int(x) for x in input().split()]

print(min(q), max(q), sum(q))

Submission status: Accepted

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

print (min(array), max(array), sum(array))

Submission status: Accepted

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

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
mi = a[0]
mx = a[-1]
sm = sum(a)
print('%d %d %d' % (mi, mx, sm))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(raw_input())
array = [int(i) for i in raw_input().split()]

mini, maxi, total = [array[0]] * 3

for i in array[1:]:
    if i < mini:
        mini = i
    if i > maxi:
        maxi = i
    total += i

print mini, maxi, total

Submission status: Accepted

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

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

print(mn,mx,sm)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = raw_input()
x = map(int, raw_input().split())
print('%s %s %s' % (min(x), max(x), sum(x)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
i = 0

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

mx = max(x)
mn = min(x)
sum = 0

while i < n:
    sum = sum + x[i]
    i += 1
    
print(mn, mx, sum)

Submission status: Accepted

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

min = integer[0]
max = integer[0]
sum = 0
for i in integer:
    if max<i:
        max = i
    if i < min:
        min = i
    sum += i

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()
    a_min = a[0]
    a_max = a[-1]

    total = 0
    for num in a:
        total += num
    
    print(a_min, a_max, total)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(raw_input())
data = map(int, raw_input().split(" "))

#data = [10, 1, 5, 4, 17]

minimum = data[0]
maximum = data[0]
goukei = 0

for i in data:
	if i < minimum:
		minimum = i

	if i > maximum:
		maximum = i

	goukei += i

print("{:} {:} {:}".format(minimum, maximum, goukei))

Submission status: Accepted

Solution code:
n=int(input())
num=[int(i) for i in input().split()]
# num=[1,2,3,4,6]
M=max(num)
m=min(num)
s=sum(num)
print("{0} {1} {2}".format(m,M,s))

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())
l=list(map(int,input().split()))
print('%d %d %d'%(min(l), max(l), sum(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()
n = int(line)

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

if len(nums) != n:
    quit()

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

Submission status: Accepted

Solution code:
import sys

def main():
    lines = sys.stdin.readlines()

    n_max = 0
    sum_var = 0
    min_var = 0
    max_var = 0
    for index, line in enumerate(lines):
        if index == 0:
            line = line.strip('\n')
            n_max = int(line)
            # print(n_max)
        elif index == 1:
            line = line.strip('\n')
            elems = line.split(" ")
            min_var = int(elems[0]) # put a value of first elem as minimum num.
            max_var = int(elems[0])
            for elem in elems:
                elem = int(elem)
                if elem < min_var:
                    min_var = elem
                if elem > max_var:
                    max_var = elem
                sum_var += elem

    print min_var, max_var, sum_var

if __name__ == "__main__":
    main()