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 |
怎会wa?# include <stdio.h> # include <string.h> char seq[1001]; int main(){ int i,n,len; char pre; scanf("%d",&n); while(n--){ scanf("%s",seq); len=strlen(seq); pre=0; for(i=1;i<=len;i++){ if(seq[pre]!=seq[i]){ printf("%d%c",i-pre,seq[pre]); pre=i; } } putchar('\n'); } return 1; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator