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 2004140022 at 2015-11-24 17:19:04 on Problem 2538
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<string.h>
#include<algorithm>
#define N 10001
using namespace std;
char chs[100]="1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
char s[N];
int main()
{
    int i,j;
    while(gets(s))
    {
        for(i=0;i<strlen(s);i++)
        {
            if(s[i]==' ')continue;
            for(j=0;j<strlen(chs);j++)
                if(s[i]==chs[j]) s[i]=chs[j-1];
        }
        puts(s);
    }
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