Inspired by Project Euler n°59
Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107. A basic encryption method is to take a text file or a sentence, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65.
Your task has been made easy, as the encryption key consists only of a upper case character (different in every tests). You must know that the original text contains common FRENCH words about MATLAB.
Decrypt the message and find the sum of the ASCII values in the original text.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers69
Suggested Problems
-
Find the numeric mean of the prime numbers in a matrix.
9158 Solvers
-
Which values occur exactly three times?
5248 Solvers
-
Count from 0 to N^M in base N.
241 Solvers
-
Are all the three given point in the same line?
605 Solvers
-
343 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
This was fun. It took me a minute to figure out how I was supposed to know the decryption key for each separate test. Ultimately, I just had to brute force it by trying all the test cases.