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

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