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