| ||||||||||
| 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 | |||||||||
Re:runtime error???In Reply To:runtime error??? Posted by:highspeed at 2009-10-31 20:50:49 > #include<stdio.h>
> int main()
> {
> int i,n,m,k=1;
> char a[100];
> scanf("%d",&n);
> for(i=1;i<=n;i++)
> {
> scanf("%s",a);
> m=0;
> while(a[m]!=NULL)
> {
>
> if(a[m+1]==a[m])
> k++;
> else {printf("%d%c",k,a[m]);k=1;}
> m++;
> }
> printf("\n");
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator