Encrypt the string

Given a string S and a character k, you have to encrypt S using k. You need to change every letter of string S. That is if a = 1, b = 2, c = 3, ......., z = 26 and given character is b, then every character of given string should increase by 2.

Input format :

Line 1 : String

Line 2 : Character k

Sample Input 1 :
adgpz
a
Sample Output 1 :
behqa
Sample Input 2 :
adgpz
c
Sample Output 2 :
dgjsc

Login to submit your solution

Fb dab53a1a64929320dc7425896aa73fd9e5512b6ab52e414ff5f3ebb5cecc73eb

Share Problem