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: 1756kB
Author: CT12812171281
In contest: 1281

#include<cstdio>
#include <algorithm>
#include <iostream>
#include<cstring>
#include<cmath>
using namespace std;
const int maxn=101;
int main()
{
	char str[maxn];
	int len,i,j,a[maxn];
	while(scanf("%s",&str)!=EOF)
	{
		len=strlen(str);
		for(i=0;i<len;i++)
		{
			if((int)str[i]>=65&&(int)str[i]<90)
				str[i]=(int)str[i]+33;
			else if((int)str[i]==90)
				str[i]=97;
			else if(str[i]=='a'||str[i]=='b'||str[i]=='c')
				str[i]='2';
			else if(str[i]=='d'||str[i]=='e'||str[i]=='f')
				str[i]='3';
			else if(str[i]=='g'||str[i]=='h'||str[i]=='i')
				str[i]='4';
			else if(str[i]=='j'||str[i]=='k'||str[i]=='l')
				str[i]='5';
			else if(str[i]=='m'||str[i]=='n'||str[i]=='o')
				str[i]='6';
			else if(str[i]=='p'||str[i]=='q'||str[i]=='r'||str[i]=='s')
				str[i]='7';
			else if(str[i]=='t'||str[i]=='u'||str[i]=='v')
				str[i]='8';
			else if(str[i]=='w'||str[i]=='x'||str[i]=='y'||str[i]=='z')
				str[i]='9';
		}
		for(i=0;i<len;i++)
		{
			printf("%c",str[i]);
		}
		printf("\n");
	}
//	system("pause");
}