清北暑假模拟day1 爱

/*
水题
*/
#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
int l,k;
string s,num;
int main(){
    freopen("love.in","r",stdin);
    freopen("love.out","w",stdout);
    cin>>l>>k>>s>>num;
    for(int i = 0;i < l;i++){
        int j = i % k;
        char tmp = 97 + ((s[i] - 97) + (num[j] - 48)) % 26;
        s[i] = tmp;
    }
    cout<<s;
    return 0;
}

 

posted @ 2016-10-19 19:32  ACforever  阅读(111)  评论(0编辑  收藏  举报