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?#include "stdio.h" #include "string.h" #include "ctype.h" int main() { int i, len; char kdc[30], text[200], result[200]; while (1) { gets(kdc); gets(text); len = strlen(text); for (i = 0; i < len; i++) { if ( islower(text[i]) ) { result[i] = kdc[text[i] - 'a']; } else if ( isupper(text[i]) ) result[i] = kdc[text[i] - 'A'] - 32; if (text[i] == ' ') result[i] = ' '; } result[i] = '\0'; printf("%s\n", result); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator