#include <bits/stdc++.h>
using namespace std;
int main ( ) {
string s;
int cnt = 0, n = 0, i2;
getline(cin, s);
for (auto &c : s) cout << (((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) ? '.' : c);
cout << '\n';
for (auto &c : s) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) ? n++ : int ( );
for (int i = 0; cnt < round(1.f * n / 3); i++) {
if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) cnt++, cout << s [i];
else cout << s [i];
i2 = i;
}
for (int i = i2 + 1; i <= s.size ( ); i++) cout << (((s [i] >= 'a' && s [i] <= 'z') || (s [i] >= 'A' && s [i] <= 'Z')) ? '.' : s [i]);
cout << '\n';
cnt = 0;
if ((s.find ('a', i2 + 1) == s.npos) && (s.find ('A', i2 + 1) == s.npos) &&
(s.find ('e', i2 + 1) == s.npos) && (s.find ('E', i2 + 1) == s.npos) &&
(s.find ('i', i2 + 1) == s.npos) && (s.find ('I', i2 + 1) == s.npos) &&
(s.find ('o', i2 + 1) == s.npos) && (s.find ('O', i2 + 1) == s.npos) &&
(s.find ('u', i2 + 1) == s.npos) && (s.find ('U', i2 + 1) == s.npos)) {
for (int i = 0; cnt < round(1.f * n / 3 * 2); i++) {
if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) cnt++, cout << s [i];
else cout << s [i];
i2 = i;
}
for (int i = i2 + 1; i <= s.size ( ); i++) cout << (((s [i] >= 'a' && s [i] <= 'z') || (s [i] >= 'A' && s [i] <= 'Z')) ? '.' : s [i]);
}
else {
cnt = 0;
for (int i = 0; cnt < round(1.f * n / 3); i++) {
if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) cnt++, cout << s [i];
else cout << s [i];
i2 = i;
}
for (int i = i2 + 1; i <= s.size ( ); i++) {
if ((s [i] == 'a' || s [i] == 'e' || s [i] == 'i' || s [i] == 'o' || s [i] == 'u' || s [i] == 'A' || s [i] == 'E' || s [i] == 'I' || s [i] == 'O' || s [i] == 'U')) cout << s [i];
else if ((s [i] >= 'a' && s [i] <= 'z') || (s [i] >= 'A' && s [i] <= 'Z')) cout << '.';
else cout << s [i];
}
}
return 0;
}
这段代码只有90分
第六个测试点错误
显示 Wrong Answer.wrong answer On line 2 column 1, read ?, expected !.