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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = input().split()
amax = 0
amin = 1000001
asum = 0
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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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[my_value-1], my_value_list[0], sum(my_value_list)))

Submission status: Wrong Answer

Solution code:
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: Wrong Answer

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

Submission status: Wrong Answer

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

min = integer[0]
max = integer[0]
sum = 0

print(integer)
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: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
print (n)
a = [0] * n

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

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

Submission status: Wrong Answer

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

sorted_data = sorted(data)

minimum = sorted_data[0]
maximum = sorted_data[-1]

goukei = 0
for i in range(n):
	goukei += i

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

Submission status: Wrong Answer

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

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

minimum = 1000001
maximum = 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: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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.
            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(sum_var)
        # print(min_var)
        # print(max_var)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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.
            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(sum_var, min_var, max_var)
        # print(min_var)
        # print(max_var)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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.
            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 sum_var, min_var, max_var
        # print(min_var)
        # print(max_var)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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.
            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
        # print(min_var)
        # print(max_var)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#import fileinput
import math

def main():

    num = int(input())

    inputLine = input()
    array = list(map(int, inputLine.strip().split()))

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

    print('%d %d %d' % (mx, mn, sm))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = input()
num = input()
num_1 = num.split()
s = 0
cnt = 0
for i in range(len(num_1)):
    s += int(num_1[cnt])
    cnt += 1

print(min(num_1),max(num_1),s)

Submission status: Wrong Answer

Solution code:
a = input()
num = input()
num_1 = num.split()
s = 0
cnt = 0
for i in range(len(num_1)):
    s += int(num_1[cnt])
    cnt += 1

b = []
cnt = 0
for i in range(len(num_1)):
    b.append(num_1[cnt])
    cnt += 1

print(min(b),max(b),s)

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def bubble_sort(l):
    N = len(l)
    isChange = True
    while isChange:
        isChange = False
        for i in range(N-1):
            if(l[i] > l[i+1]):
                l[i], l[i+1] = l[i+1], l[i]
                isChange = True
    return l

N = int(input())
l = input().split()
L = bubble_sort(l)
sum = 0
for k in L:
    n = int(k)
    sum += n

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

Submission status: Wrong Answer

Solution code:
input()
a = list(map(int,input().split()))
a.reverse()
str = ""
for d in a:
    str += "%d "%(d)
