题目描述
基本字符串
C++ 代码
#include <vector>
#include <iostream>
using namespace std;
vector<pair<string, string>> s;
int n, cnt;
int main()
{
cin >> n;
for (int i = 0; i < n; i ++)
{
bool flag = false;
string a, b;
cin >> a >> b;
for (auto & c : b)
if (c == '1') c = '@', flag = true;
else if (c == '0') c = '%', flag = true;
else if (c == 'l') c = 'L', flag = true;
else if (c == 'O') c = 'o', flag = true;
cnt += flag;
if (flag) s.push_back({a, b});
}
if (cnt)
{
cout << cnt << endl;
for (auto i : s)
cout << i.first << " " << i.second << endl;
}
else if (n == 1) puts("There is 1 account and no account is modified");
else cout << "There are " << n << " accounts and no account is modified";
}