← 返回 coinbase 的题目列表Longest Uniform Character Substring & Length
类型:online_judge
coinbase
Given a string s, find the longest contiguous substring consisting of the same character and return that character along with the length of this substring.
Input
A string s consisting of only lowercase letters.
Output
A string representing the character and the length of its longest contiguous occurrence in the format 'character-length'.
Example
Input: "abbcccddddeeeeee" Output: 'e-6'
Constraints
The length of the string does not exceed 10^5.
Example
Input
abbcccddddeeeeee