Start: Jul, 05, 2019 08:40:00
2019年度暑期短学期达标测试
End: Jul, 05, 2019 11:40:00
Time elapsed:
Time remaining:

Problem_ID: D
Result: Accepted
Time: 3ms
Memory: 1756kB
Author: CT12812081281
In contest: 1281

#include<iostream>
#include<algorithm>
#include<string.h>

using namespace std;

int main(){
    char s[200],*p;
    p=s;
    while(scanf("%s",s)!=EOF){
        p=s;
        while(*p){
            if(*p>='A'&&*p<'Z'){
                printf("%c",*p+33);
            } else if(*p=='Z'){
                printf("a");
            } else if(*p>='a'&&*p<='z'){
                if(*p<='c'){
                    printf("2");
                }else if(*p<='f'){
                    printf("3");
                }else if(*p<='i'){
                    printf("4");
                }else if(*p<='l'){
                    printf("5");
                }else if(*p<='o'){
                    printf("6");
                }else if(*p<='s'){
                    printf("7");
                }else if(*p<='v'){
                    printf("8");
                }else{
                    printf("9");
                }
            }else{
                printf("%c",*p);
            }
            p++;
        }
        printf("\n");
        memset(s,0,sizeof(s));
    }

    return 0;
}