Problem
Input format
The program reads from standard input a single line containing the string `s`. - the string has between `1` and `255` characters - the string contains only lowercase letters `a`-`z` - if there are several runs of maximum length, print the first one
Output format
The program prints to standard output the character and the length of the longest run of consecutive identical characters, separated by a space, followed by a newline.
Example
aaabbccccdd
c 4
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
aaabbccccdd
c 4
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.