Result: Accepted
Time: 3ms
Memory: 1120kB
#include<stdio.h>
#include<string.h>
int main()
{
char s[101];
while(scanf("%s",&s)!=EOF){
int i=0;
for(i=0;i<strlen(s);i++){
if(s[i]=='a'||s[i]=='b'||s[i]=='c'){
s[i]='2';
// printf("%c",s[i]);
}else if(s[i]=='d'||s[i]=='e'||s[i]=='f'){
s[i]='3';
// printf("%c",s[i]);
}else if(s[i]=='g'||s[i]=='h'||s[i]=='i'){
s[i]='4';
// printf("%c",s[i]);
}else if(s[i]=='j'||s[i]=='k'||s[i]=='l'){
s[i]='5';
// printf("%c",s[i]);
}else if(s[i]=='m'||s[i]=='n'||s[i]=='o'){
s[i]='6';
//printf("%c",s[i]);
}else if(s[i]=='p'||s[i]=='q'||s[i]=='r'||s[i]=='s'){
s[i]='7';
// printf("%c",s[i]);
}else if(s[i]=='t'||s[i]=='u'||s[i]=='v'){
s[i]='8';
//printf("%c",s[i]);
}else if(s[i]=='w'||s[i]=='x'||s[i]=='y'||s[i]=='z'){
s[i]='9';
//printf("%c",s[i]);
}else if(s[i]>='A'&&s[i]<'Z'){
s[i]=s[i]+33;
//printf("%c",s[i]);
}else if(s[i]=='Z'){
s[i]='a';
//printf("%c",s[i]);
}
}
//for(i=0;i<strlen(s);i++){
printf("%s\n",s);
// }
}
return 0;
}