A ribbon maker stores each run of matching lowercase beads as its letter followed by the run length. Task: Run-length encode the lowercase token, including counts of one. Input format: One nonempty lowercase English word s. Output format: Print each consecutive run as its character followed by the run length. Constraints: 1 <= length(s) <= 100000
Example 1:
Example 2:
Example 3:
Constraints:
1 <= length(s) <= 100000
Tags:
