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: 1120kB
Author: CT12812791281
In contest: 1281

#include<stdio.h>
#include<string.h>
int main(){
int n=0,a,i,b;
char l[101];
while(scanf("%s",l)!=EOF){
n=strlen(l);
for(i=0;i<n;i++){
	if(l[i]=='a'||l[i]=='b'||l[i]=='c')
		printf("2");
	else if(l[i]=='0'||l[i]=='1'||l[i]=='2'||l[i]=='3'||l[i]=='4'||l[i]=='5'||l[i]=='6'||l[i]=='7'||l[i]=='8'||l[i]=='9')
		printf("%c",l[i]);
	else if(l[i]=='d'||l[i]=='e'||l[i]=='f')
		printf("3");
	else if(l[i]=='g'||l[i]=='h'||l[i]=='i')
		printf("4");
	else if(l[i]=='j'||l[i]=='k'||l[i]=='l')
		printf("5");
	else if(l[i]=='m'||l[i]=='n'||l[i]=='o')
		printf("6");
	else if(l[i]=='p'||l[i]=='q'||l[i]=='r'||l[i]=='s')
		printf("7");
	else if(l[i]=='t'||l[i]=='u'||l[i]=='v')
		printf("8");
	else if(l[i]=='w'||l[i]=='x'||l[i]=='y'||l[i]=='z')
		printf("9");
	else if(l[i]=='A')
		printf("b");
	else if(l[i]=='B')
		printf("c");
	else if(l[i]=='C')
		printf("d");
	else if(l[i]=='D')
		printf("e");
	else if(l[i]=='E')
		printf("f");
	else if(l[i]=='F')
		printf("g");
	else if(l[i]=='G')
		printf("h");
	else if(l[i]=='H')
		printf("i");
	else if(l[i]=='I')
		printf("j");
	else if(l[i]=='J')
		printf("k");
	else if(l[i]=='K')
		printf("l");
	else if(l[i]=='L')
		printf("m");
	else if(l[i]=='M')
		printf("n");
	else if(l[i]=='N')
		printf("o");
	else if(l[i]=='O')
		printf("p");
	else if(l[i]=='P')
		printf("q");
	else if(l[i]=='Q')
		printf("r");
	else if(l[i]=='R')
		printf("s");
	else if(l[i]=='S')
		printf("t");
	else if(l[i]=='T')
		printf("u");
	else if(l[i]=='U')
		printf("v");
	else if(l[i]=='V')
		printf("w");
	else if(l[i]=='W')
		printf("x");
	else if(l[i]=='X')
		printf("y");
	else if(l[i]=='Y')
		printf("z");
	else if(l[i]=='Z')
		printf("a");
	else
printf("%c",l[i]);}
printf("\n");
}


return 0;
}