#include<iostream>
#include<fstream>
using namespace std;
int main(){
//ifstream cin("1.txt");
string str;
string ch[]={"","1","2","3","","1","2","","","2","2","4","5","5","","1","2","6","2","3","","1","","2","","2"};
while(cin>>str){
string num="";
string old="q";
for(int i=0;i<str.length();++i){
string temp=ch[str[i]-'A'];
if(temp==old){
}else{
old=temp;
num+=ch[str[i]-'A'];
}
}
cout<<num<<endl;
}
return 0;
}
poj 2608
最新推荐文章于 2018-01-31 10:36:43 发布