Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
A string can be compressed into a new string by compressing consecutive identical characters.
For example, the string ~aaaa~ would be compressed to ~4a~.
Write a program to compress a string of letters in this way.
Input
- A string of lowercase letters with a maximum length of ~10^5~ characters.
Output
- The compressed string.
Sample Input
mmaabbbeeeezh
Sample Output
2m2a3b4ezh
Bình luận