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 |
为什么Output Limit Exceeded?(这段是1298的代码)#include <stdio.h> #include <string.h> int main() { char str[500],*p; fgets(str,500,stdin); while (strcmp(str,"ENDOFINPUT")) { if (str[strlen(str)-1]=='\n') str[strlen(str)-1]='\0'; if (!strcmp(str,"START")||!strcmp(str,"END")) ; else { for (p=str;*p;p++) { if (*p>='A'&&*p<='Z') putchar((*p-'A'+21)%26+'A'); else putchar(*p); } putchar('\n'); } fgets(str,500,stdin); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator