Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:谁能告诉我为什么Output Limit Exceeded?

Posted by tc142536789 at 2008-10-06 13:17:43 on Problem 2141
In Reply To:谁能告诉我为什么Output Limit Exceeded? Posted by:bootshl at 2008-05-22 20:42:58
> #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;
> }


while (1)
你来个while不多才怪

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator