No.394 Halfpipe (1)
タグ : / 解いたユーザー数 652
作問者 :
koyumeishi
/ テスター :
りあん
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もしくは右上の雲マークをクリックしてアカウントを作成してください。