問題一覧 > 通常問題

No.394 Halfpipe (1)

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 128 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 652
作問者 : koyumeishi / テスター : りあん
お気に入りにしたユーザー ProblemId : 818 / 自分の提出
問題文最終更新日: 2026-06-26 06:08:01
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 142 (順位表) の他の問題:

Problem Statement

One of the snowboarding competitions is an event called the halfpipe.
In the halfpipe, each of 6 judges scores a competitor's run out of 100 points, and one lowest score and one highest score are removed; the average of the remaining 4 judges' scores is the score for that run. (Note: there may be competitions that do not use this scoring method. Reference)

For example, if the scores of the 6 judges are {10, 20, 30, 40, 50, 60}, the lowest score 10 and the highest score 60 are removed, and the average of {20, 30, 40, 50} (=35.00) is the score.
Even if there are multiple identical lowest (highest) scores, only one judge's score is removed as the lowest (highest) score.
Example) {50,50,60,70,70,70} -> {50,60,70,70}
Example) {51,51,51,51,51,51} -> {51,51,51,51}

Given the scores $S_1 \dots S_6$ of the 6 judges as input, output the score under the scoring method above, exactly to the second decimal place.

Input

$S_1$ $S_2$ $S_3$ $S_4$ $S_5$ $S_6$

The scores $S_i$ of the 6 judges are given, separated by spaces.
$S_i$ is an integer between 0 and 100, inclusive.

Output

Output the score exactly to the second decimal place.

Sample

Sample 1
Input
10 20 30 40 50 60
Output
35.00

10 and 60 are removed. Output the score exactly to the second decimal place.

Sample 2
Input
20 20 30 40 50 50
Output
35.00

{20, 20, 30, 40, 50, 50}

Sample 3
Input
100 100 100 100 100 99
Output
100.00

{100, 100, 100, 100, 100, 99}

Sample 4
Input
0 89 15 74 29 33
Output
37.75

{0, 89, 15, 74, 29, 33}

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。