2010 - 2020GEC1506 - Loop If Scoreboard

Time

2020/04/28 23:31:00 2020/05/05 12:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12757 All Top 1

12757 - All Top 1   

Description

Given a two lines of text, you need to parse it and perform the following requirements.

In this test, you need to find the top frequent element.

If there are some elements have same frequency, please order them according to the order of occurrence.

Input

Two lines of text will be given as an input.

The format for each line of the text are:

 

0,1,3,5,1,5,3,7,8,7,9,0,2,5,4

,

The first line is the input text, and the second line is a delimiter. (We may change the delimiter )

Hint: Not all elements are numbers.

Output

The format for output text is:

5

 

Print top frequent elements from the input text.

If there are many elements have the same frequency, please order them according to their appearance order.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss