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

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

		}
		printf("%c",b);
		for(i=0;i<l;i++)
		{
			if(i==l-1)
			{
			    printf("%c\n",a[i]);
			}
			else
				printf("%c",a[i]);
		}
	getchar();
	}
	return 0;
}