Kaitou Kid - The Phantom Thief (1)
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main(){
int m;
int data = 0;
cin>>m;
for(int i = 0; i < m; i++){
string s1;
cin>>s1;
int len = s1.length();
for(int j = 0; j < len; j++){
if(s1[j] == '-'){
if(data != 0){
cout<<char(data + 64);
data = 0;
}
continue;
}else if(s1[j] == '#'){
if(data != 0){
cout<<char(data + 64);
data = 0;
}
cout<<' ';
continue;
}else{
data = (int)(s1[j] - 48) + data * 10;
}
}
if(data != 0){
cout<<char(data + 64);
data = 0;
}
cout<<endl;
}
system("pause");
}