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

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