Result: Accepted
Time: 3ms
Memory: 1120kB
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char a[26]={'b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a'};
char b[100];
char c[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int i,j;
while(gets(b))
{
for(i=0;i<100;i++)
{
if(b[i]=='1')
b[i]='1';
if(b[i]=='a'||b[i]=='b'||b[i]=='c')
b[i]='2';
if(b[i]=='d'||b[i]=='e'||b[i]=='f')
b[i]='3';
if(b[i]=='g'||b[i]=='h'||b[i]=='i')
b[i]='4';
if(b[i]=='j'||b[i]=='k'||b[i]=='l')
b[i]='5';
if(b[i]=='m'||b[i]=='n'||b[i]=='o')
b[i]='6';
if(b[i]=='p'||b[i]=='q'||b[i]=='r'||b[i]=='s')
b[i]='7';
if(b[i]=='t'||b[i]=='u'||b[i]=='v')
b[i]='8';
if(b[i]=='w'||b[i]=='x'||b[i]=='y'||b[i]=='z')
b[i]='9';
for(j=0;j<25;j++)
{
if(b[i]==c[j])
{
b[i]=tolower(c[j+1]);
}
}
if(b[i]==c[25])
b[i]=tolower(c[0]);
}
puts(b);
}
return 0;
}