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

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