#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int ncase,len,i,j;
char str[1010];
cin>>ncase;
while(ncase--)
{
cin>>str;
len=strlen(str);
j=1;
for(i=1;i<=len;i++)
{
if(str[i]==str[i-1])j++;
if(str[i]!=str[i-1])
{
cout<<j<<str[i-1];
j=1;
}
}
if(ncase)cout<<endl;
}
return 0;
}
05-06
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交