几乎和2886没差别,犯得错也一模一样,唉~
用时:0ms
#include
#define MAX 101
//ok~
int main()
{
freopen("2478.txt","r",stdin);
freopen("output.txt","w",stdout);
int n,i,j,k,count;
char s[MAX],c;
scanf("%d/n",&n);
for(i=0;i
{
count=1;
gets(s);
c=s[0];
for(j=1;;j++)
{
if(c!=s[j])
{
if(count!=1)
printf("%d%c",count,c);
else
printf("%c",c);
if(s[j]=='/0')
break;
c=s[j];
count=1;
}
else
{
count++;
}
}
putchar('/n');
}
return 0;
}