https://www.patest.cn/contests/pat-a-PRactise/1035 纯模拟 做做水题 陶冶情操 反正我也不会做难题了 = =
#include <bits/stdc++.h>using namespace std;int main(){ int N; scanf("%d/n", &N); vector<pair<string, string> > ans; for (int i = 0; i < N; i++) { string accout, pwd; cin >> accout >> pwd; bool flag = true; for (int i = 0; i < pwd.size(); i++) { if (pwd[i] == '1') pwd[i] = '@', flag = false; else if (pwd[i] == '0') pwd[i] = '%', flag = false; else if (pwd[i] == 'l') pwd[i] = 'L', flag = false; else if (pwd[i] == 'O') pwd[i] = 'o', flag = false; } if (!flag) { ans.push_back(make_pair(accout, pwd)); } } if (ans.size() == 0) { if (N == 1) { cout << "There is 1 account and no account is modified" << endl; } else cout << "There are " << N << " accounts and no account is modified" << endl; } else { cout << ans.size() << endl; for (auto e : ans) { cout << e.first << ' ' << e.second << endl; } }}新闻热点
疑难解答