#T647. OJ题目AC率

OJ题目AC率

Description

"x problems, x problems, x+1 problems, x problems, x+2 problems, x problems..." The administrator of the CodesOnline club stared blankly at the AC submission table.

Why have so many members solved exactly X problems? Have half of the members solved x problems?

Given the number of members and the count of problems each member has solved, can we determine if more than half of the members have solved the same number of problems?

Input Format

The input consists of multiple test cases.

Each test case contains two lines.

The first line includes a positive integer n (≤ 10000), representing the number of members.

The second line contains n positive integers (≤ 10000), representing the number of problems each member has solved.

Output Format

For each test case, if more than half of the members have solved the same number of problems, output that number; otherwise, output 0.

```input1 7 14 36 14 14 14 3 8 10 56 56 56 56 3 35 35 8 77 56 ``` ```output1 14 0 ``` ## Translation

Sword Pointer Offer Adapted Questions