Fashion Elements 3#8975

Fashion Elements 3

1 saniye
64 megabayt
Çok kolay

Given an array of integers, identify the elements that occur most frequently.

First, output the maximum frequency of any element in the array. Then, print the elements that occur with this maximum frequency, in the order of their first appearance in the input.

Giriş

The first line contains the integer (1 \leq N \leq 100), the number of elements in the array.

The second line contains integers, each with absolute value not exceeding .

Çıktı

On the first line, output the maximum frequency of any element in the array.

On the second line, output all elements that occur with this maximum frequency, in the order of their first appearance in the input.

Örnekler

Örnek 1

Loading
Loading