All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Crypto-Phrase (Posted on 2003-11-20) Difficulty: 3 of 5
6-342-30-2-132 / 420-72-30 / 12-240-20-30 / 420-240 / 342-30-506-30-2-156 / 2 / 42-2-182-240-462-380 / 272-72-342-2-380-30 / 2-210-20 / 90-420-380 / 2-462-420-72-240-342:

420-240 / 6-30 / 240-342 / 210-240-420 / 420-240 / 6-30; 420-72-2-420 / 90-380 / 420-72-30 / 306-462-30-380-420-90-240-210.

~552-90-156-156-90-2-182 / 380-72-2-132-30-380-272-30-2-342-30

Note: Each letter of every word is separated by a dash and each word is separated by a slash.

See The Solution Submitted by luvya    
Rating: 3.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Just for Kicks | Comment 23 of 28 |

Each letter in the original message was replaced by its index multiplied by one more than the index (the nth letter is replaced by n(n+1)).

Here's a little script that reads the code and prints out the result. I modified it slightly, simply replacing the dashes with spaces and using the spaces to delimit sections to be parsed. The line breaks were not present in the original code; I added them just so they would fit on this page. vals[] is an array that contains the translated letters at their indexed positions (vals[2]='a', vals[30]='e', etc.). That seemed easier than trying to do the math backwards.

var letters = "abcdefghijklmnopqrstuvwxyz";
var vals = new Array();
for (var i = 1; i <= 26; i++) {
   var n = i*(i+1);
   vals[n] = letters.charAt(i-1);
}
function parseCode(val) {
   if (val == "/")
      return " ";
   else if (isInteger(val))
      return vals[code[i]];
   else
      return " " + val + " ";
}
function isInteger(val){
   var string="1234567890";
   for(var i = 0; i < val.length; i++)
      if(string.indexOf(val.charAt(i)) == -1)
         return false;
   return true;
}
var code = "6 342 30 2 132 / 420 72 30 / 12 240 20 30 / 420 240 / ";
code += "342 30 506 30 2 156 / 2 / 42 2 182 240 462 380 / 272 72 3";
code += "42 2 380 30 / 2 210 20 / 90 420 380 / 2 462 420 72 240 34";
code += "2 : 420 240 / 6 30 / 240 342 / 210 240 420 / 420 240 / 6 ";
code += "30 ; 420 72 2 420 / 90 380 / 420 72 30 / 306 462 30 380 4";
code += "20 90 240 210 . ~ 552 90 156 156 90 2 182 / 380 72 2 132 ";
code += "30 380 272 30 2 342 30".split(" ");
var result = "";
for (var i = 0; i < code.length; i++) {
   result += parseCode(code[i]);
}
document.write(result);

When run, this code outputs:

break the code to reveal a famous phrase and its author :
to be or not to be ; that is the question . ~ william shakespeare

  Posted by DJ on 2004-03-16 13:33:31
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (17)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information