시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB81353847267.141%

문제

The Bloggs family keep getting invited to birthday parties, and they feel they must buy the person who invites them a present. The trouble is they do not have much money!

The family has come up with a strategy. Whenever they go to a shop to buy a present, they will not buy the cheapest present (that would seem mean!), so they buy the second cheapest gift they can find. Your task here is to help them quickly find the second least expensive gift in the shop.

입력

Input will consist of a single scenario which contains a list of prices from a shop, each on a separate line. The first line will contain N, the number of prices (2 <= N <= 100). No price will be duplicated. The next N lines will each contain a single price in the form of a decimal number with 2 places of decimals (ie dollars and cents).

출력

Output the second lowest price on a line by itself. It must be in the same format as with the input.

예제 입력 1

6
62.95
18.50
17.49
26.30
58.95
22.25

예제 출력 1

18.50

예제 입력 2

8
115.90
129.99
106.95
99.95
136.18
117.85
109.56
99.99

예제 출력 2

99.99

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2016 A번

  • 문제의 오타를 찾은 사람: sgchoi5