#include<bits/stdc++.h>
using namespace std;
int main()
{
string input;
cin >> input;
string output;
int len = input.size();
char temp = input[0];
int count = 1;
for(int i = 1; i <= len; i++)
{
// 如果后面的字符与前面的一样
if(input[i] == temp)
{
count++;
}
else
{
output+=temp;
output+=to_string(count);
temp=input[i];
count = 1;
}
}
cout << output;
}
0 回复
0 转发
0 喜欢
6 阅读



