// No.394 ハーフパイプ(1) // https://yukicoder.me/problems/no/394 // #include #include #include #include #include using namespace std; double solve(vector &scores); int main() { const int NUM_OF_JUDGE = 6; vector scores(NUM_OF_JUDGE); for (auto i = 0; i < NUM_OF_JUDGE; i++) { cin >> scores[i]; } double ans = solve(scores); cout << setprecision(2) << fixed << ans << endl; } double solve(vector &scores) { sort(scores.begin(), scores.end()); double total = accumulate(scores.begin()+1, scores.end()-1, 0.0); return total / (scores.size() - 2.0); }