Skip to content

reverserot

bradendubois edited this page Oct 7, 2021 · 8 revisions

Reverse Rot

ID: reverserot

Difficulty: 1.7

CPU Time: 1 second

Memory: 1024 MB

Solution

For this one, one can keep two maps, one to convert a character "A...Z_." to an ID, and one to convert that ID to a character, and so one can read in the string, reverse it, and then convert each character to its ID, add N (modulo dividing by the size of the "A...Z*." string if necessary) and convert to the new character.

Clone this wiki locally