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

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