Type: Default 1000ms 256MiB

求整数的和与均值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

【题目描述】

读入n(1≤n≤10000)个整数,求它们的和与均值。

【输入】

输入第一行是一个整数n,表示有n个整数。

第2~n+1行每行包含1个整数。每个整数的绝对值均不超过10000。

【输出】

输出一行,先输出和,再输出平均值(保留到小数点后5位),两个数间用单个空格分隔。

【输入样例】

4
344
222
343
222

【输出样例】

1131 282.75000

【来源】

一本通在线评测

B班第四天测试

Not Attended
Status
Done
Rule
Ledo
Problem
13
Start at
2025-7-24 19:00
End at
2025-7-24 21:00
Duration
2 hour(s)
Host
Partic.
7