December 23, 2018
The most number of occurrences
Threads: For an array of n integers. Find the number that appears most in the array. The number in the array is between 0 come 1000. n <= 100.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: A line of 2 numbers separated by spaces respectively and the need to find the number of occurrences of it. If there are multiple occurrences of the same most, print the smallest number is located in the array.
For example:
input: 4 4 3 3 2 output: 3 2
You are not logged in? Log in to Submit Now!
2 Comments
Add a Comment
You must be logged in to post a comment.
ad ơi có trang nào hướng dẫn mấy bài tập này ko nhỉ
in queue là sao v ad?