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 201501060326 at 2016-02-29 20:29:32 on Problem 3749
#include <stdio.h>
#include <string.h>
char s[50],t[50];
char st[1000];
char find(char c)
{
    if(c>='A'&&c<='Z')
    {
        c-=5;
        if(c<'A')
        {
            c+=26;
        }
    }
    return c;
}
int main()
{
    int i;
    while(gets(s)!=NULL)
    {
        if(s[0]=='E'&&s[1]=='N'&&s[2]=='D'&&s[3]=='O'&&s[4]=='F'&&s[5]=='I'&&s[6]=='N'&&s[7]=='P'&&s[8]=='U'&&s[9]=='T')
        {
            break;
        }
        else
        {
            gets(st);
            for(i=0; i<strlen(st); i++)
            {
                st[i]=find(st[i]);
            }
            gets(t);
            puts(st);
        }
    }
    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