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: 4ms
Memory: 1120kB
Author: CT12812741281
In contest: 1281

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