安徽科技学院程序设计在线考试系统Ver2.3

诚信考试,杜绝作弊!

问题 E: Computation - Min, Max and Sum

内存限制:512 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较

题目描述

Min, Max and Sum 

Write a program which reads a sequence of n integers ai(i=1,2,...n), and prints the minimum value, maximum value and sum of the sequence.

输入格式

In the first line, an integer n is given. In the next line, n integers ai are given in a line.

输出格式

Print the minimum value, maximum value and sum in a line. Put a single space between the values.

输入样例 复制

5
10 1 5 4 17

输出样例 复制

1 17 37

数据范围与提示

0<n<=10000

-1000000<=ai<=1000000