Problem Description

Read a string s (no spaces), compress it as char + count for each consecutive run. Example aaabb becomes a3b2. Output compressed string.

Input Format

One string s.

Output Format

Compressed string.

Sample Test Case

Input:
aaabbc
Output:
a3b2c1

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next