1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include<stdio.h>
#include<string.h>
int main()
{
char s[101];
int len,i;
while(scanf("%s",s)!=EOF)
{
len=strlen(s);
for(i=0;i<len;++i)
{
if(s[i]>='a'&&s[i]<='z')
{
switch(s[i])
{
case 'a':
case 'b':
case 'c':
s[i]='2';
break;
case 'd':
case 'e':
case 'f':
s[i]='3';
break;
case 'g':
case 'h':
case 'i':
s[i]='4';
break;
case 'j':
case 'k':
case 'l':
s[i]='5';
break;
case 'm':
case 'n':
case 'o':
s[i]='6';
break;
case 'p':
case 'q':
case 'r':
case 's':
s[i]='7';
break;
case 't':
case 'u':
case 'v':
s[i]='8';
break;
case 'w':
case 'x':
case 'y':
case 'z':
s[i]='9';
break;
}
}
if(s[i]>='A'&&s[i]<'Z')
s[i]=s[i]+33;
if(s[i]=='Z')
s[i]='a';
}
printf("%s\n",s);
}
return 0;
}