求整数的和与均值

Luogu
IDLGB2056
Time1000ms
Memory128MB
DifficultyP1
循环结构
读入 $n(1 \le n \le 10000)$ 个整数,求它们的和与均值。 ## Input 输入第一行是一个整数 $n$,表示有 $n$ 个整数。 第 $2 \sim n+1$ 行每行包含 $1$ 个整数。每个整数的绝对值均不超过 $10000$。 ## Output 输出一行,先输出和,再输出平均值(保留到小数点后 $5$ 位),两个数间用单个空格分隔。 [samples]
Samples
Input #1
4
344
222
343
222
Output #1
1131 282.75000
API Response (JSON)
{
  "problem": {
    "name": "求整数的和与均值",
    "description": {
      "content": "读入 $n(1 \\le n \\le 10000)$ 个整数,求它们的和与均值。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2056"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "读入 $n(1 \\le n \\le 10000)$ 个整数,求它们的和与均值。\n\n## Input\n\n输入第一行是一个整数 $n$,表示有 $n$ 个整数。\n\n第 $2 \\sim n+1$ 行每行包含 $1$ 个整数。每个整数的绝对值均不超过 $10000$。\n\n## Output\n\n输出一行,先输出和,再输出平均值(保留到小数点后 $5$ 位),两个数间用单个空格分隔。\n\n[samples]...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments