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: CT12811311281
In contest: 1281

#include<stdio.h>
int main()
{
	char n[100];
	int i;
	while (scanf("%s",n)!=EOF){
	for(i=0;i<100;++i){//字母转数字 
	if(n[i]=='a'||n[i]=='b'||n[i]=='c'){
		n[i]='2';	}
	if(n[i]=='d'||n[i]=='e'||n[i]=='f'){
		n[i]='3';	}	
	if(n[i]=='g'||n[i]=='h'||n[i]=='i'){
		n[i]='4';	}
	if(n[i]=='j'||n[i]=='k'||n[i]=='l'){
		n[i]='5';	}	
	if(n[i]=='m'||n[i]=='n'||n[i]=='o'){
		n[i]='6';	}
	if(n[i]=='p'||n[i]=='q'||n[i]=='r'||n[i]=='s'){
		n[i]='7';	}	
	if(n[i]=='t'||n[i]=='u'||n[i]=='v'){
		n[i]='8';	}
	if(n[i]=='w'||n[i]=='x'||n[i]=='y'||n[i]=='z'){
		n[i]='9';	}							
	}
	for(i=0;i<100;i++){//大写转换小写 //头文件引用不了 
		if(n[i]=='A'||n[i]=='B'||n[i]=='C'||n[i]=='D'||n[i]=='E'||\
		n[i]=='F'||n[i]=='G'||n[i]=='H'||n[i]=='I'||n[i]=='J'||n[i]=='K'||\
		n[i]=='L'||n[i]=='M'||n[i]=='N'||n[i]=='O'||n[i]=='P'||n[i]=='Q'||\
		n[i]=='R'||n[i]=='S'||n[i]=='T'||n[i]=='U'||n[i]=='V'||n[i]=='W'||\
		n[i]=='X'||n[i]=='Y'||n[i]=='Z'){
			n[i]=n[i]+32;}}
	for(i=0;i<100;i++){//小写字母进一 
		if(n[i]=='a'||n[i]=='b'||n[i]=='c'||n[i]=='d'||n[i]=='e'||\
		n[i]=='f'||n[i]=='g'||n[i]=='h'||n[i]=='i'||n[i]=='j'||n[i]=='k'||\
		n[i]=='l'||n[i]=='m'||n[i]=='n'||n[i]=='o'||n[i]=='p'||n[i]=='q'||\
		n[i]=='r'||n[i]=='s'||n[i]=='t'||n[i]=='u'||n[i]=='v'||n[i]=='w'||\
		n[i]=='x'||n[i]=='y'){
			n[i]++;}
		else if(n[i]=='z'){
			n[i]='a';
		}
	}
	printf("%s\n",n);}//暴力 
	return 0;	
}