| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
1A!!!!#include<stdio.h>
#include<string.h>
int main()
{
int m,n,i,j,k,l;
while(~scanf("%d",&n))
{
while(n--)
{
char str[6666];
scanf("%s",str);
l=strlen(str);
for(i=0;i<l;i++)
{
int cnt=0;
for(j=i;j<l;j++)
{
if(str[i]!=str[j])
{
break;
}
else
cnt++;
}
printf("%d%c",cnt,str[i]);
i=j-1;
}
printf("\n");
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator