PersonalCorpus 版 (精华区)
1023321 Big Guava ... 444 Accepted 0:00.010 64
2002/08/15 19:27:44.037
void main()
{
char s[300];
char t[300],m[4];
int i,j,k;
while (gets(s)!=NULL)
if (isalpha(s[0])) {
i=0;
for (j=0;j<strlen(s);j++) {
sprintf(m,"%d",s[j]);
strcpy(t+i,m);
i+=strlen(m);
}
for (j=i-1;j>=0;j--)
printf("%c",t[j]);
printf("\n");
} else {
i=strlen(s); k=0;
for (j=i-1;j>=0;j--) {
k*=10; k+=s[j]-48;
if (((k>=65)&&(k<=90))||((k>=97)&&(k<=122))||(k==32)
||(k==33)||(k==44)||(k==46)||(k==58)||(k==59)||(k==63)) {
printf("%c",k); k=0;
}
}
printf("\n");
}
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.929毫秒