Telogis Puzzle
Wednesday, September 19th, 2007I came across a web site that required job candidates to solve a puzzle to be able to access a job application page. I’m a sucker for puzzles. The original puzzle is at the following site:
But in case, they take it down at some point, here is the plain text version nicely formatted:
z = 4254145 * 0x18712495;
b = (z & 1) << 4;
a = b--;
o = [];
c = a - b;
x = b - a;
while (z) {
x = a & x ? a & b : c + x;
{
o[z & b^x] = (x + 6 * a + b / 5 - c).chr;
z = z / a / a;
} if (!(z / a & b^x))
}
To apply go to “http://www.telogis.co.nz/” + o + “.html”
I don’t think this will parse correctly in any language, but I decided to solve the puzzle using Ruby since it wasn’t that far from it and Ruby is my main programming language currently. I had a couple false starts due to a subtlety in Ruby compared to other languages.
I’ll come back in a while and post the Ruby solution, but I don’t want to post a spoiler too soon.
