#include<bits/stdc++.h>
using namespace std;
int main()
{
int a[26];
a[1] = a[5] = a[15] = a[21] = 1;
a[2] = a[6] = a[9] = a[10] = a[16] = a[18] = a[23] = a[25] = 2;
a[3] = a[19] = 3;
a[11] = 4;
a[12] = a[13] = 5;
a[17] = 6;
string s;
while(cin >> s)
{
int l = s.size(), i, t = 0;
for(i=0;i<l;i++)
{
if(s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'H' || s[i] == 'W' || s[i] == 'Y')
t = 0;
else if(a[s[i] - 65] != t)
{
cout << a[s[i] - 65];
t = a[s[i] - 65];
}
}
cout << endl;
}
return 0;
}
using namespace std;
int main()
{
int a[26];
a[1] = a[5] = a[15] = a[21] = 1;
a[2] = a[6] = a[9] = a[10] = a[16] = a[18] = a[23] = a[25] = 2;
a[3] = a[19] = 3;
a[11] = 4;
a[12] = a[13] = 5;
a[17] = 6;
string s;
while(cin >> s)
{
int l = s.size(), i, t = 0;
for(i=0;i<l;i++)
{
if(s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'H' || s[i] == 'W' || s[i] == 'Y')
t = 0;
else if(a[s[i] - 65] != t)
{
cout << a[s[i] - 65];
t = a[s[i] - 65];
}
}
cout << endl;
}
return 0;
}
Comments
Post a Comment