Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caesar's Cipher #4

Open
lfmundim opened this issue Oct 7, 2021 · 0 comments
Open

Caesar's Cipher #4

lfmundim opened this issue Oct 7, 2021 · 0 comments

Comments

@lfmundim
Copy link
Owner

lfmundim commented Oct 7, 2021

Description

Caesar's Cipher is an old encryption tatic that is defined by shifting all letters of a string or substring to the right the same amount in order to disguise the message. E.g: if the cipher is 2, A becomes C, Z becomes B and so forth.

Input

The input will be comprised of many entries:

  • one int that will state how many scenarios will be tested -- lets call it n
  • n pairs of entries, in the following order
    • a string of shifted letters
    • an int stating the number of shifts or jumps (aka the cipher)
      Each input is expected on it's own line (so no argv, use input reads)

Output

The restored string, with the cipher applied, one per line

Example

input output
6 TOPCODER
VQREQFGT QRSTUVWXYZABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOPQRSTUVWXYZ TOPCODER
10 AXCHMA
TOPCODER CAMOBAP
0 HELLOWORLD
ZWBGLZ
25
DBNPCBQ
1
LIPPSASVPH
4

Original problem

@lfmundim lfmundim changed the title Caesar' Caesar's Cipher Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant