Problem
Input format
The first line contains `n`. The second line contains `n` integers separated by spaces. - `1 <= n <= 1000` - elements are integers in `[-10^9, 10^9]` - if there are several runs of maximum length, the length is unique
Output format
Print a single natural number: the length of the longest contiguous run of equal values, followed by a newline.
Example
7 1 1 2 2 2 3 3
3
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
7 1 1 2 2 2 3 3
3
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.