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

朴素做法~~

Posted by 222888 at 2011-11-29 20:46:35 on Problem 1298
#include<stdio.h>
#include<string.h>
main()
{
	char a[200];
	int i;
	while(gets(a))
	{
		if(strcmp(a,"START")==0);
		else if(strcmp(a,"END")==0);
		else if(strcmp(a,"ENDOFINPUT")==0)
			return 0;
		else
		{
			for(i=0;i<strlen(a);i++)
			{
				if('A'<=a[i]&&a[i]<='E')
					printf("%c",a[i]+'\25');
				else if('F'<=a[i]&&a[i]<='Z')
					printf("%c",a[i]-'\5');
				else
					printf("%c",a[i]);
			}
			printf("\n");
		}
	}
}



		

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