为啥60分

P1914 小书童——凯撒密码

Drone @ 2019-01-29 10:13:42

#include<iostream>
#include<cstdio>
#include<cstring>
#include <cctype>
using namespace std;
int main()
{
    string a;
    int aa;
    //string c;
    //int pd=0,k=0,x=-1;
    cin>>aa;
    cin>>a;
    for(int i=0;i<a.length();i++)
    {
        if(a[i]>='a' && a[i]<='z')
        {
            a[i]+=aa;
            while(a[i]>'z')
                a[i]+='a'-'z';
            cout<<a[i];
        }
    }
    return 0;
} 

by Drone @ 2019-01-29 10:15:59

没事了,我搞定了


by hnyqwq @ 2019-02-08 11:23:01

考古


|