408627: GYM103241 B Average

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Averagetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Elijah has taken some tests and he didn't do as well as he liked. So he decided to use his coding skills to hack into the grading system. The problem is, to be lowkey about it, he only will delete one test score.

What is the maximum average score he can get after deleting one test score (rounded down to the nearest tenth, i.e. $$$3.46$$$ would be rounded down to $$$3.4$$$).

Input

The first line contains $$$N$$$ $$$(2 \leq N \leq 1000)$$$, $$$N$$$ being the number of test scores.

The next line contains $$$N$$$ integers $$$a_1, a_2, \cdots, a_n$$$ where $$$a_i$$$ represents the test score Elijah got on test $$$i$$$ $$$(0 \leq a_i \leq 100)$$$.

Output

Please output the maximum possible average, rounded down to the nearest tenth, of the remaining test scores given that he can remove one test.

*Note, if the answer rounds to an integer please output the tenth place, for example, if the average was $$$5$$$ output $$$5.0$$$.

ExampleInput
6
8 2 3 9 10 3
Output
6.6
Note

Problem idea: Bossologist

Problem preparation: Bossologist

Occurances: Novice 2

加入题单

算法标签: