T5. Only two different
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In a single line, you are given at least 3 integers, separated by spaces. If there are exactly two distinct numbers among them, output the number that appears more frequently. If both numbers appear with the same frequency, output the smaller one. If neither condition is met, output "NO".
The total number of integers will not exceed 30.
Each integer is within the range [-10^18
, 10^18
].
Input file format:
A single line containing the integers separated by spaces.
Output file format:
A single line containing the solution to the problem.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Input #4
Answer #4
Submissions 269
Acceptance rate 39%