密码的翻译 题解:
P3502
发布于2024年3月26日 19:22
阅读数 754
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
while(cin >> s){
//only a for
for(auto &ss : s){
if((ss >= 'a' && ss <= 'z' )|| (ss >= 'A' && ss <= 'Z')){
if(ss == 'z') ss = 'a';
else if(ss == 'Z') ss = 'A';
else ss ++;
}
}
cout<<s<<endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发