题解 | #简单密码#

简单密码

https://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac

#include <bits/stdc++.h>
using namespace std;

int main() {
    string str;
    getline(cin, str);
    string a = {"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"};
    string b = {"123456789022233344455566677778889999bcdefghijklmnopqrstuvwxyza"};
    for(int i=0; i<str.size(); i++){
        for(int j=0; j<a.size(); j++){
            if(str[i] == a[j]) cout << b[j];
        }
    }
    return 0;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务