GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Wednesday 5 July 2023

Caesar Cipher CodeChef Problem Solution 2023 | Problem Code: CAESAR


Problem

In the ROT-K cipher, each character in the string is shifted a fixed number of positions down the alphabet. The value of K represents the number of positions to shift. For instance, in ROT-2, each character is shifted 2 positions. The ROT-2 cipher of the string code is eqfg.

Note that the rotation is performed in a circular manner, meaning that if the character z is shifted by one position, we obtain the character a.

You are given strings ,, and , each of length , such that the ROT-K cipher of string  is string .
Find the ROT-K cipher of string .

Input Format

  • The first line of input will contain a single integer , denoting the number of queries.
  • Each query consists of multiple lines of input.
    • The first line of each query contains  — the length of the strings.
    • The second line contains the string .
    • The third line contains the string .
    • The fourth line contains the string .

Output Format

For each query, output on a new line, the ROT-K cipher of string .

Constraints

  • 1100
  • 11000
  • ,, and  contain lowercase english alphabets only.

No comments:

Post a Comment