Run-Length Encoding
75 points · 0 solved
Read one line of lowercase letters (1–1000 characters). Print its run-length encoding: for each run of identical letters, the run length followed by the letter. Example: aaabcc → 3a1b2c.
Example 1 input
aaabcc
Expected output
3a1b2c
main.py
Ctrl+Enter runs · Ctrl+Shift+Enter submits