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

为什么Output Limit Exceeded?(这段是1298的代码)

Posted by nullptr at 2017-02-01 15:11:05 on Problem 3749
#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:
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