Number of elements equal to the maximum
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The sequence is composed of natural numbers and concludes with the number 0. There are no more than 10,000 numbers provided (not counting the terminating 0). Your task is to find out how many elements in this sequence are equal to the largest element. Numbers that appear after the 0 should not be considered.
Input
A sequence of natural numbers that ends with the number 0.
Output
Print the count of elements in the sequence that are equal to its largest element.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 53%