CCIPHER - Encrypt the String

no tags 

A  Caesar's cipher, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a right shift of 3, D would be replaced by G, E would become H, and so on. The method is named after Julius Caesar, who used it in his private correspondence.
Now little Aswin is enthralled on learning this new technique. He needs your help to create an application that performs this Caesar’s cipher.

INPUT

First line contains an integer T – the no. of test cases.

Each test case consists of two lines. First line has the input text and the second has the

numbers by which the text is to be shifted.

OUTPUT:

The output text after the required operation is performed.

EXAMPLES:

Input:

 ABCDEFGHIJKLMNOPQRSTUVWXYZ

3

xyza

1

Output:
DEFGHIJKLMNOPQRSTUVWXYZABC

yzab


hide comments
tk0221: 2015-04-16 02:33:02

I think Test case or Input description is wrong.


Added by:kousik
Date:2013-09-13
Time limit:1s-5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ASM32-GCC MAWK BC C-CLANG C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JAVA JS-MONKEY JULIA KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYTHON PYPY PYPY3 PYTHON3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET