提交时间:2025-02-26 16:06:29

运行 ID: 310004

#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin,s); for(int i=0;i<s.size();i++) { if(s[i]>='a'&&s[i]<='z') { cout<<char('z'-s[i]+'a'); } else { if(s[i]>='A'&&s[i]<='Z') { cout<<char('Z'-s[i]+'A'); } else { cout<<s[i]; } } } return 0; }