文章

166

粉丝

68

获赞

825

访问

49.7k

头像
字符解密 题解:简简单单find函数
P1824 西安交通大学机试题
发布于2025年3月18日 12:16
阅读数 55

#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;
    }
}

限制这题解题速度的可能就是键盘的熟悉程度了吧

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发