#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.
Sword Pointer Offer Adapted Questions