题解(有点复杂)
2026-01-19 18:22:59
发布于:江苏
13阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (i % 2 == 0) {
if (s[i] >= 'A' && s[i] <= 'Z') {
s[i] += 32;
}
} else {
if (s[i] >= 'a' && s[i] <= 'z') {
s[i] -= 32;
}
}
}
cout << s << endl;
}
这里空空如也







有帮助,赞一个