print(str[:-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
length = int(input())
arr = input().split()

iniV = int(arr[0])

mi = iniV
mx = iniV
su = iniV
for s in arr:
    val = int(s)
    su += val
    if(val < mi):
        mi = val
    if(val > mx):
        mx = val

print(mi, mx, su)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
x = raw_input()
x = x.split(" ")
x = map(int,x)
x.sort()
x = map(str, x)
print " ".join(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
nums = input().split()
su = 0
ma = -1000000
mi = 1000000

for v in range(n):
    num = int(nums[v])
    if num > ma:
        ma = num
    elif num < mi:
        mi = num

    su += num

print(mi, ma, su)

Submission status: Wrong Answer

Solution code:
size = input()
list = list(map(int, input().split()))
list_min = min(list)
list_max = max(list)
list_sum = sum(list)

print(list_min)
print(list_max)
print(list_sum)

Submission status: Wrong Answer

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

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

print(list_min)
print(list_max)
print(list_sum)

Submission status: Wrong Answer

Solution code:

input()
s = 0
a = input()
a = a.split(" ")
for u in a:
    s=s+int(u)

print(min(a),max(a),s)

Submission status: Wrong Answer

Solution code:
input()
s = 0
a = input()
a = a.split(" ")
for u in a:
    s=s+int(s)

print(min(a),max(a),s)

Submission status: Wrong Answer

Solution code:
input()
s = 0
a = input()
b = a.split(" ")
c = map(int,b)
for u in c:
    s=s+u

print(min(b),max(b),s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

l=input().split()

b=min(l)
a=max(l)

result=0
while n>=1:
    result=result+int(l[n-1])
    n=n-1

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

Submission status: Wrong Answer

Solution code:


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: Wrong Answer

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

maxnum = 0
minnum = 10000
total = 0

for item in nums:
	if maxnum < item:
		maxnum = item
	elif minnum > item:
		minnum = item

for item in nums:
	total += item
	
print(str(minnum) + " " + str(maxnum) + " " + str(total))

Submission status: Wrong Answer

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

maxnum = -1000000
minnum = 1000000
total = 0

for item in nums:
	if maxnum < item:
		maxnum = item
	elif minnum > item:
		minnum = item

for item in nums:
	total += item
	
print(str(minnum) + " " + str(maxnum) + " " + str(total))

Submission status: Wrong Answer

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

maxnum = 0
minnum = 1000000
total = 0

for item in nums:
	if maxnum < item:
		maxnum = item
	elif minnum > item:
		minnum = item

for item in nums:
	total += item
	
print(str(minnum) + " " + str(maxnum) + " " + str(total))

Submission status: Wrong Answer

Solution code:
import sys
for line in sys.stdin:
    print(line)

Submission status: Wrong Answer

Solution code:
n = int(input())
ai = [int(x) for x in input().split()]
min = ai[0]
max = ai[0]
total = 0
for x in ai:
    total += x
    if x < min:
        min = x
    if x > max:
        max = x

Submission status: Wrong Answer

Solution code:
N = int(input())
num = input()
list = num.split()
print(list[1])
max = sum = min = int(list[0])
for x in range(N - 1):
    a = int(list[x + 1])
    if a > max: max = a
    elif a < min: min = a
    sum += a
print(min, max, sum)

Submission status: Wrong Answer

Solution code:

x = list(map(int,input().split()))
x.sort()
print('%s %s %s'%(max(x),min(x),sum(x)))

Submission status: Wrong Answer

Solution code:

x = list(map(int,input().split()))
x.sort()
print('%s %s %s'%(min(x),max(x),sum(x)))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
mini = 10000001
maxi = 0
sumi = 0
for i in range(n):
    if  a[i] < mini:
        mini = a[i]
    if a[i] > maxi:
        maxi = a[i]
    sumi += a[i]
print("{} {} {}".format(mini, maxi, sumi))

Submission status: Wrong Answer

Solution code:
n = int(input())
max = 0
min = 0
sum = 0
a=[int(x) for x in input().split()]
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: Wrong Answer

Solution code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d %d' % (min(a), max(a), sum(a)))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    n = int(input())
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# Min, Max and Sum

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

minimum = 1000000
maximum = 0
total = 0
for number in numbers:
    if number < minimum:
        minimum = number
    elif number > maximum:
        maximum = number
    total += number

print(minimum, maximum, total)

Submission status: Wrong Answer

Solution code:
# Min, Max and Sum

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

minimum = 1000000
maximum = -1000000
total = 0
for number in numbers:
    if number < minimum:
        minimum = number
    elif number > maximum:
        maximum = number
    total += number

print(minimum, maximum, total)

Submission status: Wrong Answer

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

int_a = []
for i in range(n):
    int_a.append(int(a[i]))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def solve(numbers):
    print('s')
    min, max, sum=numbers[0],numbers[0],0
    
    for number in numbers:
        if min > number:
            min = number
        if max < number:
            max = number
        sum+=number
    print('{0} {1} {2}'.format(min,max,sum))
        
    
def answer():
    case = int(input())

    
    numbers = list(map(int,input().split()))
    solve(numbers)


if __name__ =='__main__':
    answer()

Submission status: Time Limit Exceeded

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

for i in range(0, len(a)):
	for j in range(i+1, len(a)):
		if a[i] > a[j]:
			temp = a[i]
			a[i] = a[j]
			a[j] = temp

for i in range(0, len(a)):
	sm = sm + a[i]


print a[0], a[len(a)-1], sm

Submission status: Time Limit Exceeded

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

for i in range(0, len(a)):
	for j in range(i+1, len(a)):
		if a[i] > a[j]:
			temp = a[i]
			a[i] = a[j]
			a[j] = temp
	sm = sm + a[i]


print a[0], a[len(a)-1], sm

Submission status: Time Limit Exceeded

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

for i in xrange(0, len(a)):
	for j in xrange(i+1, len(a)):
		if a[i] > a[j]:
			temp = a[i]
			a[i] = a[j]
			a[j] = temp
	sm = sm + a[i]


print a[0], a[len(a)-1], sm

Submission status: Time Limit Exceeded

Solution code:
def bubble_sort(l):
    N = len(l)
    isChange = True
    while isChange:
        isChange = False
        for i in range(N-1):
            if(l[i] > l[i+1]):
                l[i], l[i+1] = l[i+1], l[i]
                isChange = True
    return l

N = int(input())
l = map(int, input().split())
l = list(l)
L = bubble_sort(l)
sum = 0
for k in L:
    sum += k

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

Submission status: Accepted

Solution code:
import sys


def main():
    sys.stdin.readline()
    list1 = [int(i) for i in sys.stdin.readline().split()]
    print(min(list1), max(list1), sum(list1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()
a = input().split()
c = a[0]
d = a[0]
for j in range(int(i)):
    if int(c) > int(a[j]):
        c = int(a[j])

                
for j in range(int(i)):
    if int(d) < int(a[j]):
        d = int(a[j])

e = sum(int(o) for o in a)

print('{0} {1} {2}'.format(int(c),int(d),int(e)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
n = int(n)
seq = input().split()
sumNum = 0
minNum = 1000000
maxNum = -1000000
for numT in seq:
 num = int(numT)
 if(num > maxNum):
  maxNum = num
 if(num < minNum):
  minNum = num
 sumNum+=num
print(minNum,maxNum,sumNum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coidng : utf-8
n = int(input())
a = map(int, input().split())
max = -1000000
min = 1000000
sum = 0
for num in a:
    if max <= num:
        max = num
    if min >= num:
        min = num
    sum += num
print (min, max, sum)

Submission status: Accepted

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

ans = []
ans.append(min(a))
ans.append(max(a))
ans.append(sum(a))

print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

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

count = 0
max = 0
sum = 0

for i in array:
    if count == 0:
        min = i
        max = i
        count += 1
    sum = sum + i
    if i < min:
        min = i
    if max < i:
        max = i

print(min, max, sum)

Submission status: Accepted

Solution code:
n = int(input())
nums = [int(i) for i in input().split(' ')]
nums_sorted = sorted(nums)
min = nums_sorted[0]
max = nums_sorted[n - 1]
print(min, max, sum(nums_sorted))

Submission status: Accepted

Solution code:
sum = 0
n = input()
num = sorted(list(map(int, input().split())))
for i in range(int(n)):
    sum += num[i]
print("{} {} {}".format(num[0], num[-1], sum))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

# TP1_4_D

import math
N=input()

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

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, *A = map(int, open(0).read().split())
print(min(A), max(A), sum(A))

Submission status: Accepted

Solution code:
_,*A=map(int,open(0).read().split());print(*[f(A)for f in[min, max, sum]])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int, input().split(" ")))
big_num = 1000000
max_num, min_num, sum = -1*big_num, big_num, 0
for i in lis:
    if i > max_num:
        max_num = i
    if i < min_num:
        min_num = i
    sum += i
print("%d %d %d" % (min_num, max_num, sum))

Submission status: Accepted

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

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

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

s = list(map(int, input().strip().split(' ')))

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

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

Submission status: Accepted

Solution code:
import sys,math,collections

def solve():
    n = int(input())
    L = list(map(int,input().split()))
    L.sort()
    print(L[0],L[-1],sum(L))
    
solve()

Submission status: Accepted

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

arr=x.split()

arrInt=list()
#print(arr, type(arr))
for i in arr:
   # print(i)
    arrInt.append(int(i))

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
sum=0
min=1000001
max=-1000001
table=list(map(int,input().split(" ")))
for i in table:
    sum+=i
    if max<i:
        max=i
    if min>i:
        min=i

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

Submission status: Accepted

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

table.sort()
print(table[0],table[-1],sum(table))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(data_min, data_max, data_sum)

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:
from sys import stdin

n = int(stdin.readline().rstrip())
ai = [int(x) for x in stdin.readline().rstrip().split()]
ai.sort()
print("%d %d %d" % (ai[0], ai[n-1], sum(ai)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
inData = [0] * num
inData = [int(i) for i in input().split()]
minVal = min(inData)
maxVal = max(inData)
sumVal = sum(inData)

print(minVal, maxVal, sumVal)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l = list(map(int, input().split()))
Max = l[0]
Min = l[0]
sum = 0
for i in range(0,n):
	sum += l[i]
	a = l[i]#変数の値が下の行の処理で変わってしまうのでaとかにしておく
	if a > Max:
		a,Max = Max,a
	if  a < Min:
		a,Min = Min,a
	
	
print(f"{Min} {Max} {sum}")

Submission status: Accepted

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

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

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

i = 0
while i < n:
    if a[i] > max:
        max = a[i]
    if a[i] < min:
        min = a[i]
    sum += a[i]
    i += 1
    
print (str(min) + " " + str(max) + " " + str(sum))

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

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 = input().split()
li = [int(i) for i in a]
s = min(li)
l = max(li)
p = sum(li)
print(s,l,p)

Submission status: Accepted

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

Submission status: Accepted

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

data.sort()

min = data[0]
max = data[-1]
avg = 0

for tmp in data:
	avg += tmp

print(min,max,avg)

Submission status: Accepted

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

min = data[0]
max = data[0]
avg = 0

for tmp in data:
	if tmp < min:
		min = tmp
	if tmp > max:
		max = tmp
	avg += tmp

print(min,max,avg)

Submission status: Accepted

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

data.sort()

min = data[0]
max = data[-1]
avg = 0

for tmp in data:
        avg += tmp

print(min,max,avg)

Submission status: Accepted

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

min = data[0]
max = data[0]
avg = 0

for tmp in data:
        avg += tmp
        if tmp < min:
        	min = tmp
        if tmp > max:
        	max = tmp

print(min,max,avg)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))  #1行に書かれた複数の値を整数にしてリストに格納
print(min(a), max(a), sum(a))

Submission status: Accepted

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

x = min(a)
y = max(a)
z = sum(a)
print(x,y,z)

Submission status: Accepted

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