Write a programElementary20 XPExercise 14/15
The most frequent element
Task
The program reads one line of whole numbers separated by spaces and prints the number that occurs most often, and below it how many times. If several numbers tie, it prints the smallest of them.
Examples
Input
1 3 2 3 1 3
Expected output
3 3
Input
5 1 5 1
Expected output
1 2
After you submit, 3 hidden tests will also check your solution: one number, negative numbers, all different.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.