Problem Description

Given a string, compress it using run-length encoding: aaaabb -> a4b2. Print encoded string.

Input Format

One line string.

Output Format

One line encoded string.

Sample Test Case

Input:
aaabbc
Output:
a3b2c1

Constraints

Length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next