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: 5ms
Memory: 2020kB
Author: CT12812671281
In contest: 1281

#include<bits/stdc++.h>
using namespace std;
int main(){
	char str[101],i,l;
	while(scanf("%s",str)!=EOF){
		l = strlen(str);
		for(i = 0;i<l;i++){
			if(str[i]>='A'&&str[i]<='Z'){
				str[i] = str[i] + 33;
				if(str[i] == 123){
					str[i] = 'a';
				}
//				printf("%c\n",str[i]);
			}
			else if(str[i]=='a'||str[i]=='b'||str[i]=='c'){
				str[i] = '2';
			}
			else if(str[i]=='d'||str[i]=='e'||str[i]=='f'){
				str[i] = '3';
			}
			else if(str[i]=='g'||str[i]=='h'||str[i]=='i'){
				str[i] = '4';
			}
			else if(str[i]=='j'||str[i]=='k'||str[i]=='l'){
				str[i] = '5';
			}
			else if(str[i]=='m'||str[i]=='n'||str[i]=='o'){
				str[i] = '6';
			}
			else if(str[i]=='p'||str[i]=='q'||str[i]=='r'||str[i]=='s'){
				str[i] = '7';
			}
			else if(str[i]=='t'||str[i]=='u'||str[i]=='v'){
				str[i] = '8';
			}
			else if(str[i]=='w'||str[i]=='x'||str[i]=='y'||str[i]=='z'){
				str[i] = '9';
			}
		}
		printf("%s\n",str);
	}
}