#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
int main(){
string input;
while(cin >> input){
int B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
int sz = input.size();
for(int i = 0; i < sz; i++){
if((input[i] == 'B' || input[i] == 'F' || input[i] == 'P' || input[i] == 'V') && B == 0){
cout << 1, B = 1, C = 0, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'C' || input[i] == 'G' || input[i] == 'J' || input[i] == 'K') && C == 0){
cout << 2, B = 0, C = 1, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'Q' || input[i] == 'S' || input[i] == 'X' || input[i] == 'Z') && C == 0){
cout << 2, B = 0, C = 1, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'D' || input[i] == 'T') && D == 0)cout << 3, B = 0, C = 0, D = 1, M = 0, L = 0, R = 0;
if((input[i] == 'M' || input[i] == 'N') && M == 0)cout << 5, B = 0, C = 0, D = 0, M = 1, L = 0, R = 0;
if(input[i] == 'L' && L == 0)cout << 4, B = 0, C = 0, D = 0, M = 0, L = 1, R = 0;
if(input[i] == 'R' && R == 0)cout << 6, B = 0, C = 0, D = 0, M = 0, L = 0, R = 1;
if(input[i] == 'A' || input[i] == 'E' || input[i] == 'I' || input[i] == 'O')
B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
if(input[i] == 'U' || input[i] == 'H' || input[i] == 'W' || input[i] == 'Y')
B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
}
cout << endl;
}
return 0;
}
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
int main(){
string input;
while(cin >> input){
int B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
int sz = input.size();
for(int i = 0; i < sz; i++){
if((input[i] == 'B' || input[i] == 'F' || input[i] == 'P' || input[i] == 'V') && B == 0){
cout << 1, B = 1, C = 0, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'C' || input[i] == 'G' || input[i] == 'J' || input[i] == 'K') && C == 0){
cout << 2, B = 0, C = 1, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'Q' || input[i] == 'S' || input[i] == 'X' || input[i] == 'Z') && C == 0){
cout << 2, B = 0, C = 1, D = 0, M = 0, L = 0, R = 0;
}
if((input[i] == 'D' || input[i] == 'T') && D == 0)cout << 3, B = 0, C = 0, D = 1, M = 0, L = 0, R = 0;
if((input[i] == 'M' || input[i] == 'N') && M == 0)cout << 5, B = 0, C = 0, D = 0, M = 1, L = 0, R = 0;
if(input[i] == 'L' && L == 0)cout << 4, B = 0, C = 0, D = 0, M = 0, L = 1, R = 0;
if(input[i] == 'R' && R == 0)cout << 6, B = 0, C = 0, D = 0, M = 0, L = 0, R = 1;
if(input[i] == 'A' || input[i] == 'E' || input[i] == 'I' || input[i] == 'O')
B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
if(input[i] == 'U' || input[i] == 'H' || input[i] == 'W' || input[i] == 'Y')
B = 0, C = 0, D = 0, M = 0, L = 0, R = 0;
}
cout << endl;
}
return 0;
}
No comments:
Post a Comment