You are not logged in. Please login at www.codechef.com to post your questions!

×

RAMCRYPT - Editorial

Problem link:

Contest , Practice

Setter: Debjit Datta

Tester: Debjit Datta

Difficulty:

Cakewalk

Prerequisites:

Modular arithmetic, string

Explanation:

Given a String and an integer with which we need to decrypt the encrypted string, we need to decrypt the string.

We traverse through the string and for each character, we first find out the index of the character(i.e distance form 'a') and then add n to the index. Then we do modular operation by 26 and then store the decrypted character in the result string.

Time complexity:

O(m) where m is the size of string

Author’s and Tester’s Solution:

Author’s solution is here

This question is marked "community wiki".

asked 02 Apr '18, 23:01

debjitdbb's gravatar image

4★debjitdbb
534
accept rate: 0%

edited 02 Apr '18, 23:04

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×644
×128
×12

question asked: 02 Apr '18, 23:01

question was seen: 124 times

last updated: 02 Apr '18, 23:04