This is the companion thread to the main Unscramble the Source Code challenge. If you think you have managed to unscramble one of the cop answers, you should post your solution as the answer to this thread.

As a reminder, you have one attempt at cracking each submission. Your cracking attempt will be an unscrambled version of the source code. If your guess matches the description (same characters, output, and of course language), and you are the first correct guess, then you win a point. It is important to note that your program does not have to exactly match the original, simply use the same characters and have the same functionality. This means there could be more than one correct answer.

The robber with the most points (successful cracks) wins.


Too many solves

20 solves

15 solves

10 solves

7 solves

5 solves

4 solves

3 solves

2 solves

1 solve

  • 1
    \$\begingroup\$ Perl 5, size 27, by Morot - print'pin'=~tr(a-za)(za-z)r \$\endgroup\$ – user15244 Nov 6 '14 at 14:34
  • \$\begingroup\$ @WumpusQ.Wumbley We've all been there... ;) \$\endgroup\$ – Martin Ender Nov 6 '14 at 14:35
  • 3
    \$\begingroup\$ I refuse to waste my time attempting to appease it. \$\endgroup\$ – user15244 Nov 6 '14 at 14:35
  • \$\begingroup\$ Given the two question bodies, it appears that the scrambled/unscrambled answers are reversed \$\endgroup\$ – Mooing Duck Nov 6 '14 at 23:31
  • \$\begingroup\$ Ruby, 23 by MegaTom = p %++.methods[80][1..-1] \$\endgroup\$ – histocrat Nov 11 '14 at 22:31

182 Answers 182


Python 2, Oliver

r =int= 2**2**2*2**2**2*2**2**2**2*2**2*2**2*2**2*2**2*2**2*2
print 16777216,

Demo on ideone

There is nothing tricky here. All the numbers are there, only need some rearrangement to comply with the syntax.

You can pipe the output to xxd to see that it has a trailing new line:

$ python -c 'r =int= 2**2**2*2**2**2*2**2**2**2*2**2*2**2*2**2*2**2*2**2*2;print 16777216,' | xxd
0000000: 3136 3737 3732 3136 0a                   16777216.
  • \$\begingroup\$ Thats wrong, the output had a trailing newline \$\endgroup\$ – Oliver Ni Jan 12 '15 at 4:21
  • \$\begingroup\$ The output was 16777216\n with the \n being a line break. \$\endgroup\$ – Oliver Ni Jan 15 '15 at 5:33
  • \$\begingroup\$ When you do print 'abc', the comma makes it not have a line break. \$\endgroup\$ – Oliver Ni Jan 15 '15 at 5:34
  • \$\begingroup\$ @Oliver: I always find a new line at the end. It will add space if you have another print statement, but I only have a single print statement here. I have also tested with executing the code from a file with the same result. \$\endgroup\$ – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ Jan 15 '15 at 5:54
  • \$\begingroup\$ No. Take a look at this picture. oliverni.com/Screenshot%20(4).png \$\endgroup\$ – Oliver Ni Jan 17 '15 at 2:52

Python 2, Oliver

rt =in= 2**2**2*2**2**2*2**2**2**2*2**2*2**2*2**2*2**2*2**2*2,
print 16777216

All actual credit to n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ with this solution. I just stole it and corrected it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.