字符解密 题解:简简单单find函数
#include <bits/stdc++.h>
using namespace std;
int main() {
string a="abcdefghijklmnopqrstuvwxyz";
string b=a;
reverse(b.begin(),b.end());
string s;
while(cin>>s){
for(auto &x:s){
x=b[a.find(x)];
}
cout<<s<<endl;
}
}
限制这题解题速度的可能就是键盘的熟悉程度了吧
登录后发布评论
暂无评论,来抢沙发