Result: Accepted
Time: 3ms
Memory: 1756kB
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
char s[200],*p;
p=s;
while(scanf("%s",s)!=EOF){
p=s;
while(*p){
if(*p>='A'&&*p<'Z'){
printf("%c",*p+33);
} else if(*p=='Z'){
printf("a");
} else if(*p>='a'&&*p<='z'){
if(*p<='c'){
printf("2");
}else if(*p<='f'){
printf("3");
}else if(*p<='i'){
printf("4");
}else if(*p<='l'){
printf("5");
}else if(*p<='o'){
printf("6");
}else if(*p<='s'){
printf("7");
}else if(*p<='v'){
printf("8");
}else{
printf("9");
}
}else{
printf("%c",*p);
}
p++;
}
printf("\n");
memset(s,0,sizeof(s));
}
return 0;
}