#include<iostream>
#include<map>
#include<vector>
using namespace std;
struct Node{
string id, str;
int flag = 0;
};
int cnt = 0;
map<char, int> CharToInt;
map<int, char> mod;
vector<Node> res;
void trans(){
CharToInt['1'] = 1;
CharToInt['l'] = 2;
CharToInt['0'] = 3;
CharToInt['O'] = 4;
mod[1] = '@';
mod[2] = 'L';
mod[3] = '%';
mod[4] = 'o';
}
void fun(Node a){
for (int i = 0; i < a.str.size(); i++){
if (CharToInt[a.str[i]] != 0){
a.str[i] = mod[CharToInt[a.str[i]]];
a.flag = 1;
}
}
if (a.flag == 1){
res.push_back(a);
}
}
int main(){
trans();
int n;
cin >> n;
string s1, s2;
Node node;
for (int i = 0; i < n; i++){
cin >> s1 >> s2;
node.id = s1;
node.str = s2;
node.flag = 0;
fun(node);
}
if (res.size() != 0){
cout << res.size() << endl;
for (int i = 0; i < res.size(); i++){
cout << res[i].id << " " << res[i].str << endl;
}
}
else if (n == 1){
printf("There is 1 account and no account is modified");
}
else{
printf("There is %d accounts and no account is modified", n);
}
}
PAT甲级1035
最新推荐文章于 2022-05-13 13:39:10 发布