#C8782. Message Encryption
Message Encryption
Message Encryption
You are given n test cases. Each test case consists of a message composed of lowercase English letters followed by an integer k representing a shift amount. Your task is to encrypt each message using a Caesar cipher.
The encryption is performed by shifting each character by the value k according to the formula:
$$ new\_c = \text{chr}(((\text{ord}(c) - \text{ord}('a') + k) \mod 26) + \text{ord}('a')) $$
Note that when k is 0 or a multiple of 26, the encrypted message will be identical to the original.
inputFormat
The first line contains an integer n representing the number of test cases. Each of the following n lines contains a message (a string of lowercase English letters) followed by a space and an integer k.
outputFormat
For each test case, output the encrypted message on a new line.## sample
3
abc 3
xyz 2
hello 4
def
zab
lipps
</p>