CT387

The Indigo labels of Finn

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Deep in the mulberry rows of Silkmead, Finn studies rows of labels entries. One clean number will settle the guild's oldest argument. Task: Print the length of the longest run of the same character. Input format: One line with a single lowercase string s. Output format: Print the maximum run length. Constraints: 1 <= |s| <= 141; s contains lowercase English letters.

Example 1:

Input: bbbbaabbbb
Output: 4

Example 2:

Input: caaaaaacccccccccbaaaa
Output: 9

Example 3:

Input: abbbbbbbaaaaacccaaaaabbbbbbaaaaabbbbccccbccccaaabcccccabb
Output: 7

Constraints:

1 <= |s| <= 141; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.