终于会用Markdown

P1914 小书童——凯撒密码

Skywind @ 2019-08-07 16:38:48

开心

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

int main()
  {
    int b;
    string n,c="abcdefghijklmnopqrstuvwxyz";
    cin>>b>>n;
    for (int i=0;i<n.size();i++) 
        cout<<c[(int(n[i])-97+b)%26];
    return 0;
 }

by    吾皇 @ 2019-08-07 16:39:47

so?


|