CT1638

The Silent inscriptions of Jarl

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The auditor Jarl has been asked to balance the workshop's books. On the desk lies a long table of inscriptions readings. 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| <= 138; s contains lowercase English letters.

Example 1:

Input: caaaaabbbbbcccbcccccaabcb
Output: 5

Example 2:

Input: aaaaaccbbbbbbbbaaaabbbaaaaaaaacccaaaaaaaaabbbbbaacccccc
Output: 9

Example 3:

Input: aaaabbbaaaacccaaaacccaaac
Output: 4

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Silent inscriptions of Jarl - EASY Coding Problem | CodeTikki