求平均年龄

Luogu
IDLGB2054
Time1000ms
Memory128MB
DifficultyP1
Special Judge循环结构
班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄。 ## Input 第一行有一个整数 $n$($1 \le n \le 100$),表示学生的人数。其后 $n$ 行每行有 $1$ 个整数,表示每个学生的年龄,取值为 $15$ 到 $25$。 ## Output 输出一行,该行包含一个浮点数,为要求的平均年龄。如果你的答案和标准答案的差的绝对值不超过 $0.01$,则判定为正确。 [samples]
Samples
Input #1
2
18
17
Output #1
17.50
API Response (JSON)
{
  "problem": {
    "name": "求平均年龄",
    "description": {
      "content": "班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄。",
      "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": "LGB2054"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄。\n\n## Input\n\n第一行有一个整数 $n$($1 \\le n \\le 100$),表示学生的人数。其后 $n$ 行每行有 $1$ 个整数,表示每个学生的年龄,取值为 $15$ 到 $25$。\n\n## Output\n\n输出一行,该行包含一个浮点数,为要求的平均年龄。如果你的答案和标准答案的差的绝对值不超过 $0.01$,则...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments