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 Ultramanhu at 2008-11-14 22:49:58 on Problem 1298
In Reply To:测试过没错,为这么会RE了呢。。。。大家帮下忙~ Posted by:lambda2fei at 2008-08-27 09:55:56
#include<stdio.h>
#include<string.h>
char c[250],a;
int i;
int main()
{
   scanf("%s",c);
   scanf("%c",&a);
   while(strcmp(c,"ENDOFINPUT")!=0)
   {
	if((strcmp(c,"START")!=0)&&(strcmp(c,"END")!=0))
	{
	  for(i=0;i<strlen(c);i++)
	  {
	     if((c[i]>=70)&&(c[i]<=90))
	     {
	       putchar(c[i]-5);
	     }
	     else
	     {   if((c[i]>=65)&&(c[i]<=69))
		 {putchar(c[i]+21);}
		 else
		 {putchar(c[i]);}
	     }
	  }
	  if(a=='\n')
	  {
	    putchar(10);
	    putchar(13);
	  }
	  else
	  {
	      putchar(a);
	  }
	}
	scanf("%s",c);
	scanf("%c",&a);
   }
   return 0;
}

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