Unscramble the Source Code

142

41

Note: This challenge is now closed to new cop submissions. This is to ensure that no one can post submissions that only remain uncracked because there aren't enough robbers interested in the challenge anymore.

In this game of cops-and-robbers, each cop will write a simple program to give a single output. They will then make public four things about their program:

  1. The language
  2. The program length
  3. The desired output
  4. A scrambled-up version of the source code

Then, the robbers must unscramble the source code so that their program functions like the original.


Cop Rules

You are to write a simple program, which the robbers will try to recreate.

Your original program must have a simple functionality: upon execution, it outputs a single string/number and halts. It should give the same output regardless of when/where it is run, and should not depend on extra libraries or the internet.

Your program and output must use printable ASCII (newlines and spaces allowed). The output should be no more than 100 characters long, and the program should take less than about 5 seconds to run on a reasonable machine. You are also not allowed to use hashing (or other cryptographic functions) in your program

Then, you provide a scrambled-up version of the source code and the required output. You can scramble up your source code however you may like, as long as characters are conserved.

Your score is the shortest program you have submitted which hasn't been cracked. After a period of one week, an uncracked submission will become immune. In order to claim this immunity, you should edit your answer to show the correct answer. (Clarification: Until you reveal the answer, you are not immune and can still be cracked.) The lowest score wins.

Simple Example Cop Answers

Perl, 20

ellir"lnto Wo d";prH

Hello World

Or...

Perl, 15

*3i)xp3rn3*x3t(

272727

Robber Rules

Robbers will post their cracking attempts as answers in a separate thread, located here.

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.

Simple Example Robber Answers

Your program was print "Hello World";. (Although print"Hello World" ; could have also worked.)

Your program was print(3**3x3)x3

Safe Submissions

  1. ASP/ASP.Net, 14 (Jamie Barker)
  2. Befunge-98, 15 (FireFly)
  3. GolfScript, 16 (Peter Taylor)
  4. CJam, 19 (DLosc)
  5. GolfScript, 20 (user23013)
  6. Perl, 21 (primo)
  7. Python, 23 (mbomb007)
  8. Ruby, 27 (histocrat)
  9. SAS, 28 (ConMan)
  10. Ruby, 29 (histocrat)
  11. Python, 30 (mbomb007)
  12. JavaScript, 31 (hsl)
  13. Ruby, 33 (histocrat)
  14. Marbelous, 37 (es1024)
  15. Ruby, 43 (histocrat)
  16. PHP, 44 (kenorb)
  17. Ruby, 45 (histocrat)
  18. Marbelous, 45 (es1024)
  19. Python 2, 45 (Emil)
  20. PHP, 46 (Ismael Miguel)
  21. Haskell, 48 (nooodl)
  22. Python, 51 (DLosc)
  23. Python, 60 (Sp3000)
  24. Python 2, 62 (muddyfish)
  25. JavaScript, 68 (Jamie Barker)
  26. Mathematica, 73 (Arcinde)
  27. Haskell, 77 (proudhaskeller)
  28. Python, 90 (DLosc)
  29. C++, 104 (user23013)
  30. ECMAScript 6, 116 (Mateon1)
  31. C++11, 121 (es1024)
  32. Grass, 134 (user23013)
  33. PowerShell, 182 (christopherw)

Unsolved Submissions

In order of time of posting. This list courtesy of many users.

A small tool to verify solutions, courtesy of n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

$(function(){function e(){var e=$("#ignore-space").is(":checked");var t=$("#source").val().split("").sort();var n=$("#editor").val().split("").sort();var r,i=0;for(r=0;r<t.length;){if(t[r]==n[i]){t.splice(r,1);n.splice(i,1)}else if(t[r]>n[i]){i++}else{r++}}$("#display").val(t.join(""));n=n.join("");if(e){n=n.replace(/[\r\n\t ]/g,"")}if(n.length!=0){$("#status").addClass("bad").removeClass("good").text("Exceeded quota: "+n)}else{$("#status").addClass("good").removeClass("bad").text("OK")}}$("#source, #editor").on("keyup",function(){e()});$("#ignore-space").on("click",function(){e()});e()})
textarea{width:100%;border:thin solid emboss}#status{width:auto;border:thin solid;padding:.5em;margin:.5em 0}.bad{background-color:#FFF0F0;color:#E00}.good{background-color:#F0FFF0;color:#2C2}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<h3>Scrambled Source</h3>
<textarea id="source" class="content" rows="10"></textarea>
<h3>Unused Characters</h3>
<textarea id="display" class="content" rows="10" readonly></textarea>
<h3>Your Solution</h3>
<input type="checkbox" id="ignore-space" name="ignore-space"/>
<label for="ignore-space">Ignore space characters</label>
<div id="status" class="good">OK</div>
<textarea id="editor" class="content" rows="10"></textarea>

PhiNotPi

Posted 11 years ago

Reputation: 26 739

I think activity is slowing down... – mbomb007 – 11 years ago

Would it be possible to post new cop submissions with an extended time limit for the robbers (for example, 1-2 months?) This could fix the problem of cops only winning because time ran out before any interested robbers cracked it. – ASCIIThenANSI – 10 years ago

1Scramble means permute the characters? – xnor – 11 years ago

4@xnor Yes, that's what it means. – PhiNotPi – 11 years ago

3

You might want to forbid hashing... http://codegolf.stackexchange.com/questions/40304/code-crosswords#comment92987_40304

– NinjaBearMonkey – 11 years ago

2It might be an idea to maintain a list of uncracked submissions in the question, for when things get messy. – matsjoyce – 11 years ago

1Does printable ASCII mean newlines are forbidden? – Dennis – 11 years ago

@Dennis No, that wasn't my intent. – PhiNotPi – 11 years ago

Can cops submit multiple programs? Also, are languages which may not be available to everyone (Mathematica) allowed? – Fox Wilson – 11 years ago

1@FoxWilson I'll say yes to both of those. When a cop submits multiple programs, his score is the shortest uncracked one. – PhiNotPi – 11 years ago

7You should probably specify that the winner must post the original source code after one week. What prevents me from posting gibberish and claiming that none of the robbers got the right answer? – user2023861 – 11 years ago

63I thought "Oh, il just write a malbolge program, scramble it, and win this thing!". But then, i tried to write a malbolge program. – rodolphito – 11 years ago

@user2023861 I decided that would be a good rule. – PhiNotPi – 11 years ago

2@PhiNotPi I took the liberty of adding a list of unsolved submissions to the question; hope you don't mind. – es1024 – 11 years ago

@Rodolvertice How about a Brainfuck program? – Nzall – 11 years ago

2Why should solutions by the authors be posted in the robbers thread as well? Why not just edit their answer here with the solution? – Martin Ender – 11 years ago

1Can you use an error or function output as your code output? E.g. php -r "blah" would generate the output: Parse error: syntax error...? – kenorb – 11 years ago

Added code golf, because the scoring is still "shortest wins". – Martin Ender – 11 years ago

How about decompress functions (e.g. gunzip)? – kenorb – 11 years ago

@MartinBüttner I was intending to keep all the solutions in the same thread, but it doesn't really matter to me. I changed it to "edit your answers" since that's what people seem to want. – PhiNotPi – 11 years ago

I had fun with this (PHP) then realized it doesn't qualify since the output changes based on when you run it (displays current time) _meet_Lost_leAch (need(feed)strong)lizards''meat''crate/Aeiou; – Steve Robbins – 11 years ago

Please no one post anything in NP hard languages like Brainfuck - we would be doooooomed... – corsiKa – 11 years ago

8Warning: Cops, do not use Ideone to test your submissions, as it stores your programs and other people can see them. – rodolphito – 11 years ago

@Rodolvertice Can't you set the privacy setting? – Sp3000 – 11 years ago

1@Sp3000 Had no idea that existed haha... Well it seems you need an account for true privacy (besides the link sharing secrecy option) – rodolphito – 11 years ago

1How is "hashing" defined? – Ypnypn – 11 years ago

2srand should probably count as a cryptographic function. – histocrat – 11 years ago

I love this site. – krs013 – 11 years ago

Greetings OP. Is it possible for me to start a bounty of 200 points on my answer? Here is the link: http://codegolf.stackexchange.com/a/41295/14732

– Ismael Miguel – 11 years ago

1@IsmaelMiguel You can do it in the robbers' thread, but you can wait until someone cracks it. – Martin Ender – 11 years ago

@user23013 Thank you for the edits, but you deleted the wrong link. You deleted this: http://codegolf.stackexchange.com/a/41295/14732 which is still uncracked, but you let this: http://codegolf.stackexchange.com/a/41340/14732 which was the cracked answer.

– Ismael Miguel – 11 years ago

Fixed. But it was deleted by @es1024. – jimmy23013 – 11 years ago

Answers

65

Python 3, size 74 (Cracked)

Python just wasn't the same after being re-educated by Big Brother.

Input:

print(war is peace)
print(freedom is slavery)
print(ignorance is strength)

There are two newlines at the end of lines 1 and 2.

Output:

True
True
True

Note that each True is in its own line.

xnor

Posted 11 years ago

Reputation: 115 687

1What's behind door 101? – FryAmTheEggman – 11 years ago

5I originally had 2+2==5 as a fourth statement until I found that the = made it too easy. – xnor – 11 years ago

5Nice 1984 reference. – Justin – 11 years ago

2Cracked. That was excellent. – Sp3000 – 11 years ago

52

Python 3, size 12 (Cracked)

print (abcd)

My program produces no output and no errors.

xnor

Posted 11 years ago

Reputation: 115 687

4Cracked. Nice, the solution is very counter-intuitive. – matsjoyce – 11 years ago

2Very nice, I was going for int for a while. – Fox Wilson – 11 years ago

@matsjoyce Nicely done. That was my intended solution. – xnor – 11 years ago

1@matsjoyce Yes, I expected someone would do this eventually. Still, I encourage everyone to not spoil themselves and try to solve it by hand. I assure you it's a cute solution. – xnor – 11 years ago

I think I got it. The solution I found does not work if I first type python and then type my solution at the prompt. But it does work, if I put my solution in a file and type python file. – kasperd – 11 years ago

@kasperd That's right, it works only if run from a file. Looks like you have it. – xnor – 11 years ago

41

CJam, size 20 (Cracked)

Code

"Stop, Hammer time!"

Output

2.956177636986737

Martin Ender

Posted 11 years ago

Reputation: 184 808

6Cracked. – Dennis – 11 years ago

26

Python 2, size 50

Cracked

We already know the Answer to the Question, but what's the Question?

Code

print *********************--///222222222222222222

Note that there are no trailing spaces or newlines. The only whitespace character is the single space after print.

Output

42

I've attempted to balance code length and difficulty, but it wouldn't surprise me if I missed it a bit either way. Hopefully it's enough to discourage brute force, at least.

Geobits

Posted 11 years ago

Reputation: 19 061

2Cracked – Ypnypn – 11 years ago

6This would have been better with size 42. – a CVn – 11 years ago

23

Pyth - 71 Cracked

Code

C-3P0: "Sir, the possibility,..."* 
Han Solo: "Never Tell Me The Odds!"

Output

3720

*Originally, George Lucas had Han interrupt C3-PO.**

**He called this his greatest idea since Jar-Jar.


Interesting note: despite all the changes that Pyth has gone through, there is still a valid answer here!


Original

ts,*s,y30 l" : : i i Han Solo "eP-C"h"TsrhT

Explanation

The remaining characters go on the next line. Pyth only interprets the first line of a file.

ts, make a 2-tuple and get their sum -1.
* multiply:
s,y30 l"..." sum the 2-tuple containing 2*30 and the length of the string (18).
eP-C"h"T get the largest prime factor of h's ascii value minus 10 (47).
srhT get the sum of numbers from 0-10.

All in all, this basically just computes: (30*2+18)*(47)+55-1. After reading @isaacg's answer I noticed there is an extremely simple solution: *h30tC"y" which is 31*120.

Updated

*h30tC"y" "-P:Sir, e possibilit,...
Han Solo: Never Tell Me The Odds!"
Still works even after all this time...

Sorry for poor explanation formatting, I don't know how to use spoiler blocks :S (@Sp3000 made it a bit nicer for you, though)

Now you can run Pyth online! Try it here. Thanks @isaacg :)

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

9The above may contain blatantly made-up information about the creation of Star-Wars. – FryAmTheEggman – 11 years ago

2cracked – isaacg – 11 years ago

@FryAmTheEggman You can use tags in blocks, e.g. <br> – Sp3000 – 11 years ago

21

CJam, size 51 [SAFE]

Code

main(int argc,char* argv){printf("Hello, World!");}

Output

55
2292213229222231957511222223333751125537511222222135723331131931959319319

You can play around with it in the online interpreter.

This should be more crackable than it looks.

Hint

Start with the second line of the output. A few digits don't appear in it all, and others suspiciously often. Why could that be? If you can decipher that, the rest should almost fall in place.

Solution

"that rrrrraging london Hail!v"{elccimf(;W))},(*,pa

The weather must have been pretty bad when I came up with that anagram...

The hint was supposed to point towards the fact that the second line is made up of squashed-together prime factorisations. I was hoping that from there it would be possible to determine how many and which characters go into the string, leaving only a few characters at the end.

Martin Ender

Posted 11 years ago

Reputation: 184 808

9Wait is this scrambled??? – TheDoctor – 11 years ago

18

Befunge-98, size 15 [SAFE]

Code

"quick"
*+.@\_j

Output

3314

Original

"u_ji@q.+k*c
"
A curious but somewhat well-known feature of Befunge is that you can terminate a string with the same quote that begins it, which in essence pushes that entire line (except the quote) on the stack. As an extra trick, I re-use the same string again, by making use of u to reverse the instruction pointer. Then it's just some arithmetic: the core idea is to sum up all those values (which is done using k to repeat the + operation).

FireFly

Posted 11 years ago

Reputation: 7 107

Which interpreter(s) have you tested it on, and in particular what assumptions do they make about cell bitwidth? – Peter Taylor – 11 years ago

@PeterTaylor I've tested it on cfunge under x86_64 linux. Some testing seems to indicate it uses signed 64-bit integers, although I can say that my solution doesn't depend on overflow semantics so I'm not sure if it matters. – FireFly – 11 years ago

Ok, so I shouldn't be looking for 8-bit overflows. Shame, that might have simplified it ;) – Peter Taylor – 11 years ago

Ugh. I made programs to print 3312, 3300, and several others near 3314. So close... – Justin – 11 years ago

@Quincunx excellent... :P – FireFly – 11 years ago

16

Ruby, 17 (Cracked)

Going for something really short this time.

inprt N=2,*'~~~%'

Output:

2
2

Doorknob

Posted 11 years ago

Reputation: 68 138

1Cracked. (With some help from Sp3000) – Martin Ender – 11 years ago

16

GolfScript (16 bytes) [SAFE]

%%()*../1129n{}~

Expected output:

-117345085515973157874551915956356303213327583847247840186528288852476459638212404362749

Original source:

n)~{.*911%(}./2%

Peter Taylor

Posted 11 years ago

Reputation: 41 901

Is this expected output excluding the trailing newline, or will the newline simply not be outputted? – ProgramFOX – 11 years ago

@ProgramFOX, the output will end in a newline. The only ways I know of avoiding that would require :. – Peter Taylor – 11 years ago

13

Python, 69 chars [cracked by grc]

Scrambled:

((((((((((((())))))))))))),,,,accdddiiiiillmmnopprrrrrssssssttttttttu

Output:

1083

This one's just a harmless bit of fun :) Tested on CPython 2.7.8, 3.3.2 and for the heck of it PyPy3 2.3.1.


Explanation

Uses built-in functions str, dict, list to build up a string and then applies map with ord to convert the string to a list of ints, which are then summed.

Sp3000

Posted 11 years ago

Reputation: 58 729

2Cracked. – grc – 11 years ago

12

Python, size 56 (cracked)

Code

for i in "iprint()".join(([2,3,7,0,9,chr((-7+732^70)])))

Output

hi mom

Fox Wilson

Posted 11 years ago

Reputation: 318

2Python 2? or 3? – Geobits – 11 years ago

1@Geobits, either one works. – Fox Wilson – 11 years ago

1Cracked. – user1354557 – 11 years ago

11

Python 3, 70 chars

Scrambled:

""(((())))****++++222222222;;;;;=======cccccccccceeeiinnpprrttxxxxxxxx

Output (99 chars long):

388626024960000000000026872002432000000000000676169243200000000000007317718780000000000000028820330

Update

It's been a week, so rather than posting the answer, here's a hint:

Try taking the square root of the number and working from there

Sp3000

Posted 11 years ago

Reputation: 58 729

9

Pyth, 11

\\,,"$: Ndw

Output:

",input(),"

isaacg

Posted 11 years ago

Reputation: 39 268

5Cracked. – Martin Ender – 11 years ago

9

JavaScript, 94 Cracked by FireFly

alert(' '' '''((()))+++,,,,,,,,,,,,,000111111114444577888;;;;;======[[[]]]aaafhinorrrrvvvxx||)

Output

fun in the sun

Original

a=alert;v='';r=[1,7,8,14,11,8,14,10,0,5,14,4,7,8];for(x in r)v+=('h'+(1==0)+a)[r[x]]||'';a(v);

SLuck49

Posted 11 years ago

Reputation: 901

Doesn't work on Chrome. I have the latest version. It says Syntax Error: Unexpected String – Oliver Ni – 11 years ago

I have a feeling, this won't work in all browsers/engines. What environment did you test this in? – Martin Ender – 11 years ago

Cracked. – FireFly – 11 years ago

Oh... and I was convinced you had alert first, since the indices matched up so well with the needed characters. Interesting coincidence. – FireFly – 11 years ago

I actually had it first too when I started working on it, but I changed it to reduce browser differences. – SLuck49 – 11 years ago

8

Ruby, 38 - cracked by Martin Büttner

print(succ(downcase!))$$$..[[]]6e0<><_

Output:

u

Original:

$6.pincdwnca[]rescue$><<$!.to_s[((0))]

Doorknob

Posted 11 years ago

Reputation: 68 138

Cracked. – Martin Ender – 11 years ago

1@MartinBüttner Heh, nowhere near the original indeed. But your solution is possibly even more terrifying than the original. ;) – Doorknob – 11 years ago

1Hey there's a fish – TheDoctor – 11 years ago

So the print and downcase! were red herrings. I expected the answer to use puts, did not think of $><<. – kernigh – 11 years ago

7

Python 3, size 16 (Cracked)

Code:

help tim__rolo__

Output (with newline at end):

Hello world!

matsjoyce

Posted 11 years ago

Reputation: 1 319

3Cracked. – Martin Ender – 11 years ago

1@MartinBüttner I knew someone has seen the easter egg... – matsjoyce – 11 years ago

1I hadn't, but I was quick to google it. ;) To be honest, if I hadn't been in such a hurry, I probably could have seen that the remaining characters after hello were an anagram of import. ^^ – Martin Ender – 11 years ago

7

Perl - 47 (cracked by grc)

Code (there is one space in there too)

 """"$$$$$$((()))**....///;;[[]]~==01finoprrstx

Output:

012345012345012345012345012345

You can run it online here and it does work under strict and warnings.

hmatt1

Posted 11 years ago

Reputation: 3 356

1Is this a valid solution? – grc – 11 years ago

@grc I'd say it is valid! Nice work! It prints the right thing. If you want some hints on the version that runs under strict and warnings let me know. – hmatt1 – 11 years ago

7

Ruby, 33 - cracked by user23013

enpsttux [[[]]]++\-\**????$$$$...

Output:

[*]

Original:

puts ?[+[*?*..?]][$$-$$]+?\\.next

Doorknob

Posted 11 years ago

Reputation: 68 138

Which version is this? – Lynn – 11 years ago

@nooodl I have 1.9.3, but there's nothing version-specific about this one. – Doorknob – 11 years ago

This is tough. Here's what I have so far: puts is obviously going to be the first thing there, .next is another keyword that can be used, and the rest is some sort of sorcery with ruby $ variables and character array creation.... +1 – rodolphito – 11 years ago

Cracked. – jimmy23013 – 11 years ago

@user23013 Nice! Not the original, though; I probably should have output characters that weren't actually in the source ;) – Doorknob – 11 years ago

7

Python2, 132 characters

____        ,,,,:::''""""""""""((()))[[]]\\\0126aaaabcccceeeeeeeeeEffggiiiiiilllllmmmmnnnnnnooooopppppqqrrrrrrrrrssssStttttttuuvxxyy

Output (with a newline):

chance

Updated version, 96 characters

Answer to original version suggested the exec instead of compile+eval, so here is a simplified version:

____       :::''""(())[[]]\\\0126aaabcccceeeeeeeeEffiimmnnnnooopppqqrrrrrrrrrssStttttttuuxxxxyy

Update: cracked

Fully cracked by Alex Van Liew and KennyTM. The original solutions were (scroll right to reveal the spoiler):

                                                                                                                                eval(compile('try: compile("from __future__ import braces","","single")\nexcept SyntaxError as q:\n\tprint q[0][6:12]',"","single"))
                                                                                                                                exec('try:exec("from __future__ import braces")\nexcept SyntaxError as q:\n\tprint q[0][6:12]')
                                                                                                                                The hint meant "Consider {}, which are not present in the source code".

Vi.

Posted 11 years ago

Reputation: 2 644

How many newlines are there? – Sp3000 – 11 years ago

None (not counting logical newlines like \n inside strings literals). With newlines the code could be shorter. – Vi. – 11 years ago

2+1 for not giving enough xs and cs for me to do what I want to do :P – Sp3000 – 11 years ago

1Shall I think up some hint? Let's start with a vague one: Don't count ones which exist. Count ones which do not exist. – Vi. – 11 years ago

Cracked. – kennytm – 11 years ago

7

Ruby, 29 [safe]

Trying to see how short I can get in Ruby without getting cracked.

Code

paper view
otool
$()**,.8<<=>

Output

[0][0, 3][0, 3, 6][0, 3, 6, 9][0, 3, 6, 9, 12][0, 3, 6, 9, 12, 16][0, 3, 6, 9, 12, 16, 20]

Original

eval <<p*8 o=*o,$>.write(o) p

Explanation

The first line creates a heredoc that starts on the next line and is delimited by the trailing p, then concatenates the resulting string to itself 8 times. Since it ends in a newline, this effectively creates a loop. The looped code assigns an array to the variable o, consisting of the elements in o.to_a (via the * shorthand), followed by the output of $<.write(o), which converts o to a string, prints it to STDOUT, and returns the number of bytes printed. A variable being assigned to for the first time is nil for the purpose of evaluating the right hand side, so on the first run *o is empty and write outputs nothing and returns 0. Each subsequent round outputs the array of bytes output on previous rounds. Using a p-delimited heredoc creates decoy methods for output, p and $><<, in the scrambled characters, that won't work because you need the bytecount.

histocrat

Posted 11 years ago

Reputation: 20 600

6

Perl, 36 ← cracked by grc

Code

$$$()++..112279;;<<=__ffiinooprrrt{}

Output

perl

Tested here

r3mainer

Posted 11 years ago

Reputation: 19 135

Finally cracked. – grc – 11 years ago

6

Haskell, 100 Chars (Invalid, output too long)

Code

//Sup
tl=[]
while(syn==(+j)) tl+=b.a();
//(: #jquery :)\\
$("#jquery").on("click", j=>alert(j==m))

Output:

"\er\\e\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\\"\\\\\\\


Original

(#)=(>);(//)=(++)
l=j.show
main=putStr.l.l$l"eer"
j[]="\\"
j(y:u)=let(q,c)=break(#y)u in y:j c//j q

Zaq

Posted 11 years ago

Reputation: 1 525

5

I thought for a moment that I'm reading "Evolution of Hello World" question.

– Vi. – 11 years ago

1@Vi yeah, but I think that the Levenshtein distance is a tiny bit more than 7 in this post. – Zaq – 11 years ago

1Output is longer than 100 chars – Lynn – 11 years ago

@noodl OOPS! I had an extra period in the scrambled version. I'm really sorry to anyone who tried to unscramble this with the extra character. The original program does have 100 characters. – Zaq – 11 years ago

1@Zaq: the size limitation is not on code size, it's on output! – Lynn – 11 years ago

@nooodl Oh wow. I totally overlooked that. I guess that makes my submission invalid :/ I'll go ahead and post the code then – Zaq – 11 years ago

1Huh. And I guessed you did something with fix show. Definately uncrackable – proud haskeller – 11 years ago

6

PHP, size 49 [Cracked by Martin Büttner]

Code

sub(print2w, $+expect+$+one+$+str+$+in=$@~main$);

Output

{main}

bwoebi

Posted 11 years ago

Reputation: 1 721

Would you mind disclosing which PHP version you tested this with? – Martin Ender – 11 years ago

@MartinBüttner I won't specify the exact range, but everything from 5.3.0 up will have the correct result. – bwoebi – 11 years ago

3Cracked. Only took like... 4 hours... – Martin Ender – 11 years ago

@MartinBüttner wow, congratulations! Didn't expect you to not give up. :-) – bwoebi – 11 years ago

6

CJam, 32 bytes (cracked)

Scrambled source

"Beware the Jabberwock, my son!"

Output

4074552392882954617076720538102062920

Dennis

Posted 11 years ago

Reputation: 196 637

2Hm, where did you get the idea for using a quote as scrambled CJam code. ;) – Martin Ender – 11 years ago

1Cracked – jimmy23013 – 11 years ago

@MartinBüttner: That's a line from a poem, not a movie quote. Entirely different! – Dennis – 11 years ago

@Dennis Wait, mine wasn't from a movie either. (Not exactly from a poem, though. :D) – Martin Ender – 11 years ago

6

MATLAB, 41 bytes

Cracked by feersum

((((((snowy leopards can like magic))))))

Output

1

COTO

Posted 11 years ago

Reputation: 3 701

Cracked – feersum – 11 years ago

6

Pyth - 35 - Cracked

In the spirit of @MartinBüttner:

Code

"Programming Puzzles and Code Golf"

Output

4.459431618637297

Try to decode it online here.

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

I've cracked it, but in the interest of getting more people to use Pyth, I'm temporarily removing my answer. – isaacg – 11 years ago

Alright, cracked.

– isaacg – 11 years ago

6

J, 22 bytes

Code

!%()1348:::bbceehorvxx

Output (97 chars)

1226317306651180983274420265228191056569220222873505571155987454033425908908110103433163350999040

I expect this to be practically impossible...

FireFly

Posted 11 years ago

Reputation: 7 107

5

Python 2 - 61 Cracked

Code

r~s]l][]:.c[():sit_'3-'(pt_trp.l]2-~n:][.i':o:p0Te[d_u1[.')i_

Output

get

Original

print''.__doc__[::2][::3].split()[1].split('.')[0][:-~-~True]

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

Cracked. – grc – 11 years ago

Outputs s> in Python 3.4 – CodeManX – 11 years ago

@CoDEmanX Yes, I wouldn't expect this to work in Python 3, which is why I specified Python 2. – FryAmTheEggman – 11 years ago

5

TinyMUSH 3.1, 20

Scrambled:

(#ret,#3!#+#2i\2#,@)

Output:

3210

Muqo

Posted 11 years ago

Reputation: 499

6How are we supposed to run this? Where is the language reference? (The link doesn't help here). – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

3

@n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀h You can run this code by connecting to a MUSH running the appropriate TinyMUSH version. Browse here to find one where Server Type is "MUSH", or download the server source from here and run a MUSH yourself.

– Muqo – 11 years ago

5

CJam, 19 (Cracked)

Code

JJ2334567899#%**~""

Output

500827930823087774653348

Ypnypn

Posted 11 years ago

Reputation: 10 485

Sorry, but cracked in the last minute. – Martin Ender – 11 years ago

5

Grass, size 134 [safe]

Code

WWWWwwWwWwWWWwWWWWwwwWwWwwwWwwwwwWWwWwwWwWWwWwwWWwwwwWwwwwWwwwWWwwwWwwwWWwwwWWWWWWWWwwWWwwwWwWWWWWwWWWwWWwwwwWWWwwWWwwwWwWWWwWwwwWWWWW

Output

wwwwwwwwwwwwwww

Tested in the Python interpreter.

Solution

wWWWwwwwWwwwwwWwWwwwwwWwwwwwwwwWWwWWWwWWWWwWWWWWWwwwwwwWwwwwwwWwwwWWwWWWwWWWWwWWWWWWwwwwwwWwwwwwwWwwwWWwWWWwWWWWwWWWWWwWWWWWWwWWWWWWWw

I wonder if anyone has tried...

jimmy23013

Posted 11 years ago

Reputation: 34 042

This is straight up cruel. Good job. – Alex Van Liew – 11 years ago

Your program is safe now. You should post your code to protect your submission. – None – 11 years ago

5

Python 3, size 44 [cracked by feersum]

Scrambled:

print(((((((((((((()))))))))))))),,<<<<<<<~~

Output:

3

I'm trying to make Python look more like LISP.


Explanation

This one relies on Python's use of implicit conversion. ()<((),) evaluates to True, and applying << [bitshift] implicitly converts True to 1.

Sp3000

Posted 11 years ago

Reputation: 58 729

Cracked – feersum – 11 years ago

1@feersum Fast :P – Sp3000 – 11 years ago

5

Python 3, length 110 [cracked by grc]

Scrambled (\n denotes a newline)

\n\n\n   ""((((())))),.......9::;===IOS[]__addeeegghiiiiiiiiijllmmnnoooooooppprrrrsssssssssstttttttttttuuuuuvwyyy

Output:

The better is Flat dense. break never of be do at never. If bad it honking

Here's another fun one - not meant to be hard, but just something unusual and puzzly. :)


Explanation

The random-looking words are taken from the Zen of Python (PEP 20), which is automatically printed via the easter egg import this. The passage is just every ninth word, as hinted by the 9::[] present.
To extract every ninth word without automatically printing the passage when importing, we redirect sys.stdout to a StringIO().

Sp3000

Posted 11 years ago

Reputation: 58 729

Cracked – grc – 11 years ago

5

GolfScript, 20 bytes [safe]

Code

...[[]]{{}}&%%++++5i

Output

32

Output does not have a newline character in the end.

Inspired by this comment.

Solution

.{5i[+]+}.%{}++[.%]&

jimmy23013

Posted 11 years ago

Reputation: 34 042

5

Javascript, 29 - Cracked

Run in a Chrome browser console

Code

23*47,(no,(.][j,i|i,j][.),on)

Output

181

Original code

[,,,].join(3)|[,4,].join(7)*2

Joe

Posted 11 years ago

Reputation: 103

Cracked. – Martin Ender – 11 years ago

5

JavaScript, 73

Code

console.log((((((('[[.....=-,,]]'+'02aaceeeeeefiiijllopprrrrssttv')))))))

Output

denied

Michael M.

Posted 11 years ago

Reputation: 12 173

Cracked. – FireFly – 11 years ago

5

JavaScript, 31 bytes (SAFE)

Code

'([(102)])prenatal.gecko'tonsil

Output

j

Should work in any browser console, although it is a standalone program.

Original source

alert('0acegnos'.link(top)[12])
The characters in the string are red herring, so it wouldn't be obvious what functions were used. It uses the little-known link function, which makes an HTML <a> element. The top object is converted to a string as [object Window], and added as the <a> link, the twelfth character of which is j.

NinjaBearMonkey

Posted 11 years ago

Reputation: 9 925

1Just double-checking, is the code missing a third o by any chance? – Martin Ender – 11 years ago

@MartinBüttner No it's not. – NinjaBearMonkey – 11 years ago

Very clever... maybe try for a shorter one now? – mbomb007 – 11 years ago

4

PHP, 53 (Cracked)

Code

o3o5do=++,"oodr=f(+$fni9$d;$9=d9$$%rp7<o$t=$);$,")5(;

Output

571349220413226117734422843528553434864141775449210755731225661136475615328581707

PleaseStand

Posted 11 years ago

Reputation: 5 369

1Cracked it :-) – r3mainer – 11 years ago

4

PowerShell 182 [safe]

but definitely not the winner

''-join%{[char]};;|$()$a$a$a$c$c$c$_===+;    0-82,-82,-75,-70,-68,-68,-65,-15,-11,-11,-11,-11,-9,-7,-7,-7,-6,-6,-6,-2,-1,-1,0,1,1,7,8,8,8,11,13,13,13,15,21,25,48,65,79,80,80,80,80,80

Output

Peter Piper picked a peck of pickled peppers

Solution

$a = 0;$(80,21,15,-15,13,-82,48,25,7,-11,13,-82,80,-7,-6,8,-6,-1,-68,65,-65,80,-11,-2,8,-75,79,-9,-70,80,-7,-6,8,1,-7,-1,-68,80,-11,11,0,-11,13,1|%{$c=$a+$_;$a=$c;[char]$c}) -join ''

SomeShinyObject

Posted 11 years ago

Reputation: 953

You program is safe now. You should post your code to protect your answer. – None – 11 years ago

4

Golfscript, 32

Code

  *++..0011125::::;;;?bbbbcccc{}

Output

1993841993677373809355710590420516863199384199367737380935571059042051686311

Beta Decay

Posted 11 years ago

Reputation: 21 478

4

PHP, size 23 [Cracked]

Code

echo@$b=$b.$c,$c=$c.$c;

Output

bbbbb

bwoebi

Posted 11 years ago

Reputation: 1 721

Ah, that was unfortunate. I've got it now, but I can't submit again. – Martin Ender – 11 years ago

@MartinBüttner How did you then get it now? (Do you even know why it works?) – bwoebi – 11 years ago

well I just got it by experimenting a bit more. I don't get what I need the @ for, I have no idea why concatenating undefined constants work and I wasn't aware that you could have more than one $ in a variable name, but otherwise, it's pretty clear. ;) – Martin Ender – 11 years ago

@MartinBüttner the @ is just for avoiding notices. I wonder if there was another solution than my original, so I asked. – bwoebi – 11 years ago

Yeah I thought @ suppresses errors and stuff, but it seems like the online tester I was using doesn't print them anyway. – Martin Ender – 11 years ago

1Cracked. – jimmy23013 – 11 years ago

4

JavaScript, length 32 (cracked)

alert('HaVobp'.match(/[HaVt]+/))

Output

puGiXm

NinjaBearMonkey

Posted 11 years ago

Reputation: 9 925

Is this testable in browser console? – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

Cracked it! – r3mainer – 11 years ago

4

C, 70 (Cracked)

Code

C='g'-pf;main(hx){ok,the(hot)Cake isA lie;forC*-g.=+:;prntf("%d",40);}

Output

40135

Original Solution

main(h,r){float C=h;ek:C+=0xA.ep4;if(h--)goto ek;printf("%g",C*'sd');}

es1024

Posted 11 years ago

Reputation: 8 953

1Cracked – feersum – 11 years ago

4

C++11, size 104 [safe]

Code

<<<<<<==>>  ,,,,,,;;:::::?.""(){}\&&##07aabcccccddddddeeeeehiiiiillllllmmnnnnooorrsssssttttttttttuuuux

And two newlines.

Compiled with g++ --std=c++11.

Output

hello
hello
hello
hello
hello
hello
hello
hello
hello
hello

I thought I should have printed something better than hello.

Solution

#include<iostream>#\><

struct u{int t=std::cout<<"hello"<<std::endl&&7;}l,d,s,c,b,main=d.t?exit(0),l:c;

Someone please explain how it works to me...

jimmy23013

Posted 11 years ago

Reputation: 34 042

1I tried this one; I was unable to find the answer, but it inspired me to write this C program: `#include <stdio.h> main(x) { bsearch("hello\n", &x, 1000, 1, printf);

}` – feersum – 11 years ago

Is there a trailing newline? – Mike Precup – 11 years ago

@MikePrecup Yes. – jimmy23013 – 11 years ago

4

CJam, size 19 (Cracked)

Code

"Can't touch this!"

Output

hunt 12tacos

(Probably not as difficult as the last one, but I had to post a sequel.)

Martin Ender

Posted 11 years ago

Reputation: 184 808

It's taco season - Elmer Fudd – FryAmTheEggman – 11 years ago

Cracked. – jimmy23013 – 11 years ago

4

CJam, 34 bytes (cracked)

Scrambled source

""Beware the Jabberwock, my son!""

Output

1.0245778622239579

Dennis

Posted 11 years ago

Reputation: 196 637

Guessing its the same concept as Martin's – Optimizer – 11 years ago

@Optimizer: Certainly inspired by it, but hopefully much more difficult to unscramble. – Dennis – 11 years ago

1The jaws that bite, the claws that catch! – Doorknob – 11 years ago

2Cracked, with Martin's idea. – jimmy23013 – 11 years ago

4

Ruby, 43

Code

*+89*:%t(|in set{2e0--1e2}|*.prime?<~1)(25)

Output

11010100010100010100010000010100000100010100010000010000010100000100010100000100010000010000000100

Hint

The scrambled code (after the first few characters) describes the output. For each number in the set of natural numbers between 2e0 and 1e2 (2 to 100), output a 1 if it's prime and a 0 otherwise, for 25 primes in total.

Original Code

98.times{|e|print (2**e*~-5-1)%(e+2)<2?1:0}

Explanation

I learned this trick from leonid's answer on an Anarchy Golf problem. The code doesn't actually do a valid prime check, it uses the Fermat Primality Test in base 2, which is probabilistic but is correct up to 341 or so.

histocrat

Posted 11 years ago

Reputation: 20 600

4

Ruby, 35

Code

}||{yyssplliihhddaa____][>====:.-)(

Output

shadilyshadily

histocrat

Posted 11 years ago

Reputation: 20 600

3Methinks the scrambled code should have ended with >:-) – DLosc – 11 years ago

Cracked. – Martin Ender – 11 years ago

4

JavaScript, 69 Cracked by FireFly

Code

grr('action rat')''(((())))*++++00001122333355566677====S[[]]ffffffxx

Output

"nananananananananananana batman"

Run in browser console (string result is REPL), tested in Chrome 38, Firefox 33, and IE11

SLuck49

Posted 11 years ago

Reputation: 901

@MartinBüttner Shoot, you are absolutely right (fixed) – SLuck49 – 11 years ago

Cracked. – FireFly – 11 years ago

4

JavaScript, 79 bytes [safe]

Another one, for fun. Might be similar to Shawn's 69 (at least I got the idea while working on it and not succeeding). Outputs using alert, which is already unscrambled for your convenience.

Code

alert(0123)
//((((()))))++...3566777===[[[\]]]
//accefffgggghhhhiiklmnnoorrstuw

Output

underhanded

Hint

Here's a hint: think of substitution ciphers.

Solution

for(f
in(g=/56732106737/.source+(h=[])))h+=g.link().match(/\w/g)[g[f]]
alert(h)

The digits in the regex pattern correspond to indices in the string g.link() aka <a href="undefined">56732106737</a>. "underhanded" uses only characters reachable by indexing with single-digit numbers into this string (most from "undefined").

FireFly

Posted 11 years ago

Reputation: 7 107

4

Perl - 26 bytes (cracked by choroba)

p:rlq{not goto p,if$a>=$b}

Output

potato

primo

Posted 11 years ago

Reputation: 30 891

3

CJam, size 15 (Cracked)

Code

6789%%%++:,{{}}

Output

882

Ypnypn

Posted 11 years ago

Reputation: 10 485

1Cracked. – Martin Ender – 11 years ago

3

CJam, size 52 (cracked)

Code

,,,,,;::::'""))@*\&%+++++333333333333333333ccffffffm

Output

0!1"2#3$4%5&6'7(8)9*10+11,12-13.14/15016117218319420521622723824925:26;27<28=29>30?31@32A

jimmy23013

Posted 11 years ago

Reputation: 34 042

1Cracked. – Martin Ender – 11 years ago

3

SAS, 17 (Cracked)

%%()1;>>aabelptuv

Outputs 0

user3490

Posted 11 years ago

Reputation: 809

Is this actually a full program? From what I read here it looks like any full SAS program needs at least two semicolons, as well as some sort of RUN directive.

– Martin Ender – 11 years ago

Yes it is, and what makes you think that two semicolons are needed? There's more to SAS than procs and data steps, as suggested on that page... – user3490 – 11 years ago

Just checking. I don't know the first thing about SAS, and after skimming that first section it sounded like that's the structure of any SAS program. – Martin Ender – 11 years ago

3

It is a program, and it's been cracked. http://codegolf.stackexchange.com/a/41199/32668

– ConMan – 11 years ago

3

Coffeescript - 96

There might be more than one way to solve this one. It's also pretty long, but hopefully it will survive cracking for a while.

Output:

5299944725070263763912242111215369742359896456157909233296841284031194827848086

Program characters: (note \n is a newline and \s is a space):

j\n][j9\sa='';]4j90].[.[i\n1].=iaa[]e]9i[9\sa]\s9t][ia2]n.8v\nan.fa=ar%,i\s1%=l+o.\s[09[j],+v%[\sroj,[9i.

Or without \n and \s:

j
][j9 a='';]4j90].[.[i
1].=iaa[]e]9i[9 a] 9t][ia2]n.8v
an.fa=ar%,i 1%=l+o. [09[j],+v%[ roj,[9i.

soktinpk

Posted 11 years ago

Reputation: 4 080

In the scrambled code, I accidentally put a 2 instead of a 4... sorry about that. It's fixed now. – soktinpk – 11 years ago

1I'm pretty sure it's impossible to crack some of these submissions with more than 50 characters. – soktinpk – 11 years ago

3

Marbelous 45 [SAFE]

Chars

^^^^^^^^^^!!&&000004459:<<<>>>\\EE//V{{{{}}}}

Each ^ is a placeholder for a newline.

Output

Z{-8H`

Source

44 {} :{} }0E5 << }0 E9 &0&0 >>\/ >V!! /\{<{0

{} is a board that calculates (((}0 * 3 - 23) mod 256) - 27)/2. This is a Linear Congruential Generator, with its output modified to fit in the printable ascii range more often. The program terminates at the first output that is not a printable ascii character.

JS Marbelous Interpreter

This requires cylindrical boards (i.e. marbles pushed off of the board on the left reappear on the right and vice-versa).

es1024

Posted 11 years ago

Reputation: 8 953

This is safe now, so you should post your program to protect your submission. – None – 11 years ago

3

Python 3, size 48 (Cracked)

#print(']'2p/')'\xdh))2[:roo,h+(2*e'rw)/r(d'o(()

Output

head

Hopefully this one lasts a bit longer...

Kyle G

Posted 11 years ago

Reputation: 761

1Cracked. Pretty sure this is the intended answer. – Sp3000 – 11 years ago

3

C++, 192 chars (Cracked)

Code

#include<stdio.h>
#define d double
(){return ;}(){return ;}int main(){printf("%.15f",));}       %(((((()))))****,,,,,,,,,,,-----..///000011122234477777::>??dddddfffggggiiiiiiiiiiinnttxxxxxxyyy

Output

3.141592653589793

jcai

Posted 11 years ago

Reputation: 973

Cracked – feersum – 11 years ago

3

GolfScript (13 bytes) (Cracked)

&+,,../224?{}

Expected output:

1234260885218145824583458445854586253225388392299142924142925142926142927142928302928497409497409

Peter Taylor

Posted 11 years ago

Reputation: 41 901

Cracked. – Martin Ender – 11 years ago

3

Marbelous, 37 [safe]

Code

^^^^^^^^!!-0002:::<<<<>>>>\F///WW{{}}

^ represents a newline; no ^s are to be used.

Output

lHp`

Original Source

F2 >: :>: }0 <<}0 -W// << >W!! /\{0{>

This passes 0xF2 into the board >:, which finds 2*(3*}0-32) mod 256, checks to make sure the result is greater than 32, and if so, outputs it down and left. The down marble is emitted as a character, and the left character is passed into >: again.

JS Marbelous Interpreter

This requires cylindrical boards (i.e. marbles pushed off of the board on the left reappear on the right and vice-versa).

es1024

Posted 11 years ago

Reputation: 8 953

3

C, 51 (cracked)

Code

f;main(h,taxgpl) {for(c=90;c;c++) printf("%.d",h);}

Output

8065

Original Solution

main(h,dr){float c=+h+0xf.cp9;;; printf("%g",(c));}

es1024

Posted 11 years ago

Reputation: 8 953

cracked – Art – 11 years ago

@Art congratulations! – es1024 – 11 years ago

I was trying to abuse argc being 1, but I hacked up my solution on a machine with clang and it refuses to accept non-standard definitions of main. It was a neat puzzle. I almost gave up after I spent two hours trying to do something like c=0xfbc; .. printf("%d", c + c + 9); but there was no "b". Was that on purpose? If so, it was a great tarpit. – Art – 11 years ago

3

PHP, 44 [SAFE]

Code:

""(())46;=BFGHNOWWZ_aaabbcddeeeejjloopssvwyy

Works on PHP 5.3-5.6. A bit long, but I hope it's difficult.

Output

4096

Original code

eval(base64_decode("ZWNobyBwaGFyOjpHWjs=")); which is the same as: eval(base64_decode(base64_encode("echo phar::GZ;")));

Explanation

The code will print predefined constant GZ of Phar class which is just compression constant (0x00001000 = 4096). Then the code is encoded with MIME base64 text format and eval'ed (executed). Note that base64 is data encoding format (not hashing or cryptographic function).

kenorb

Posted 11 years ago

Reputation: 398

1I wrote a script to test every program beginning with ZWNoby. But I excluded programs containing :: because :: at the wrong place would generate a fatal error, and I didn't think there is a :: in the answer... – jimmy23013 – 11 years ago

3

Java - 70 bytes

.;{({([(pentagrams are cool)])})};. Sivintilituscimt Spunsimtsbuncyndt

output:

s

no quotation marks? What sorcery is this???

rodolphito

Posted 11 years ago

Reputation: 795

Cracked – feersum – 11 years ago

3

Ruby, 45

Code

%()[]./ 0123456789_abcdefghijklmnopqrstuvwxyz

Output

9410663329978946297999932

Original Code

p %q[zyfnhvjkwudebgmacsxrl].to_i(36)/51074892

See charredUtensil's hack attempt in the comments for a great explanation. And yes, I generated the code randomly. I hoped the "pangram" approach would paralyze people with the number of options.

histocrat

Posted 11 years ago

Reputation: 20 600

1Cracked by charredUtensil. – FireFly – 11 years ago

Almost cracked, but not quite. And time's almost up. – histocrat – 11 years ago

3

Python, size 60 [safe]

Scrambled:

\n    ((((()))))***,-0123:=____aaaabdegiilmmmnnoopprrrrsttttu

Output:

1177652997443428940314

This probably still falls on the moderately-okay-to-crack side, but I thought the idea might be interesting. \n is a newline.


Solution

The number, searchable on OEIS, is the sum of the first 23 factorials. To implement a factorial function without any ifs for the base case we use Python's short circuit evaluation and the quirk that 0**0 evaluates to 1.
t=lambda _:0**_ or _*t(_-1)or i print(sum(map(t,range(23))))

Sp3000

Posted 11 years ago

Reputation: 58 729

Does this work in both versions of Python, or just in Py2? – DLosc – 11 years ago

1@DLosc Should work on both versions. I tested on 2.7.8 and 3.3.2 – Sp3000 – 11 years ago

3

QBasic, 42 bytes (Cracked)

I am having way too much fun here.

Code:

FAIR
N=PATERN"QBasic!"TIME 2 OR 1+1
HOUT N

... including 2 newlines. (This is written in a new dialect of QBasic that allows you to use nonstandard English, redundancy, and misspelled keywords as long as you tell the compiler that it's all FAIR.)

Output:

QBasic!
QBasic!

... including a trailing newline.

DLosc

Posted 11 years ago

Reputation: 21 213

Cracked. – jimmy23013 – 11 years ago

3

SAS, 28 (SAFE)

%1(STAR)SPY,&2STUD;BUNNIES,%

Outputs I

(that's capital letter i)

Solution:

%PUT%SUBSTR(&SYSENDIAN,2,1);

Which outputs the second character of the automatic macro variable SYSENDIAN (which takes the values BIG and LITTLE) to the log.

ConMan

Posted 11 years ago

Reputation: 203

Going to give this one more day, then add the solution. – ConMan – 11 years ago

Well, I'm safe. – ConMan – 11 years ago

3

JavaScript, 28 Cracked by Martin Büttner

Since my other submission was cracked, here's another.

Code

eval(atob('[every thing]'));

Output

1

Run in browser console (result is REPL), tested in Chrome 38 and Firefox 33

SLuck49

Posted 11 years ago

Reputation: 901

Cracked. – Martin Ender – 11 years ago

3

JavaScript, 46 characters [Cracked]

This one is easy, so I expect it to be cracked quickly.

Code

//terser code..
alert(the union fears dwarves)

(includes newline)

Output

ordered

FireFly

Posted 11 years ago

Reputation: 7 107

Cracked. – PleaseStand – 11 years ago

3

Python 3 - size 34 [cracked by FireFly]

Scrambled:

print(....__str__)
[[(4,)=={-6}]];

Output:

.

The scrambled code runs fine, but it's not what you want ;).


Intended solution

Awkwardly, my red herrings backfired on me, and I only realised a few minutes after posting.
The intended solution was:

_={};_[6.,...]=_ print(str(_)[-4])

If we print out _, we get:

{(6.0, Ellipsis): {...}}

If you add a list or a dictionary to itself in Python, the string representation replaces that part of it with ...! Yes, that means you can do things like:

a=[] a.append(a) print(a[0][0][0][0][0][0][0][0])
:)

Sp3000

Posted 11 years ago

Reputation: 58 729

Cracked. :) – FireFly – 11 years ago

Ah... I should've thought of that too.. since I've seen similar things (recursion detection) in other pretty-printers. Didn't occur to me that it'd be represented with an ellipsis. Nice one, too bad about the not-so-red herring. – FireFly – 11 years ago

3

Mathematica, 73 72 bytes [Safe]

(I miscounted the bytes when I made the post.)

Code:

""""#&()*,,01>@@@@@[[]]`StrongSolemnNiceLustyTensorSextetNastiesEastCamp

Output:

0.5 + 14.1347 I

Original code:

N@(ToExpression@Last@Select[Names@"System`*",StringCount[#,"eta"]>0&])@1

jcai

Posted 11 years ago

Reputation: 973

3

Java, size 134 (Cracked)

Code:

"''"{}{}[]()()()()()() <<<<<<< +++-===^ ..;;;; 11113444578999 aaaaabcccccdefgghhhiiiiiiiillmmnnnnnnnnnooopprrrrrrrssssSSStttttttttuuvy

Output:

^74
^376
^2280
^17512
^139368
^1114216
^8913000

Olavi Mustanoja

Posted 11 years ago

Reputation: 149

What's the whitespace in the output? A trailing \n / (char)10 on each line? – Peter Taylor – 11 years ago

@PeterTaylor a trailing newline, yes – Olavi Mustanoja – 11 years ago

There are only 134 characters in the list. Is there some missing whitespace? – feersum – 11 years ago

@feersum Oops, my texteditor gave me a wrong number :/ fixed – Olavi Mustanoja – 11 years ago

Cracked – feersum – 11 years ago

3

Ruby, 33 [safe]

Code:

&(())*09:==_yogurt puns...perturb

Output:

[0, [0]]
[1, [1]]
[2, [2]]
[3, [3]]
[4, [4]]
[5, [5]]
[6, [6]]
[7, [7]]
[8, [8]]
[9, [9]]

Source:

e=r=p *(0..9).group_by(&:untrust)

Explanation:

e=r= is red herring filler (chosen to create the anagram "puts group_by return"). (0..9).group_by takes a block, passes each number from 0 to 9 into it, and creates a hash mapping distinct outputs of the block to the input. But instead of a literal block, I'm using the & syntax, which calls to_proc on the :untrust symbol to create a proc that "taints" each thing passed into it (which does nothing in this context), and returns the input. So each item in the range gets its own bucket. p * then converts the hash to an array of arguments of the form [key, value_array], and prints each on its own line.

histocrat

Posted 11 years ago

Reputation: 20 600

3

Ruby, size 17

Code

$$$$--::<<>>??Wip

Output

1

Stephen Touset

Posted 11 years ago

Reputation: 161

Cracked. I'm really interested in the original code though. ^^ – Martin Ender – 11 years ago

3

CJam, size 51

Thought I'd give this a shot!

Code

""%)))))****+++,/::@ABBBBJJSSUWYYYZZ[]____accdeimos

Output

Bond, James Bond.

Optimizer

Posted 11 years ago

Reputation: 25 836

Cracked. – jimmy23013 – 11 years ago

3

Python shell: 15 chars

I had this strange urge not to include any 0's, 3's, or 7's.

11124455566899^

Output (to shell):

339018

xnor

Posted 11 years ago

Reputation: 115 687

Cracked. – es1024 – 11 years ago

3

CJam, 19 bytes (SAFE)

Code:

%\@_@){;_0}*__*)\15

(A few smileys survived the factory explosion...)

Output:

10120125854501259106171741725012526265263117252614371738261720339343012

Solution:

1_{_@)_@_*)\%}50*\;

Calculates and concatenates together the first 51 terms of the following sequence:

a[1] = 1
a[n] = (a[n-1]**2+1)%n

The sequence increases rapidly, but every time a[n] gets above n, it gets knocked down again by the modulo operation. Here's the same thing with spaces inserted:

1 0 1 2 0 1 2 5 8 5 4 5 0 1 2 5 9 10 6 17 17 4 17 2 5 0 1 2 5 26 26 5 26 31 17 2 5 26 14 37 17 38 26 17 20 33 9 34 30 1 2

DLosc

Posted 11 years ago

Reputation: 21 213

3

Perl - 21 bytes (safe)

~$is^*peter**+working

(the above evaluates to 1, btw)

Ouput

65534

Original

s**$~^wkirgo*ee+print

Explanation

The code performs a substitution which is evaluated, and then the result of that is evaluated (ee). The variable $~ starts its life as STDOUT, so that $~^wkirgo evaluates to $?-=2;.

The variable $? is also special, in that it is stored internally as an unsigned short. Decrementing it by two wraps around to 65534.

primo

Posted 11 years ago

Reputation: 30 891

3

J - 14 char

Going for the gold. Edit: I have been recently made aware that this code performs differently depending on whether you are using a 32-bit or 64-bit version of the latest J (j803). If this is grounds for disqualification, let me know: otherwise, I would concede a crack as an unscrambling that gives the correct answer on at least one of the two versions.

Scrambled:

7*8..?56!/x\+/

32-bit output:

2704156

64-bit output:

2722721

algorithmshark

Posted 11 years ago

Reputation: 8 144

I suspect the fact that it makes 2 different answers has do with the fact that the answer is really big, which would make sense if it uses factorial. – Bijan – 9 years ago

Does this code always produce the same output? (I'm no expert in J, but I thought ? was used to generate random numbers)

– r3mainer – 11 years ago

@squeamishossifrage Yes, that's correct, and yes, it always produces the same output. – algorithmshark – 11 years ago

2

CoffeeScript, size 25 [Cracked]

Code

the terse tales // [.]

Output

false

You can try it out here in the "Try CoffeeScript" tab.

Martin Ender

Posted 11 years ago

Reputation: 184 808

1Cracked. – NinjaBearMonkey – 11 years ago

2

Python 3, size 37 (Cracked)

Code:

int(22 ** 2 ** 2+range(irr)[]__npof_)

Output (space separated):

0 1 4 9 16 25 36 49 64 81

matsjoyce

Posted 11 years ago

Reputation: 1 319

2Cracked. – xnor – 11 years ago

@xnor Sorry, nope. – matsjoyce – 11 years ago

@matsjoyce it is now, see the comments. – isaacg – 11 years ago

2

JavaScript, 26 (cracked)

later(103>(8-9)&80>4|10>9)

Output

999

NinjaBearMonkey

Posted 11 years ago

Reputation: 9 925

Cracked. – jimmy23013 – 11 years ago

2

PHP, Size 14 (Cracked)

aaaaaa:::::??;

Prints nothing when notices are turned off (no warning or fatal error messages).

Tryth

Posted 11 years ago

Reputation: 750

Cracked. – PleaseStand – 11 years ago

@PleaseStand Wrong link — try this instead

– r3mainer – 11 years ago

2

Golfscript - 20 (Cracked)

"open world thrill!"

Output

hello world!

Josiah Winslow

Posted 11 years ago

Reputation: 725

Cracked. – NinjaBearMonkey – 11 years ago

2

Lua 5.2.3, Size: 18 chars (Cracked)

pghmint(rat.hue)<3

Output:

true

DivideByZero

Posted 11 years ago

Reputation: 121

1Cracked. – NinjaBearMonkey – 11 years ago

Correct. Just saying that because you didn't get a chance to test it. – DivideByZero – 11 years ago

2

JavaScript, 61 (Cracked)

Code

x=next facile tortuously inept encrypter.{}()()()()(4-1);;ffo

Output

ring

jsh

Posted 11 years ago

Reputation: 889

Pretty sure that the last t is supposed to be o instead. Please correct me if I am wrong. – Optimizer – 11 years ago

2Cracked based on the above assumption. If my assumption was wrong, I will remove the answer and this comment. – Optimizer – 11 years ago

You're correct. Sorry I really messed that one up trying to be clever with the anagram. – jsh – 11 years ago

Heh, no issues. I knew that the only way to get String is with two typeof on a function. – Optimizer – 11 years ago

1FYI the original used typeof(typeof 1) – jsh – 11 years ago

2

APL, size 17 (Cracked)

Code

, (())****\+33333

There is a space

Output

27 3 3 4.434264882430378e+38

Tested here.

jimmy23013

Posted 11 years ago

Reputation: 34 042

4Cracked. Finally. – Geobits – 11 years ago

2

PHP (>= 5.3.0), 52 (cracked by bwoebi)

Code:

 $$(((())))*+++,12345:;;<<<@@___cfghiiiinooopprrrttw

Output:

abcdefgh

Original:

_:print_r(chr(3*pow(2,5)+@++$i));if(@$i<4<<1)goto _;

kenorb

Posted 11 years ago

Reputation: 398

1Cracked – bwoebi – 11 years ago

2

Python 3, 37 bytes [cracked by Bhante Nandiya]

Scrambled:

""((((()))))....abefiilllmnnprrssttuz

Output:

433

Trying some shorter Python submissions. Tested on Python 3.3.2 and Pypy3 2.3.1 (just in case).


Explanation

Solution : print(sum(b"a".zfill(len(str(...)))))
Uses the b"..." notation for bytes, which unlike strings can be summed and also the ... Python Ellipsis object.

Sp3000

Posted 11 years ago

Reputation: 58 729

cracked – Blake Walsh – 11 years ago

2

Perl 5, size 27 (cracked)

print(rar(pizza))=~--'tanz'

Output:

ohm

Works under use strict.

Morot

Posted 11 years ago

Reputation: 21

cracked by Wumpus Q. Wumbley print'pin'=~tr(a-za)(za-z)r – hmatt1 – 11 years ago

2

Python 2, 101

Code

"rne) n(sxx+ai(cpi)% ( *2n+f 1 )corii\.5n /r +5xeini+"h(5te4437f3)xjxo2]2or[)%(#"g r"+"lf/r2 # 1xn"h5

Output

'4
[#
;4
E4
##
Y4
c4

Mateon1

Posted 11 years ago

Reputation: 323

I can match the output but for one character. :( It feels like I've tried everything, but I'm not even sure if I'm close to the intended answer. I give up now. Please feel free to call this safe. I'm really interested to see the solution. – Emil – 11 years ago

2

Ruby - 58 (Cracked)

puts 00000000111222344455556677888889^^^^aacdddddefffxxxxx

Yeah you need to xor the hexadecimal literals in this one...

Output:

1436068433

Hope this lasts more than my last one...

rodolphito

Posted 11 years ago

Reputation: 795

Cracked :-) How long did the last one survive? – r3mainer – 11 years ago

@squeamishossifrage 2.5 hours… It lasted even shorter than the last one ;-) – bwoebi – 11 years ago

2

Ruby, 37 (Cracked by DLosc)

p00t1s ^u^110222333444555666777888999

A lot like my other ruby answer, but this time with normal numbers :)

Output:

6809101718

I believe this type of answer is uncrackable without brute force, if you can prove me wrong kudos to you! :)

Apparently not... Kudos to Squeamish Ossifrage :)

rodolphito

Posted 11 years ago

Reputation: 795

Now it's cracked. ;^) – DLosc – 11 years ago

2

Brainfuck, 118 chars [cracked by feersum]

Scrambled:

[>.<]++++++++++++++++++++++++++++++++++++++++++++++------<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[[[[[[[]]]]]]]

Output:

q$V4yQ!

This won't win, but there just had to be one. Assumes no cell wrapping, and works even if the tape has no cells to the left. I don't know how BF is scored, so I've put down chars.

For a BF program, 118's not that long...


Explanation

The intended solution was ++++[>++++<-]>[>+>>>+>>>>+<<<<<<<<-]>>+++++++>+++++>+>+++++[>++++++++<-]+++>>++>[[<[>>+>+<<<-]>>[<<+>>-]<-]<]>>>>[+.>]. The ASCII values are [113, 36, 86, 52, 121, 81, 33], from which we can subtract 1 to get [112, 35, 85, 51, 120, 80, 32]. This can be achieved by building the numbers [16, 7, 5, 17, 3, 40, 2, 16] then multiplying pairwise.
However, as feersum points out, this is completely irrelevant in BF as long as you can golf your code down to be short enough.

Sp3000

Posted 11 years ago

Reputation: 58 729

3The code looks like a robot shooting lasers from eyes to a steel wall! :D – Optimizer – 11 years ago

Cracked – feersum – 11 years ago

2

C, 30 (cracked by feersum)

Code

_L%"p;at(_N()m_Enin{_}diIf)",r

Output

1

Ethiraric

Posted 11 years ago

Reputation: 161

Cracked – feersum – 11 years ago

2

ECMAScript, 26

Run in a Chrome browser console

Code

$( convenient )({"awful"})

Output

$ {}

Cris

Posted 11 years ago

Reputation: 141

1Should I run it in Console ? Does it require Jquery to be on the page ? Please mention these in your post. – Optimizer – 11 years ago

@Optimizer running in console is correct. I choose not to answer your second question because knowing that answer is something you can answer this without. – Cris – 11 years ago

Cracked. – Martin Ender – 11 years ago

@MartinBüttner Nice work! – Cris – 11 years ago

2

Ruby, 49 - cracked by nooodl

Turned out a bit on the long side, but I still like it. ;)

<><>
<><>
<><>
<><>
<><>
%%%% $+?;
""""""''''''''

Newlines are significant. Output:

'
""

Original:

$><< <<'"'+?"<<<<"'";<<'%%'
'
"
"
'
>>>>>>>>>'
%%

Doorknob

Posted 11 years ago

Reputation: 68 138

cracked – Lynn – 11 years ago

@nooodl Aww, all that work with heredocs for nothing. :) – Doorknob – 11 years ago

2

Marbelous, 36 (Cracked)

Code

_________^!!00039:=>\CDD/OO++++rr{{}

_ represents a newline; _ is not to be used.

Output

1110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110

Original Solution

9C Dr +O +O :Dr }0 =0 !!++ ^3/\{> {0

JS Marbelous Interpreter

This requires cylindrical boards (i.e. marbles pushed off of the board on the left reappear on the right and vice-versa).

This one should be much easier to crack than my previous Marbelous answers.

es1024

Posted 11 years ago

Reputation: 8 953

1Cracked. I have to say, this was one of the more fun ones to tackle. :) – Martin Ender – 11 years ago

2

Mathematica, 18 (Cracked)

Code

!!#&,-./02>@D[]ddd

Output

-EulerGamma + Log[2]

jcai

Posted 11 years ago

Reputation: 973

1Cracked. – Martin Ender – 11 years ago

2

Haskell, 48 (safe)

Code

pencil=runner.vwxyz='a winter squirm upturn...';

Output

[""]

Solution

-

main=w 'v'; w=print.uncurry seq.unzip.lex.return

Lynn

Posted 11 years ago

Reputation: 55 648

is there a newline at the end of the output? – proud haskeller – 11 years ago

Nope, there isn't. Note the final ; though. – Lynn – 11 years ago

2

Python 2, 69 characters

Output:

tab

Code:

temp[}s::nn) a ](r{mnrottr]e[p_[[3wf3sa]osi(_(;i)ttinb y.s)a]a_)_:n(_

Original

As I don't have enough rep to comment, the original was:

import tabnanny as __;print(__.format_witnesses({():[]}[()])[3:][:3])

Blue

Posted 11 years ago

Reputation: 26 661

Cracked. – kennytm – 11 years ago

I think you can always comment on your own posts, but editing the original into the question is a better idea anyway. – Martin Ender – 11 years ago

2

C, 53 bytes [Cracked]

Code

{{(nr:xxx)()(fmax(~n,*x%-9));puts("strix siren?!");}}

Output

58980

FireFly

Posted 11 years ago

Reputation: 7 107

Cracked. – grc – 11 years ago

2

PHP (46 bytes)

Here is another attempt, but now using PHP.

The scrambled code:

print($a=Y<$dY^r^$o0);($e++)or($heY+Yo);c5+f0;

You can run the scrambled version, it will output 0.

The unscrambled code outputs this:

171819202122232425262728293031012345678910171717171717171717171717171717171717171717171717

Have fun with this one :)


Revealing the answer:

More than a week has past (I submited this at 8th November 2014, today is 17th), and here is the expected answer:

for(Y=a;Y^t++<50e0;Y++)echo(ord($Y^prin));

For the invalid answer, it should be this:

for(Y=a;Y^t++<99e9;Y++)echo(ord($Y^prin));

Thank you for not cracking this one :)


Old submission: (invalid because 1,4889251×10^77 Yotabytes is over the limit of 100 bytes)

The scrambled code:

 print($a=Y<$dY^r^$o9);($e++)or($heY+Yo);c9+f9;

You can run the scrambled version, it will output 0.

The output that the unscrambled version produces:

I'm really sorry, but the output won't fit here.
But, for purpose of testing, you can remove ONE e (Unicode Character 'LATIN SMALL LETTER E' (U+0065)) and ONE 9 (Unicode Character 'DIGIT NINE' (U+0039)).
By removing it, the output is the following:

17181920212223242526272829303101234567891017171717171717171717171717171717171717171717171717171818181818181818181818181818181818181818181818181818191919191919191919191919191919191919191919

There is NO FEASIBLE WAY TO POST THE CODE, since the code generated would be 1,4889251×10^76 Yotabytes long (Byte units, Google calculation).

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

@MartinBüttner DANG IT! I will edit. – Ismael Miguel – 11 years ago

@MartinBüttner Better now? – Ismael Miguel – 11 years ago

2

C, 44 bytes (Cracked)

Code

main(){while(-n&&banana);printf("%a",n[1]);}

Output

abb

Might be too easy, but maybe not.

Original solution

an;main(){while(printf(&"a%nb"[an],&an)-1);}

Art

Posted 11 years ago

Reputation: 545

Cracked – feersum – 11 years ago

2

Interactive Python 2.6, 15 (Cracked)

Code

(33*(4*12+4))/1

Output

270379522836753144265438496266566370136712020517640818813356355859028442008312225243036620289437521825508656065633888910684906390684337129360048186258048309000927118105125771665297425865729520809425997055097487267500801951307326211801132325770579267579825036033131104326181952588158139706361336195297731164624948083473959541919960343244739151223433852746136342590068225162166489275334797736589658479803522799496232002081568176260061240500941862631613470208955583641209766953178421429600070039361764538653961951816L

Original code

(43**314)/(2+1)

MrWonderful

Posted 11 years ago

Reputation: 121

1Please indicate the version of Python (unless you have tested on both versions and it works on both). This seems like Python 2, since there is a trailing L. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

Sorry. I updated the header. – MrWonderful – 11 years ago

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

1The output should be no more than 100 characters long... – r3mainer – 11 years ago

Oops! Mea Culpa. My apologies. – MrWonderful – 11 years ago

2

RPL (Reverse Polish Lisp), e.g. HP48, 24 characters (Invalid)

Code:

$ 122 / 73 CNT » + $ I «

Output (what goes onto the stack after running the code):

"$123"

It's been 7 days, 4 hours and a few minutes. The solution is:

« C312 7 2 / INT + »

Heimdall

Posted 11 years ago

Reputation: 191

Agh, it's been too long! And I don't have my calculator with me. Have a +1. – DLosc – 11 years ago

Who compiles the list of Safe Submissions? I tried to add this puzzle to it by editing the "question" of the thread but my edit was rejected. If my puzzle does not belong on the list because it was disqualified for any reason, it would be nice if I was told that was the case and possibly the reason. – Heimdall – 11 years ago

1I suspect it's because it uses non-ASCII characters, as mentioned on your second submission. Too bad there isn't a dialect of RPL where you can use << >> instead. – DLosc – 11 years ago

@DLosc Yeah, I suspect the same. As no one looks here and because the issue may be relevant to many other languages, could you please comment to the question itself and ask what the situation is when a language requires certain non-ascii characters - does that mean that language is excluded from this Cops and Robbers contest? From reading the comments the rules were evolving after the contest started. I would have raised the issue myself but I can't comment yet because I'm a newbie to StackExchange. – Heimdall – 11 years ago

I'm pretty sure that's right: a language that requires non-ASCII characters is excluded. Otherwise, there would surely have been submissions in APL and Sclipting by now. Sorry! Full props to you for your RPL skills--even with the unscrambled code, I still don't know how this works. ;) What does C$ 3 do?

– DLosc – 11 years ago

@DLosc There have been something in APL anyway.

– jimmy23013 – 11 years ago

That's an alternative string notation to quotation marks: " 234" is the same as C$ 4 234 (note 2 spaces between 4 and 2). C$ is followed by space, string length, a single space and the string characters. Useful when the string contains ". – Heimdall – 11 years ago

2

Marbelous, 55 (Cracked)

Code

________&&--......./0000000000001111111111:<<=@@@@\{}}}

_ represents a newline.

Output

t"

JS Marbelous Interpreter

Unlike many of my other Marbelous cops, this one does not use cylindrical boards.

es1024

Posted 11 years ago

Reputation: 8 953

Cracked. – jimmy23013 – 11 years ago

2

Mathematica, 31

Code

PowerMod[123456789,123456789,^]

Output

1617298209804017979868926932743750272386265163887231542207613855504645035580118031906932144113367511

jcai

Posted 11 years ago

Reputation: 973

(Inspired by xnor's Python cops a few submissions above) – jcai – 11 years ago

I suspect PowerMod is a red herring or you've done something extraordinarily clever, because you need to generate a number at least as big as the output for the mod bit. That being said; I count 101 characters in the output, and that's two characters more than allowed. – Alex Van Liew – 11 years ago

1The ouptut is exactly 100 characters long, which is allowed. The code and output are correct as stated. – jcai – 11 years ago

I must have miscounted, then. I got 101 when I fed it into wc -c. – Alex Van Liew – 11 years ago

@AlexVanLiew It is not easy to feed into wc -c directly without the trailing newline. – jimmy23013 – 11 years ago

2

Python 2, 13

This one might be very easy for some; for me it came as quite a surprise.

Code:

print (70-70)

Output:

49

Emil

Posted 11 years ago

Reputation: 1 438

Super easy. Also, you could've used a python shell and cut that down to 5 characters: 70-70 Example: http://repl.it/

– mbomb007 – 11 years ago

Cracked – histocrat – 11 years ago

2

Python, 28 (Cracked)

Program: i(b)t14i])2*2tni*(pr2[3:n(n)

Output: 100220321420320200100

Maltysen

Posted 11 years ago

Reputation: 25 023

Cracked – r3mainer – 11 years ago

2

Ruby, 27 [safe]

Code

co-opt value("*222555;==^")

Output

"4"

Original

eval"putc o^=22;"*(55-o=52)

Explanation

Calls putc three times with the character codes 34, 52, and 34.

histocrat

Posted 11 years ago

Reputation: 20 600

2

Javascript - 10 (Cracked)

Scrambled Code

foeblast()

Output

W29iamVjdCBXaW5kb3dd

Answer

btoa(self)

Jamie Barker

Posted 11 years ago

Reputation: 145

Cracked. – Martin Ender – 11 years ago

2

ASP/ASP.Net - 14 [SAFE]

Code

<%=Len('12')%>

Output

1

Answer

<%=1)''Len(2%> (Basically the equivalent of writing <%=1%>)

Jamie Barker

Posted 11 years ago

Reputation: 145

1

Keg, length 7

Just for the fun of it.

5|(2&9)

Expected output:

2 5 2 2 2 2 2 2 2 

Since new cop solutions are disallowed, I will just leak the answer: 5(9|&2)

user85052

Posted 11 years ago

Reputation:

1

Javascript size 13 (Cracked)

Going for the shortest, runs on shell

([[])+]+[-}{]

Output

"0"

Caridorc

Posted 11 years ago

Reputation: 2 254

1The question asks for programs. I'm not sure about the Python submission, but the JavaScript seems to require a shell. I don't know if that is allowed. (Also, different submissions generally go in different answers.) – Dennis – 11 years ago

@Dennis Both of them go into shells, I split them up. – Caridorc – 11 years ago

3

I count 13 characters. (And cracked it.)

– Martin Ender – 11 years ago

1

Mathematica, 29 (Cracked)

Code

FPP$cur[int]ion,retn;{2x=5+2}

Output

5

I ran this in the math command-line tool, but it works just as well in a notebook.

Fox Wilson

Posted 11 years ago

Reputation: 318

1Cracked. – Martin Ender – 11 years ago

1

Python 2, 29 bytes (cracked)

(.;i;=)de mnoprrrsssssssttyyy

No output.

Dennis

Posted 11 years ago

Reputation: 196 637

1Cracked. – xnor – 11 years ago

1

CJam, 18 (Cracked)

Code

012234567889""**%~

Output

444

Ypnypn

Posted 11 years ago

Reputation: 10 485

Cracked. – jimmy23013 – 11 years ago

1

Python, 68 (Cracked)

Code

"""""""""#''''''(((((()))))),,,,,-0235;==CYbcdehilnooooooppprrrsstt{

Output

#123456789

user31611

Posted 11 years ago

Reputation:

Cracked - Think this should be the intended solution, or something similar at least – Sp3000 – 11 years ago

1

PHP, 52 (Cracked)

Code

$)6am;crcn--+i(shr_4;9(na(%d_ ))t$2)o5tmrd(frhieo3=;

Output

Wu]w.iB ZKlXV=(mYz(z,b,IlZ+Vi.J!5wMM6Dfa4N4^=]

PleaseStand

Posted 11 years ago

Reputation: 5 369

Cracked! – r3mainer – 11 years ago

Vi.? – Vi. – 11 years ago

1

Python [both], 154 characters (Cracked)

Code

""""%(((((((()))))))),,,,,-...////00011111133355888==[[[[]]]] ________aacccdddeeeefffffghiiiiiiiiiiiiijjjjjllmnnnnnnnoooooooppprrrrrrrrsttttuuu

That's twelve (12) spaces.

Output

ruby

Fox Wilson

Posted 11 years ago

Reputation: 318

Does "both" mean that the code needs to work for both versions of Python or just 1? – Sp3000 – 11 years ago

nvm, cracked

– Sp3000 – 11 years ago

1

CJam, Size 12

Cracked by user23013

!mop[ET_^~+1]

Output

-214

My first ever CJam program. :)

COTO

Posted 11 years ago

Reputation: 3 701

Cracked. – jimmy23013 – 11 years ago

1

Python 3 size 54 (Cracked)

(o'd)'op'/r),2\x'12.)w/)h],c'dp*((rx:(h('r'ol'ae#)[ere

Output

'head'

Kyle G

Posted 11 years ago

Reputation: 761

Does this have a print statement included or is it supposed to be run in a shell? – NinjaBearMonkey – 11 years ago

Run in a shell. No print statement. – Kyle G – 11 years ago

Solved. – NinjaBearMonkey – 11 years ago

That works. Forgot about that pesky 'a'. – Kyle G – 11 years ago

1

Java 6+, 101 bytes (Cracked)

Works on Ideone

class t{public static void main(String[]a){short free=420;System.out.println("'t'p't'(d);;++=>/|");}}

Result:

1274127634633143115415747343141

Mostly unscrambled for ease of cracking. :)

(No it doesn't output 't'p't'(d);;++=>/|)

rodolphito

Posted 11 years ago

Reputation: 795

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

1

Rust, 123 characters

"{{{{{{{   -   }}}}}}}  > pgttts* ==== (((((%00xxeee,,:  +miiiiiiiiii  999aa   222222!  nnnnnnnn  /o1)))))  lffrrrrrrr3fff"

Output, no newline at the end:

97584

You may use Rust Playpen for experimentation if you don't have Rust installed.

There is a hint:

tr/gio_.ocupkzwwaaeeeeiiC/.ojdtkrnnlliic

Clojure, 96 characters

(*(((+((([]  (((=(=(( /[0]012222223999 adddeeeeffghiiiii  mnnnnoopq  rrrrr   rstwxx)))))))))))))

Same output, same algorithm, same identifier names, same hint.

Update

This version is solved. I have posted the version 2.

Vi.

Posted 11 years ago

Reputation: 2 644

Are warnings required / disallowed / irrelevant? – kennytm – 11 years ago

Original code does not produce warnings. It also does not contain comments, throw-away assignments or unused identifiers. – Vi. – 11 years ago

Rust part cracked. – kennytm – 11 years ago

1

Python 2 - 38 Cracked

Code

lp[__et._i(ri`2(]-:)pn1[s:)]t~i]t.`r[_

Output

beta

Now with 100% less '' ;)

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

1Cracked :) – Sp3000 – 11 years ago

1

PHP, 13 - Cracked

Code:

abcde(())@i;_

Output:

abc

Original:

die(_(@abc));

kenorb

Posted 11 years ago

Reputation: 398

1Cracked. ;) – Martin Ender – 11 years ago

1

C - 43 - Cracked

Code:

_main(_,su){_printf(&1+1+1+'1'),_TEA[0xD];}

Output

4

Tested with gcc

Allbeert

Posted 11 years ago

Reputation: 489

I've got a rather klunky solution for this one.

– r3mainer – 11 years ago

@Allbeert: I think your submission should be disqualified, since it produces different result at different time (even if it takes weeks to for the result to change). – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

@n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ Agree. I actually missed the "regardless of when/where it is run" requirement. However, since it was already cracked, I think deleting this answer at this point will not really be productive. – Allbeert – 11 years ago

1

Perl, 39 (Cracked)

Code

//shredding($c_)=\\t_;$_=($r/~$p*2014);

Output

H

Tested here

GentlePurpleRain

Posted 11 years ago

Reputation: 111

1Cracked with help from chilemagic. – grc – 11 years ago

1

ECMAScript, 29 (Cracked)

Code

1("HAlf PEnCesEveNthswunG".5)

Output

32768

Cris

Posted 11 years ago

Reputation: 141

Both this and your other submission seem to require a console/REPL environment, and are not full programs. – Martin Ender – 11 years ago

You're on your way to cracking them if you see it needs a javascript console. The definition of full program is important. – Cris – 11 years ago

6I'm not sure how to understand that. I do have a solution that works in the console now. Is that valid, or is there an answer that does not rely on the result of an expression being printed automatically? – Martin Ender – 11 years ago

@MartinBüttner if it works in the console it's valid. I wouldn't preclude a solution I haven't imagined also working. – Cris – 11 years ago

Cracked. – Martin Ender – 11 years ago

@MartinBüttner Nice! [point of interest I used PushEvent]. – Cris – 11 years ago

1

PHP, Size 30

hill_top_101_(at)merchant.net;

Prints nothing with no errors, even when E_NOTICE is on.

Tryth

Posted 11 years ago

Reputation: 750

What's that? Move the @ to the beginning and finished... This should be a challenge... – bwoebi – 11 years ago

I overlooked something... will edit in a minute. Edit: seems like since my old PHP version @ behavior has changed. But it's useless to the challenge anyway. – Tryth – 11 years ago

Cracked [that one is easy when you know the primitives to stop ;-)] – bwoebi – 11 years ago

1

PHP, 44 (cracked by bwoebi)

Code:

 $$(())07;;=@[]____aacddeeeeghhilmnoprsssttw

Tested different PHP versions.

Output (default for PHP 5.3.x, 5.4.x & 5.5.x),

valid

Tested on terminal (-r), PHP file and online here.

Notes:

  • You need at least PHP 5.3.0 or higher.
  • In some on-line testers it shows some warning, as it ignores @.
  • In some online testers it seems the output is seek instead for some reason (here), not sure why. At the same time it's a hint.

Original:

@$_=get_class_methods(new phar);die($_[70]);

kenorb

Posted 11 years ago

Reputation: 398

Cracked – bwoebi – 11 years ago

1

Mathematica, 35 characters (Cracked)

Code

'Pen & Pie Part Preprinters'====$$;

Output

0

Tally

Posted 11 years ago

Reputation: 387

Cracked. – Martin Ender – 11 years ago

1

Lua, Size 49

=x)f+ nir  +opxdnx5x7 e+ = =0)rx(d1.*1t)x1o(,(i21

Output

1103219.5489201

There are 6 spaces and no newlines. I wrote it in Lua 5.1.4 to be specific, but it should work for any version.

ChipperNickel

Posted 11 years ago

Reputation: 21

1

Lua (again), length 28 -- Cracked

There are no newlines, and 1 space.

hit).na.iat1 aai=an(ms(p)r*p

Output

4.9348022005447

ChipperNickel

Posted 11 years ago

Reputation: 21

Cracked. – Martin Ender – 11 years ago

1

ECMAScript 6, 116


Code

1na.M.))wg)iae/l)2e(s}w1(wowo((s*)r7Ean p.(),e,t?=1ttulh+gnoed+lol>(.ccEe(1ui,+t2e-2(m,ean+eeh(.)2o1a/e:{a)-re7r3)e6

Output

747135.7188700009

Mateon1

Posted 11 years ago

Reputation: 323

1

Javascript: 47 chars (Cracked)

//if("rest")("it will tell a surprise tale!")()

Output:

a surprise!

PS: My original snippet does not contain any comments. Whoever takes a shot at this, try to crack that version.

palerdot

Posted 11 years ago

Reputation: 269

Cracked – Optimizer – 11 years ago

Cracked without comments. – Scimonster – 11 years ago

1

PHP, 33 (cracked by squeamish ossifrage)

Code:

(()),01;<=_eggghhhiiillnnrrssttt?

Output

52

Original

<?=strlen(highlight_string(0,1));


Tested on all PHP between 5.2 and 5.5.

kenorb

Posted 11 years ago

Reputation: 398

2Cracked – r3mainer – 11 years ago

1

Python, size 41[cracked by nneonneo]

Scrambled:

" "(()).01A\[]____aceeeeiillmnopprrrrttxx

Output:

search

Tested on CPython 2.7.8 and 3.3.2, Pypy3 2.3.1 and Ideone. I'm not sure whether this is really easy or really unfair.

Sp3000

Posted 11 years ago

Reputation: 58 729

I've got a subset of the characters that prints search on Python 2 but I can't get rid of the other ones... – feersum – 11 years ago

@feersum That's interesting... I think I've copied it right without any spares though – Sp3000 – 11 years ago

I certainly don't think it's the same one. I tried it on Python 3 and got a different result. – feersum – 11 years ago

@feersum Hmm well if you can get it working somewhere verifiable (e.g. Ideone) then it should be okay – Sp3000 – 11 years ago

Cracked. For me this falls in the "really easy" category. – nneonneo – 11 years ago

1

PHP, 21 (cracked by PleaseStand)

Code:

<?=9*8*7*6*5*4/3/2/1;

Tested on PHP 5.6.

Output

14348907

Original

<?=9**8/3;/**124567*/

kenorb

Posted 11 years ago

Reputation: 398

Cracked. – PleaseStand – 11 years ago

1

Haskell, 42 (Cracked)

gS{int S;S{ Shin=pr}=Sta S=vinow;mari}deda

output

S

original code:

data S=S{}deriving Show;main=print S;S{}=S

proud haskeller

Posted 11 years ago

Reputation: 5 866

cracked – Daniel Wagner – 11 years ago

1

Javascript, 82, [Cracked by Shawn Holzworth]

Run in browser console, tested on Chrome 38

Code

bbbbbbbbbbbbvv'''' 00001245667799[[[[[[[[[[[[((=+++++++/=/++++++=))]]]]]]]]]]]];;

Output

u never find

TrungDQ

Posted 11 years ago

Reputation: 241

1Cracked – SLuck49 – 11 years ago

1

I tried cracking a few, but, NP-stupid-hard that this is, I didn't succeed.

Instead, here's a C program:

C, 39

Code

&&''((()))++9;;;<^____aaachiimmnnprtu{}

Output

_^]\[ZYXWV

imallett

Posted 11 years ago

Reputation: 995

1This would be easy if I could rotate < into >. – feersum – 11 years ago

Cracked – feersum – 11 years ago

1

CJam, size 13 (Cracked)

Code

,/*#%CEffGIKs

Output

030819828850379075460427536222159187897761502517030034671154875945928930530907551421904962649729

I think this should be hard without brute-forcing.

jimmy23013

Posted 11 years ago

Reputation: 34 042

Cracked. – Martin Ender – 11 years ago

1

C++11, 121 [SAFE]

Code

#include <iostream>
#include <cstdint>
using namespace std;
main(){{uint64_t b=-1,to(+'.');int uavlq(b);cout<<b-to,'d';}}

Output

2901942

Source

#include <iostream> #include <cstdlib> using namespace std; main(){auto t=div('_nnt-',641);int b{'-,'};cout<<(t.quot+b);}
Note that the answer uses cstdlib, not cstdint as given in the scrambled version.

uint64_t does require C++11....

es1024

Posted 11 years ago

Reputation: 8 953

I lol'd at swapping cstdlib for cstdint – Patrick Purcell – 11 years ago

1

Little Man Computer

63 characters long.

Cracked by feersum [link].

This one may look overwhelming, but it's really easy to crack. You can find an online emulator (that uses Javascript) for LMC here.

When writing the source, I made sure each "box" I used was padded to three characters with leading zeros.

Source (original)

The original source.

Source (scrambled)

550780299002200104931956059169005996800195499090005297333101782

Output

51

The Wolf

Posted 11 years ago

Reputation: 11

Cracked, I guess. – feersum – 11 years ago

1

Javascript, 30

(())M^aaaehhiilmmnrtttwx

Output:

0

Qwertiy

Posted 11 years ago

Reputation: 2 697

Cracked. – Martin Ender – 11 years ago

1

C, 48 (Cracked)

Code

main(fma){fma=(0.9-'gpfx'),printf("%ddel",fma);}

Output

-1378246

Original Solution

main(f){f='ma'-lgamma(0xfe.dp9),printf("%d",f);}

Pretty simple.

es1024

Posted 11 years ago

Reputation: 8 953

my attempt. I don't like it very much, but it fits too well to be a coincidence. – Art – 11 years ago

1

Python, size 41 [cracked by DLosc]

Scrambled:

""(())****666;;;;====ceeinprtxxxxxxxxxxxx

Output:

134713546244127343440523266742756048896

Since my short submission got cracked, I thought I'd submit a shorter (and fixed!) version of another one I currently have up. This might make it a lot easier, but who knows.

Sp3000

Posted 11 years ago

Reputation: 58 729

Cracked. That was fun. – DLosc – 11 years ago

1

DC (28) (cracked)

Code:

++01111<[]ddlllnnnnsssssssx

Output:

13610152128364555

Source:

Original: 1ss[lsd1+ss+dn11ls<n]sn0lnx
Cracked: [ls+dn11ls1+dss<n]sn1ss0lnx

Explanation

This is made up of a macro [ls d 1+ ss + d n 11 ls < n] that is stored in register n. It loads the value from s, duplicates, it, adds 1 to it, stores that value back in s duplicates the value on the stack, prints that off (n is the print without return), and then compares register s with the value 11. If the value that was in s is less than 11, it invokes the macro stored in register n. A value of 1 is used to initialize register s and 0 on the main stack. The macro n is then loaded and executed.

Sequence with spaces:

1 3 6 10 15 21 28 36 45 55

user12166

Posted 11 years ago

Reputation:

Cracked. – jimmy23013 – 11 years ago

1

QBasic, 43 bytes (Cracked)

Code:

GRANT EACH SAME;
DIST DAPPER 6;
ID$3
PEEP??

Includes 3 newlines.

Output:

??

(Output is followed by a newline.) Tested on QB64. I'm quite positive this won't work on Repl.it or other online QBasic interpreters.

DLosc

Posted 11 years ago

Reputation: 21 213

Cracked. – jimmy23013 – 11 years ago

1

QBasic, 37 bytes (Cracked)

Code:

PLAY "EN11E"
R = INT(11873105*RND)
?R

The code above (which includes two newlines) runs just fine: it plays a cute little tune and then outputs 8377039.* Only one problem...

Actual output:

 8946304

As always, output is followed by a single newline.

Original code:

PRINT 1801*5113 AND 1E7 R=LEN("RY?")

* Tested on QB64 Windows 7 desktop version. The pseudo-random RND should give the same result every time the program is run, unless seeded by RANDOMIZE. It's likely that the particular result will be different on different systems. But in any case (spoiler alert!)--the unscrambled program does not depend on RND. ;^)

DLosc

Posted 11 years ago

Reputation: 21 213

Cracked. – PleaseStand – 11 years ago

1

Marbelous, 106

Code

_________________________!!0000011122223779999:::<<<<<<<<<<>>>>>>>>>>AAAbb\\\/MMNNOOOOOO+++++QQ{{{}}}}}}~~

_ represents a newline.

Output

3823160E090604030202

Hint

Hexadecimal couplets.

This output should hopefully look familiar to you.

JS Marbelous Interpreter

This requires cylindrical boards (i.e. marbles pushed off of the board on the left reappear on the right and vice-versa).

es1024

Posted 11 years ago

Reputation: 8 953

1

ECMAScript, 90

Code

" "((((((()))))))+....;=FFFabcccdeeeffhhhiiiiiiilnnnnnnnnooooopprrrrsssttttttttttuuuuy{{}}

Output

function (){alert(this+"")}

Cris

Posted 11 years ago

Reputation: 31

@Sp3000 Nice work on the atob ones! – Cris – 11 years ago

1Cracked. – jimmy23013 – 11 years ago

@user23013 Nice work! – Cris – 11 years ago

@MartinBüttner amazing work on getting the exact solution. – Cris – 11 years ago

1

Marbelous, 107

Marbelous is rather fun to program in.

Code

______________________!!***......000000000113444578:::::<<<<<=>>>>>>@@AAA\DDFF/////MM%%+++xxYYY{{{{{{}}}}}}

_ represents a newline.

Output

110000FFFFEEEEDDDDCCCCBBBBAAAA9999888877776666555544443333222211110000FFFFEEEEDDDDCCCCBBBBAAAA999988

JS Marbelous Interpreter

This requires cylindrical boards (i.e. marbles pushed off of the board on the left reappear on the right and vice-versa).

es1024

Posted 11 years ago

Reputation: 8 953

1

QBasic, 79 bytes (Cracked)

One more, just for kicks: the meta-PPCG edition!

Code:

"Louis, I think this is the beginning of a beautiful friendship."
- Rick Blaine

(Note the newline.)

Output:

Iodine

DLosc

Posted 11 years ago

Reputation: 21 213

Cracked. – jimmy23013 – 11 years ago

1

Python, 51 bytes (SAFE)

Code:

((((["tx*xx=2202022=xx*xt",prince:rinse+x*t]))));;;

Output:

86207823349459112201077150426144

Solution:

x=2*2*2+2;exec("x=int(str(x)[:],0x20);"*x);print(x)

Starting with x=10, interpret x as a number in base 32 and assign the result back to x. Repeat 10 times.

DLosc

Posted 11 years ago

Reputation: 21 213

Works in both versions? – Martin Ender – 11 years ago

Just double checking - exactly one comma? – Sp3000 – 11 years ago

@MartinBüttner Yes, should work on any version (tested with 2.7 and 3.3). – DLosc – 11 years ago

@Sp3000 Exactly one. :) – DLosc – 11 years ago

Good old exec, the [:] did well to confuse. – Sp3000 – 11 years ago

1

Python, 55 chars [Cracked]

Works in both 2 and 3.

Code

((()))**+,.0112589:={}
____aacdefgiiimmmnnnoopprrrrsttu

Output

108723934648156901437468808002

Solution

The intended solution makes use of the fact that __name__ == '__main__' for scripts as well as in the REPL. More precisely, sum(map(ord,__name__)) == 801.

print(sum(map(ord,__name__))**10+1)
itforirngc={25.:89}

FireFly

Posted 11 years ago

Reputation: 7 107

Cracked – Sp3000 – 11 years ago

1

JavaScript, 42 Cracked by Optimizer

This should be pretty easy.

Code

tu curt infernnnnnnnnnno!(((())))+--58{||}

Output

1712

Run in browser console (result is REPL), tested in Chrome 38, Firefox 33, and IE11

SLuck49

Posted 11 years ago

Reputation: 901

Cracked – Optimizer – 11 years ago

1

Java - Size 97 (Cracked)

Code

""''{{}}(((())))...345:;[]^_     BSSaaabbbcccdeeeefgggiiiiiiillmmmnnnoooprrrsssssstttttttttuuvwyy

Output

X^Y

note: ends with a newline

Olavi Mustanoja

Posted 11 years ago

Reputation: 149

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

1

Ruby, 23 (Cracked)

code scramble:

[[d++]8%-0]the...11 mops

output :

"lice"

tested on: http://repl.it/languages/Ruby/

MegaTom

Posted 11 years ago

Reputation: 3 787

Cracked – histocrat – 11 years ago

1

CJam, 47 bytes [safe]

Code

###'''(())**+-0112333479:KKKKNNN]__cdffmtt{{}}~

Output

316218750702865:484776333:983474443201156009:7420206870:545426587396511674:49954383540:8793516242242

This should be hard, I guess...

Hint

It's not 7 numbers separated by :. The : in the code is for variable.

Solution

'N)){~}:KK{1#1md'NNf-Kc((K*}93*]'0f+34_2#t3_7#t

jimmy23013

Posted 11 years ago

Reputation: 34 042

1

Python, 45

Code:

((((((()))))))+.1233445accehhiijlnnoprrrrsttv

Output:

0

Original

print(eval((chr(43)+chr(45)).join(str(321))))

Blue

Posted 11 years ago

Reputation: 26 661

Cracked – Sp3000 – 11 years ago

1

Rust + Clojure, version 2

This is the second version of the task. The first version is here.

Output, without the newline:

1283691742071510101818513212188161611241111219191910762714142222223591109301717171051225

There is a hint (the same as in version 1):

tr/gio_.ocupkzwwaaeeeeiiC/.ojdtkrnnlliic

Now the task is more related to the hint compared to version 1. The algorithm is the same in Rust and Clojure versions, there are no comments, unused identifiers thow-away assignments. All identifier have 1-character names.

Rust, 118 characters

====>        -,,:!/""((((((())))))){{{{{{{}}}}}}}*%+++001111112235aaeeeeefffffgiiiiiiiiillmnnnnnnnnoprrrrrrrrsstttxxxx

Clojure, 106 characters

==                /(((((((((((((((())))))))))))))))[[]]*++00011112235adddeeefffgiiiiimnnnoopqrrrrrrrstxxxx

C, 128 characters

<=====       ,;;;;;;;/""((((((((())))))))){{}}*%%+++++001111112235adeeeffffiiiiiiiiiiiiimnnnnnnnnnoprrrrrrrrrrrrrttttttttuuuxxxx

Haskell, 83 characters

======||      _;;....((()))[]$*+++011111122349aaddehiimmmMnoopprrrrrrsSttTuuvwxxxxx

Perl, 97 characters

=====   ;;/..(((((()))))){{{{{}}}}}$$$$$$$*%+++011111122349beeeffffhiiiiiillnoprrrrrrrssssttuxxxx

Shell, 170 characters

````````==                                 ;;;;;;;;;/((((((((((()))))))))))[[]]{}$$$$$$$$$$*%+++0111111111122349cccddeeeeeeeeeefffffhhhhhiiiiiiillnnnnnoooooopqrrrrrrssttt

Checked with dash, bash, ksh a zsh.

Vi.

Posted 11 years ago

Reputation: 2 644

1

Marbelous, 144

Code

______________________________++++++++++----......///0000000000000000111134477889::::::<<<<<<<<<<<=>>>>>>>>>>>@@@@@@AABLPTU\\\^^^^^^{{{{{{}}}}}}

_ represents a newline.

Output

2.718281828459045

I'll probably regret leaving in so many numbers..

JS Marbelous Interpreter

Unlike my other Marbelous cops, this one does not use cylindrical boards.

es1024

Posted 11 years ago

Reputation: 8 953

1

Brainfuck, 39

Code

++++++++++++++++++++------...<<>>>>[[]]

Output

SOS

Michael M.

Posted 11 years ago

Reputation: 12 173

Cracked. – FireFly – 11 years ago

1

Python shell: 21 chars

A slightly beefed-up version of my previous attempt that I hope is harder to brute-force.

00112233445566778899^

Output (to shell):

15788895283

xnor

Posted 11 years ago

Reputation: 115 687

Cracked. – es1024 – 11 years ago

1

Python 2; 62 chars; Output: 100 chars; SAFE

Code:

    %%%''((((())))),-199;=[]___aaeeeeefggiiiillmnnnnooprrrstuv

Output:

1087654320987654316039744558401050205536516109500544976952359908183938933602037618678184519105773568

Solution:

e='%ie%i';print long(sum([eval(e%(_,_-1))for _ in range(99)]))

Blue

Posted 11 years ago

Reputation: 26 661

1

Assembly, 78 bytes, bootloader x86, GAS

0$0y
v,
:eylo1c1
e0.d
xxx
1+m
i$dt1ev 5.$on ,xe%a
.bt tb05=6d axa0.mh6a 50%
o0

output:

a

solution:

.code16
d:
mov 0x61,mov0xe,%ah
int $0x10
.=d+510
.byte 0x55
.byte 0xaa

krzygorz

Posted 11 years ago

Reputation: 11

How do you set bl? I lack either a b or a , – mirabilos – 11 years ago

2At least you were kind enough to scramble the assembly, and not the machine code. :P – FireFly – 11 years ago

1

CJam, 14 (Cracked)

Code

1.2e35 6.78e9%

Output

108183.05975155532

jimmy23013

Posted 11 years ago

Reputation: 34 042

Cracked. – DLosc – 11 years ago

1

Insomnia, 14 (Cracked)

Code

(Only 1 space, as seen below)

yes|grep-99 ii

Output

101291340129

Interpreter

n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

Posted 11 years ago

Reputation: 5 683

Cracked. – jimmy23013 – 11 years ago

1

RPL (HP48), 10 characters (safe)

I thought RPL was out of the question, as discussed in my first and my second (deleted) submission. However, instead of creating a program object (with code enclosed in « », and possibly store it), I can just type the RPL code without « » and press Enter to execute the code immediately (kind of command line).

For example, instead of creating the program « 1 2 3 + », I can just enter 1 2 3 + for immediate execution, and the output (addition to the stack) will be:

1
5

Now to the actual (reworked) puzzle that actually follows the rules. Because previous one did not follow the rules, the time for it starts now. (Unfortunately I can't post the other reworked puzzle now because I had already supplied the answer.)

Code (to be entered for immediate execution):

"DO PURGE"

No output (no change on the stack), also no error.

Edit: I'm sure I've given enough time since helping with emulator information and documentation. So I'm now claiming immunity by posting the solution:

"GUE" DROP

Words DO and PURGE are the actual commands and I chose them because they deceive but provide the characters needed. PURGE will cause an error unless there is a name of an existing variable on the stack. Even if that's satisfied and the name is then taken off the stack, how will you get rid of ""? And how will you put a variable name on the stack without ''? It works if the variable doesn't exist, otherwise it gets evaluated. Of course, the behaviour would then depend on other factors, which should not be the case with any code in this contest. DO is for loops and would be incomplete, therefore cause an error (either run-time or syntax).

Heimdall

Posted 11 years ago

Reputation: 191

It's been about 8 1/2 days without any attempt being posted. In fact, for the last 10 days there have been no robber attempts at all. Is that the end of this pair of threads (and the contest)? I'm thinking whether I should post the solution and claim immunity as it doesn't feel like much of a win in complete absence of robbers... Also, this submission is not mentioned in the list of unsolved ones - does that still count? – Heimdall – 11 years ago

Are there interpreters/emulators or documentation for this language available online? – algorithmshark – 11 years ago

Yes, @algorithmshark. I've seen the emulator on Linux, I've got the Android one, there's plenty to find by searching "hp48 emulator". I'm pretty sure it's available for all major platforms. Here's the manual straight from the horse's mouth. Should I (with the spirit of this contest) extend my immunity claim to give people a proper chance as I have only just offered help with this comment?

– Heimdall – 11 years ago

1

JavaScript, 36

scrambled code:

trx=["bs","alie"];trx((x+x)guns(96))

output: ion

MegaTom

Posted 11 years ago

Reputation: 3 787

Cracked. – Martin Ender – 11 years ago

1

Python 2, size 13 (Cracked)

Code

ex00123679///

Output

0.0068493150684931503

Original Source

6e1//073/0x92

mbomb007

Posted 11 years ago

Reputation: 21 944

Edited to make heading formatted – mbomb007 – 11 years ago

I used http://repl.it/

– mbomb007 – 11 years ago

Cracked. – jimmy23013 – 11 years ago

1

Python 3, 21 [Cracked]

Code

pi.str.r42:():().[nt]

Output

pi

user34736

Posted 11 years ago

Reputation:

Cracked. – Martin Ender – 11 years ago

1

Java 8, 157 bytes.

Prints HELLO.

{ppt)i6s;ia.r eapxirf uw le([)i7{pt{7cdwo.,6aov viSjtrowbaor}avn6tS .imD,an}rtsia)eoerttt lt9((.eao[ut,E_tF9t7ge,e ejO.cbm}neiuiie7uiwFt2ri.ihc]no]cnys eanlc

TheNumberOne

Posted 11 years ago

Reputation: 10 855

1

Python 2, size 23 [SAFE]

Using http://repl.it/

Scrambled

-/*[st0r3:.1245689])(()

Output

'110665.1105651'

Original Code

(str(065/.814)*2)[9:-3]
This takes the octal value 065 and divides it by .814 to create a longer decimal value. I then converted that to a string and repeated it twice by using *2. The final part takes a substring of that result, making it harder to know what went on.

mbomb007

Posted 11 years ago

Reputation: 21 944

1

Ruby, 65 chars.

code:

  #think(((((())))))*++---./;;==^^^eeeeeeiiiiiimpssttu{|||}112569

(it begins with two spaces)

output:

3
-7
-3
-3
-5
-4

(the output is separated by a new line)

This one shouldn't be too difficult.

Hint:

This one relies heavily on bitwise operators, expecially or and xor

Hint 2:

Some of the parentheses are optional, not really required and are used only to confuse the "Robbers".

user3807877

Posted 11 years ago

Reputation: 21

1

PHP, 484 chars

s{9$_aer{cmnef]3o"{hmotee]e)=o(mdo/_o sf[di=_{yi(e]9i/lho_o${n}"lt!og]bnek"}[.ec$ [""kebe=-r7")}.0l} ]e]"oe "$3{]$c_)ln$[tee{u;r$cr "cln{e$du{$eodo+(eoc"]d$ocrcd]o e }0o}ll{oo)}no;{2tud;el#o.c $$0d dne{na[[ip2lcerihol dlH}+le [e [;l);[_"]d\.[]c$;n3d(]2$$:hitn"5d.i/tcepm["}noe "el[;;ex}Wx}}e"pe2o  d ,<m)t<tt;l{p$ih$ld$l \ cbye$ +1pi}[c]o l$c$ c"]$"(to}teue$d(]}l{[1e[d"}{)[e+ {e$$?il{">l nheb$)c$.ssbc\nusem;u$lpd=od)in {olsbnn{;}d76oy4sfc}}eicsd]i}xti$=f"ei{(o l$n(;hc :coce dats(ei

output:

hello world

Hint:

The code is NOT platform dependent (tested in os x and ubuntu), although it won't work in ideone or any other online IDE.

Hint 2:

This code generates code in another language and executes it.

user3807877

Posted 11 years ago

Reputation: 21

1You realize this is code golf, right? The goal is to have a short program. – mbomb007 – 11 years ago

I wanted to do something challenging and difficult to "crack". – user3807877 – 11 years ago

1

Python, size 30 [SAFE]

This one is just for fun, since my last one wasn't solved. :D
This one also has removed the workaround that squeamish ossifrage cleverly found. >:D
Still using http://repl.it/

Scrambled

:: rsin[~rot13(`0ddf`) + 69][]

Output

=> 'rot13'

Original Source

str(d for d in[])[9:6:~0]+`13`
I actually found this by accident. It creates a string of '<generator object <genexpr> at 0x221164>' (or some other address), then uses the rot at the end of generator and appends 13 to it.

Just to be more clear that the '=>' isn't part of the string

mbomb007

Posted 11 years ago

Reputation: 21 944

0

Javascript (Node.js REPL), 11 bytes

Just for fun. Here is the verifier for the program that generates a circular list.

([x[0]==x])

Expected output:

[ [Circular] ]

Spoiler (don't cheat!)

Spoiler since no cop solutions are allowed anymore (written by wizzwizz4): (x=[])[0]=x

user85052

Posted 11 years ago

Reputation:

0

Python [any] shell size 44 (Cracked)

4no_,2_[a(m] g]]fn_mie___e[nenr aa )1__[r3 _

Output

'a'

Caridorc

Posted 11 years ago

Reputation: 2 254

Cracked :-) – r3mainer – 11 years ago

0

Java 6+ / Oracle implementation (Cracked by feersum)

Code (226 bytes)

There are 5 new line characters and 2 spaces. No other invisible/non-printable character presents.

"""  ((((((()))))))++,........
00000000000001122225677788
;;;DEIPPSSS[\\\\\\\]aaaaaaaaaaaabccccccccddeeeeeeeeeeeef
gggghiiiiiiiiiiiijllllmmmmnnnnnnnnnoooooopppppprrrrrrrr
sssssstttttttttttttttttttuuuuuuuuuuuuuvvxxyyyz
{{{{}}}}

Output

91 Unmatched closing ')'

The program has been tested to compile and run successfully on ideone, so please submit an answer with runnable demo there.


feersum's solution is far from my intended solution, so I will not reveal my intended solution since I'm going to modify it for a new challenge.

n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

Posted 11 years ago

Reputation: 5 683

Is there anything wrong with this submission? By the way, Oracle's implementation should be the most common one around. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

1By "run successfully" does that mean it doesn't throw an error? (So you actually System.out.println("91 Unmatched closing ')')" or something along those lines)? Or is the output just output from println, errors, etc. combined? – soktinpk – 11 years ago

@soktinpk: Output is to stdout. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

Cracked – feersum – 11 years ago

0

Befunge-93, size 17 (cracked)

Code

>_-,/""@
*#%+69pv

Output

@

Looks like it has probably used some non-standard feature of this interpreter.

jimmy23013

Posted 11 years ago

Reputation: 34 042

1Cracked, possibly – r3mainer – 11 years ago

0

BBC BASIC, 187 - Cracked

Code

$$$$$$$$$$$$$$$$$$$$$((((((((((((((((((((()))))))))))))))))))))00000000111111111111111111111111122223333447778889999999CCCCCCCCCCCCCCCCCCCCCHHHHHHHHHHHHHHHHHHHHHINPRRRRRRRRRRRRRRRRRRRRRRT

Output

you'll never crack me

Beta Decay

Posted 11 years ago

Reputation: 21 478

7oh yes I will – r3mainer – 11 years ago

0

PHP, 22 - Cracked by Martin Büttner

Code:

((()))*+..0117;cehinot

Output:

7

Original

echo(int)((.1+.7)*10);

kenorb

Posted 11 years ago

Reputation: 398

Cracked. – Martin Ender – 11 years ago

0

PHP, 54, Cracked

Code

$$$$$$$$$$&(())11122;;;;<<====^^aaaabbbbbbceehhilow{}

Output

42

Original

a=21;b=21;while(b){$a^=$b;$b=($b&$a^$b)<<1;}echoa;

Original idea

Steve Robbins

Posted 11 years ago

Reputation: 183

1Cracked. – jimmy23013 – 11 years ago

0

Haskell, size 34 (Cracked)

Shuffled:

pfdi0xf7(anI5i7r1):^b3nf=2x:t2tm0n

Output:

-1121766947

Petr Pudlák

Posted 11 years ago

Reputation: 4 272

I'm tempted to claim that this violates the "you may not use cryptographic functions" rule, except that any self-respecting cryptographic function would use a big prime instead of 2^64 for its modulus... Perhaps if I knew a bit more I would know how to exploit this choice. Very clever choice of problem. – Daniel Wagner – 11 years ago

2cracked – Daniel Wagner – 11 years ago

@DanielWagner Good job. I'd say that exponentiation isn't a cryptographic function, even with the 2^32 modulus. Perhaps I should have used ** instead of ^ to make the guess slightly harder. – Petr Pudlák – 11 years ago

Number Theory != Cryptography – recursion.ninja – 11 years ago

0

Python 2 - 57 Cracked

Code

''((()))+++++++,,,,.000000001111113444589abchiijmnnopprrt

Output

blue

Blue is the best colour ;)

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

Cracked – Sp3000 – 11 years ago

0

ECMAScript, 25 (Cracked)

Executed on window object

Code

applet.stellar[flyer,(a)]

Output

function alert() { [native code] }

Cris

Posted 11 years ago

Reputation: 141

3Just double checking, are you sure, you're not missing a comma? (Alternatively, does it produce errors as a side effect?) – Martin Ender – 11 years ago

2The built-in function alert isn't mentioned in the ECMAScript spec, so I think you need to be more specific about the execution environment in which this output is produced. – Peter Taylor – 11 years ago

2There are 24 characters given in your answer – es1024 – 11 years ago

@MartinBüttner correct. Thank you for that. Adding comma. – Cris – 11 years ago

@PeterTaylor Good point. I'll put "executed on window object", if that's cool with you? – Cris – 11 years ago

@es1024, yep that's correct. Thank you for that. Adding the extra character. – Cris – 11 years ago

1Cracked. – Martin Ender – 11 years ago

@MartinBüttner Nice work! – Cris – 11 years ago

I don't think the window object is part of the ECMAScript spec either. What compiler or interpreter are you using? – Peter Taylor – 11 years ago

0

PHP, 27 (Cracked by bwoebi)

Code:

$$((()))02679;;=__bdeehiinx

Output (default on PHP 5.4.x):

3.1415926535898

Output (default on PHP 5.5.x):

3.14159265359

Hint: It depends on your php.ini precision, so hopefully it's acceptable.


Original:

$_=hex2bin(7069);die($_());

kenorb

Posted 11 years ago

Reputation: 398

1Cracked ... hey, please make the next one a challenge, not cracked in 5 minutes; please :-) – bwoebi – 11 years ago

0

C, 28 (cracked by feersum)

0124689aimnpsssstu=;;&{}(())

Prints Hi!

Michael M.

Posted 11 years ago

Reputation: 12 173

3Cracked – feersum – 11 years ago

Drat, you beat me to it – r3mainer – 11 years ago

Oh come on ! 7 minutes ? You are awesomes guys. – Michael M. – 11 years ago

0

Java, size 108

Code

forprintmymostfaultSent66{{{}}}.......;""(((())))%,*++//\\--''''''''''''main static class void public String

Output

3.141593

durron597

Posted 11 years ago

Reputation: 4 692

Cracked – feersum – 11 years ago

0

Bash shell script, 33 characters

Code

{int wk1}'caller$' hop|hop sewer

Output

shellpower

Debasis

Posted 11 years ago

Reputation: 101

1Cracked. – Martin Ender – 11 years ago

0

Haskell, 77

this poorly mixed code:

{tt))=Maprte((e)=))+-1%%&&tt} %%:i=ddeno:p:)illme((m;;;<=;()&&()):a6::1=(((no

output Should be

1
2
4
8
16
Code.exe: <<loop>>

Edit:
To clarify: the code should be saved in a file named Code.exe. otherwise the output would have the actual file name instead of Code.exe.

more than a week has passed since this was published.

original version:

main=mapM print(&);(&)=1:(&)%(&);(16:(:){})%t=t;(e:d)%(l:o)=(e+l):d%o;e<t=e-t

this uses a few tricks:
a variable named (&) that isn't a function


a record pattern not on a record (:){}


a useless definition of < to get people confused what to do with the extra = sign


the runtime prints <<loop>> because we entered into a trackable infinite loop (at the fifth element and on of (&)).

proud haskeller

Posted 11 years ago

Reputation: 5 866

Regarding the last line, is it actually written to stdout? – FireFly – 11 years ago

@FireFly as an uncatched exception it is written to stdout and then the program terminates – proud haskeller – 11 years ago

When I checked locally, exceptions were printed to stderr for me (on linux), and not stdout. I suppose it might print to stdout on windows, though? Still seems a bit odd. – FireFly – 11 years ago

And you get a completely different message with jhc. – John Meacham – 11 years ago

0

Python 3, 46

Program

""''''((()))*01==bbffiiillnnnooooppprrrrrttt

Plus two newlines.

Output

'(otlotb)'

user10766

Posted 11 years ago

Reputation:

Cracked – feersum – 11 years ago

@feersum: invalid link. Updated.

– imallett – 11 years ago

0

This one demonstrates something pretty neat (and surprisingly poorly known):

Python, 16

Code

""()7T\aeeelruvx

Output (from interpreter)

-2

I can't say much without giving a big hint, but this depends on an interpretation of the rules that I think is fair, reasonable, and expected.

I didn't make a separate answer for this next one since it bends the rules a little. It's technically still fully compliant, but it's a little outside their spirit. It's also really mean. I'm sorry.

Python, 61 [SAFE-ish]

Code (plus two newlines)

#  ((()))*****----012345:aabbbcccdeeeggggginnoorsttuvvvyzzz

Output (from file)

635587791019258855467865682634760304773233019345006266045081668082247125111784951775232

Update: explanation:

As guessed in the comments, this is indeed rot13 encoded. The rules state "You are also not allowed to use hashing (or other cryptographic functions) in your program", but the character encoding defines how the editor interprets the bits that comprise the program, not the program itself. Clearly, this violates the spirit of the rule. Original source:
#--coding:rot13--
sebz zngu vzcbeg*
cevag(vag(ybt(5)**420))

imallett

Posted 11 years ago

Reputation: 995

Is the second one using ROT13 encoding? Because, if so, yes that is pretty mean. :P – Sp3000 – 11 years ago

(Also if so you might want to specify that it's Python 2, not 3. Ignore me if I'm wrong though.) – Sp3000 – 11 years ago

1The question forbids "cryptographic functions". ROT-13 is technically a cryptographic function, so it would be forbidden. – feersum – 11 years ago

By output from "interpreter", do you mean that it must me entered in the REPL? If so it isn't valid as a stand-alone program is required. – feersum – 11 years ago

1

I've cracked the first one, assuming Python 2 is acceptable.

– r3mainer – 11 years ago

@feersum: where does it say stand-alone? Also, character encodings are not part of the program itself. – imallett – 11 years ago

1@imallett The question asks for a program. It's standard rules for the site that a program means a program, and not some code fragment which could be evaluated. And a cryptographic function is a cryptographic function regardless of how it is invoked. – feersum – 11 years ago

0

Bash

23 characters long.

Cracked by user23013 [link].

BASH_VERSION is "3.2.53(1)-release"

Source (original)

_(){ q=echo;q"q";};_

Source (scrambled)

;{e) $ qq"}";oh_$_=q(;c

Output

echo

The Wolf

Posted 11 years ago

Reputation: 11

I believe there should be one more space character. – jimmy23013 – 11 years ago

But it is still possible without that. Cracked.

– jimmy23013 – 11 years ago

0

JavaScript, 285

Code

\n\n\n\n\n\n      """"""(((((((()))))))),,,,.........///////0001111222222333334566666777777889999:========ACCEGHJLLLMNORSTTX[]_aaaaaaaaaaaaaaaaaabbbccddddeeeeeeeeeeeeeeeeeefffffgghhhhhiiiiiiiiijlmmmmmnnnnnnnnnoooooooooooooooopppppqrrrrrrrrrrrrrrrrrrssssssssssssssstttttttttttttttuuuvvvwwwwxz

Note: The \ns are one character.

Output

AZ

Beta Decay

Posted 11 years ago

Reputation: 21 478

1Please refrain from revising your post after posting, especially in a challenge like this. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

1

Cracked? http://codegolf.stackexchange.com/a/41239/32372

– jcai – 11 years ago

0

Python, 41 bytes

Code:

_dtrupar_p)o_(prm(txnrr_e)i)(mei er,(.)ps

Output:

6314

Blue

Posted 11 years ago

Reputation: 26 661

1Cracked... and -1 for being implementation-dependent :P – feersum – 11 years ago

0

C (gcc) - 43 - Cracked

Code

""%%&(()),7;[]aabdeeefiiiimnnnnpprrsstuux{}

Output

se7en

Trust me, you don't want to open this box...

(My unscrambled code will only work in non-strict C. For example, here)


Original

main(superbia){printf(&unix["%se%den"],7);}

FryAmTheEggman

Posted 11 years ago

Reputation: 16 206

Is it permitted to output a newline after se7en? – feersum – 11 years ago

Cracked. – nneonneo – 11 years ago

unix is an undeclared identifier for me. – feersum – 11 years ago

@feersum Yeah, I don't think this would've counted then, even if nneonneo hadn't cracked it. I thought that unix was still defined if your OS was unix based, but I guess I was wrong ;_; – FryAmTheEggman – 11 years ago

And if your OS isn't unix-based? – feersum – 11 years ago

@feersum ... yeah I should've put that in the answer... Sorry, I don't know what I was thinking... – FryAmTheEggman – 11 years ago

0

Arithmetic (ECMAScript, Java, C, C++, BASIC, Perl, Python, Ruby), 31

Code

((((((()))))))****++++111122222

Output

77

Cris

Posted 11 years ago

Reputation: 141

Cracked. – NinjaBearMonkey – 11 years ago

Nice work both of you! – Cris – 11 years ago

0

Javascript (41 bytes) - Cracked

It should be a piece of cake to crack.

Here is the code:

'cccefhiinnnnooorrrrsstttttuuu)))} {(((.'

This is supposed to give the window object.

Probably will work on node.js

Have fun!

P.S.: Please don't crack it!!!

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

Sorry, cracked.

– Martin Ender – 11 years ago

@MartinBüttner Try to crack this one: http://codegolf.stackexchange.com/a/41299/14732

– Ismael Miguel – 11 years ago

0

C, 63 (Cracked)

Code

int main(_){_;_<_<_;_=_;_______;printf("%d",_<=_<<_||_<<_<=_);}

Output

131088

Original Solution

__;int main(_){__=_<<_<<_;__=_<<__;_<<=__|_;printf("%d",_|__);}

es1024

Posted 11 years ago

Reputation: 8 953

Cracked – feersum – 11 years ago

0

Javascript (82 bytes) - Cracked

Since my first Javascript attempt was cracked in 6 hours, I decided to make another one!

Here it is:

eval('zov=~-1+(ii=1<2);if(0^1<2 in[3]<=+[])ii+[zov]+[]<<ii;//cog=lovr;s.n,r,o.j');

As the PHP answer, you can run it and it will return 0.

The unscrambled version outputs this:

131713115131713131131713115131713163131713115131713131131713115131713112713171311513171313113171386

I hope that this one survives a day.

Have fun and don't crack it!!!

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

Cracked. – jimmy23013 – 11 years ago

0

Python 2, 37

Code

print(len(ord(Emvies.priwilimmstys)))

Output:

1

Blue

Posted 11 years ago

Reputation: 26 661

Cracked – Sp3000 – 11 years ago

0

PHP (80 bytes) - Cracked

Yes, this is one more answer from me!

Here is a new one, fresh for you all:

$$__=aAaAaa;$$___=(b^C^Fff^IIi);$$____=j^k^N^Oo^PPp;$$_____=Qrr+tTT.(UWW<XXyZ);;

As always: You can run it and it will print absolutely nothing. (same as the numeric value 0 converted to string)

The output:

:

That's right, 1 byte of output!

Go ahead and have fun with this one!

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

Cracked. – jimmy23013 – 11 years ago

0

Python, 90 bytes (SAFE)

Kinda long, but I enjoyed putting this together.

Code:

??(((())))+++++++,1111111111111111111111:;;<<<<======>>>>>[[]]ehiilnnnnnnnnnnpppprrrsstttw

The ?s represent two newlines.

Output:

6167185029251277541387741632208161040852042602130139041952976

Output is followed by a newline. Works in Python 2 or 3.

Solution:

n=11111+1111+111+1;p=str() while n>1111:n=[(n<<1)+n+1,n>>1][n>>1<<1==n];p+=str(n) print(p)

Calculates several iterations of the 3n+1 function starting at 12334 and continuing until the value dips below 1111, concatenating the results together. For obfuscation, uses only 1's and bitwise operators to calculate the function (which would more straightforwardly be n/2 if n%2==0 else 3*n+1).

DLosc

Posted 11 years ago

Reputation: 21 213

0

PHP (46 bytes) - Cracked:

Yet another one from me.

This one is kinda easy.

I did my best to have 1 and only 1 solution.

Here it is:

echo$o=rand(m^z&E+$i,$i=(H<Y)or$Y[$i+f<<z]);;;

And outputs:

band

As with some of my previous answers:

You can run the scrambled code.
Depending on it's mood, outputs either 0 or 1.

Have fun!

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

Cracked. – es1024 – 11 years ago

0

PHP (33 bytes) - Cracked:

This one is pretty easy to crack.

It only works on linux.

Scrambled code:

X1dFu7Te48oklB ^ HDecnX0iTch0T6g;

Output (if everything goes right):

1

PHP (24 bytes): (I won't count this one, untested)

This is the windows-only variation of the SAME code.

The difference is the size and that I needed to add quotes.

Scrambled:

'dc6iunXB7 ^ heoedcX4l';

Output:

1

Both scrambled codes can be run.

Have fun!!!

Ismael Miguel

Posted 11 years ago

Reputation: 6 797

Cracked. – Martin Ender – 11 years ago

0

Bash 4.2.47(1) on Linux, 47 characters

${porcel-=str('pix fep\n     pp/pp/'); fec1/; }

Output, without newline:

pp

Finding some solution is easy:

printf pp;o='${cel-sr(xe\     pp/pp/) fec1/; }'

Try to find the original code, without comment-like things like thow-away assignments or "hungry" identifier names.

Vi.

Posted 11 years ago

Reputation: 2 644

3That's not how this challenge works though. ;) if you want people to find your original code, it's your job as a cop to make sure no other solution exists. – Martin Ender – 11 years ago

Cracked...it was very kind of you to post the solution! – feersum – 11 years ago

0

Python, size 37

Scrambled:

"    "*+++.123334:=
=deefiinnoprrstuu

Output:

12369.0

MrWonderful

Posted 11 years ago

Reputation: 121

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

0

PHP, 62 chars

"fine".Music <= radio?'==;;'(.')()+')+$yeTi:2('3(;)1$$$hoo.'.

Output:

1. Monday 2. Tuesday 

aks.

Posted 11 years ago

Reputation: 654

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

0

Python 2, 80

Source (original)

"no %, *, any for loops, nor pow()"
print int(str((61**38)/(702+4)+5)[9:])

Source (scrambled)

"         "%
((((()))))
***++,,,/
0123456789
:>[]afiilnnnnnoooooo
ppprrrrsstttwy

Output

28557152413644043173796536772347528819922074855728983445

MrWonderful

Posted 11 years ago

Reputation: 121

0

Perl, 53 bytes

Code:

$thriller='24'&&$prng=4;tar xvw'~'.$e/=3332+42*$i/~$r

Output:

3155242264414961265415109674813320

No trailing newline this time. Tested in Perl 5.18.2, but should work fine on other versions.

DLosc

Posted 11 years ago

Reputation: 21 213

0

Marbelous, 48 (Cracked)

Code

_______&&--...../000000000011111111:<<=@@@@\{}}}

_ represents a newline.

Output

"

(Yes, just one double quote.)

JS Marbelous Interpreter

Unlike many of my other Marbelous cops, this one does not use cylindrical boards.

es1024

Posted 11 years ago

Reputation: 8 953

Cracked. – jimmy23013 – 11 years ago

0

J 25

+3oh.5- #+-ii#3c!//4e.2%/

output

3

Caridorc

Posted 11 years ago

Reputation: 2 254

Cracked. – FireFly – 11 years ago

0

Marbelous, 144

Code

______________________________!!!&&+++++----..........////////0000000000000000000000111111227888::::::<<<<<<<<<=>>>>>>>>>@@@@@@AAOO\\\\^^^{}}}}}

_ represents a newline.

Output

31 2F 2E 2C 2B 29 28 26 25 23 22 20 1F 1D 1C 1A 19 17 16 14 13 11 10 0E 0D 0B 0A 08 07 05 04 02 01 

There is a space+newline at the end.

JS Marbelous Interpreter

Cylindrical boards required.

Hints:

A001651 in hexadecimal, backwards

(a >> 4) and (a << 4) >> 4

es1024

Posted 11 years ago

Reputation: 8 953

0

C - size 62 (Cracked)

Code:

)#<("pitiful tit,handfin descended in +18_minor.")>#(%{;__*}

There are 4 spaces and 2 newlines \n in the source (not in output).

Output:

17

Possible error thrown not taken into account.

Olavi Mustanoja

Posted 11 years ago

Reputation: 149

Would you please confirm the cracking attempt by user23013? The cracking attempt seems to have too many spaces. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

@n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ wasn't gonna until I got home, but looking at it quickly I'd say there's 5 spaces in his attempt. Only 4 spaces in the actual code, though, so doesn't pass. – Olavi Mustanoja – 11 years ago

@user23013 Sorry but 1 space too much – Olavi Mustanoja – 11 years ago

Cracked. – es1024 – 11 years ago

0

C - size 19

Code:

int main(){return;}

There is 1 space.

Output:

Segmentation fault

or similar.

Compiled in http://codepad.org/

Olavi Mustanoja

Posted 11 years ago

Reputation: 149

1OS? Compiler? Segmentation fault usually is the by product of undefined behavior, and it varies between systems. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

@n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ edited – Olavi Mustanoja – 11 years ago

Cracked. – jimmy23013 – 11 years ago

0

Python 2, 45 [safe]

Code:

3
((([])))**``,,::-=>ccddeeiinoopprrttuuuuuuw

(Contains one newline and no further whitespace.)

Output:

67156035937662544426

Hint (though I'm not sure it helps):

If you replace the 3 by a 4 the output grows to 993 digits. For 5 it's even 91585 digits.

Solution:

u=3 print`reduce(pow,(u*u-(oct>id),)*u)`[::u]

Explanation:

Okay, maybe this was overdone. :-) The (oct>id) was a red herring and is just a fancy way of spelling 1 because in Python functions are ordered alphabetically by name. Using tuple multiplication, the argument of the reduce function then boils to reduce(pow,(8,8,8)) which is ((8)**8)**8 or6277101735386680763835789423207666416102355444464034512896. Because this would be an easily recognizable number, it's then converted to a string and only every third digit is printed.

Emil

Posted 11 years ago

Reputation: 1 438

0

C++, 244 bytes (one linebreak, 19 spaces) (Cracked)

Source

 !#%''''''''''''''''''''''''((()))++,,,,,,,,,,,/00122224::;;;;;<<<<====>CCCCCCDDDDDD[[]]aaaaaaaaacccdddeeeffhhiiiiiillllllllllmmnnnnnnnnnnnnnnnnooooooooooooooooorrrrrrrrrrrrsssstttttttttttttttttttuuuuuuuuuuuuuuwwwwwww{{{{}}}}

Output

hello world!

A couple hints

  • Output is achieved using a really unorthodox process.
  • The source code isn't 'scrambled', per se. (Just alphabetized.)

Gabe Evans

Posted 11 years ago

Reputation: 171

How many spaces? I counted only 224 non-whitespace characters. With the initial space and new line, that makes 226 bytes, not 244. – r3mainer – 11 years ago

Cracked, I think – r3mainer – 11 years ago

I had a method in my scrambler that counted the number of bytes that were in the file it loaded into memory. It said '244 bites', so I went with that. (Edit: verified character count with an ascii counter online. 244 is accurate.) Also, @squeamishossifrage, It does the same thing, but the extra characters ARE used, not just tossed into the end. =P – Gabe Evans – 11 years ago

I just realized most of those characters are used in variable names. Didn't realize smallest score won. >_< – Gabe Evans – 11 years ago

0

C - size 33 (Cracked)

Code:

#() {} * +257;
adeeefiimnnnppprrtu

So 3 spaces and 1 newline

Output:

Exits with return code 173

Olavi Mustanoja

Posted 11 years ago

Reputation: 149

Cracked – r3mainer – 11 years ago

0

Javascript, 35

Scrambled: a)o29t;((1lae1.2(ll=h3t(;rM)4)g)lll7

Output: 0.674284933420515

Maltysen

Posted 11 years ago

Reputation: 25 023

Cracked – r3mainer – 11 years ago

0

JavaScript, 72 [SAFE]

Output:

35616001553385

Code scramble:

Math.exp(unoat(exp){ecit((("x")ps.in(1.19+21)).sit())+flr()})loop[ferln]

Unscrambled:

(function(exp){alert((""+exp.sin(1.21)).split(9)[1])+exp.floor()})(Math)

MegaTom

Posted 11 years ago

Reputation: 3 787

0

JavaScript, 24 characters

Code:

('oogles').oil + 'chn';

Output:

hi

(with newline)

Works on pretty much any browser, or Node.js (but not Rhino).

Should be very easy to crack.

190n

Posted 11 years ago

Reputation: 101

Cracked. – Martin Ender – 11 years ago

Sorry, there was an extra period in the scrambled version. Your solution works, though! – 190n – 11 years ago

0

Python, 39 [Cracked]

Scrambled code

for{{5210},{101},{6}}at{print(("m.",))}

Output

06555

user34736

Posted 11 years ago

Reputation:

Cracked yesterday but forgot to post here, sorry. – Uri Granta – 11 years ago

0

Processing, 77

Scrambled code -

// L0L =>
line(987654321);
Lint( <.< ^=^ ;=; >=< ^ );
script {wh LLL >> LLL};

Prints this to the console -

11677374506454972755473030033

It also opens a small window with a grey square in it, the same thing that shows up when you run a totally blank sketch. I don't think there's anything I can do about this in Processing.

Tested in Processing 2.2.1 but should work in pretty much any version. Thanks for playing!

quat

Posted 11 years ago

Reputation: 1 211

0

Javascript - 68 [SAFE]

Scrambled Code

''''((( )))++,,.00012567;==ABCCISaaadeeffffghimnnooprrrrrssssssttvxx

Output

9+10

Answer

var s=String,sf=s.fromCharCode;sf(57)+sf('0x2B')+parseInt('0x0A',16)

Jamie Barker

Posted 11 years ago

Reputation: 145

0

Javascript - 15 (Cracked)

Scrambled Code

''O1ahintsM.()+

Output

0.8414709848078965O

EZ PZ :D

Answer

Math.sin(1)+'O'

Jamie Barker

Posted 11 years ago

Reputation: 145

Cracked. – Martin Ender – 11 years ago

0

Python, 13 [Cracked]

Code

printline("")

Output

6

user34736

Posted 11 years ago

Reputation:

Cracked. – ProgramFOX – 11 years ago

0

PHP, 56 chars

  ""$$((())),.0;<=>??EFIL[\]______herecefhillnnoopppstw2

(begins with two spaces)

Output

3249

EDIT:

I thought this one was fairly easy.

Hint:

This code relies on just one math function.

user3807877

Posted 11 years ago

Reputation: 21

0

Python 2 (Cracked)

Scrambled Code:

int r*37230,
p rp tin * 73

Output:

222222

Oliver Ni

Posted 11 years ago

Reputation: 9 650

Cracked. – NinjaBearMonkey – 11 years ago

0

Python 2, 78

int pint=2222222****************2222222****************2222222,
rp r= 61727176

Output

16777216

UPDATE The output has a newline after it.

Oliver Ni

Posted 11 years ago

Reputation: 9 650

Actually, the output had a newline after it. – Oliver Ni – 11 years ago

Anyway, my solution has a trailing new line after all. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

Plus, you gave the wrong url. – Oliver Ni – 11 years ago

OK, here is the correct URL. Cracked (No change to the source code, the output should still be valid).

– n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

Cracked. – None – 11 years ago

0

Python, size 30 (Cracked)

This one is just for fun, since my last one wasn't solved. :D
Again using http://repl.it/

Scrambled

:: rsin[~rot13('0ddf') + 69][]

Output

=> 'rot13'

Original Source

Will be posted later, because I didn't like his workaround. Solve THIS instead. Nobody solved it! Muahahaha!

str(d for d in[])[9:6:~0]+'13'

For an explanation, go to the link above.                    ^

Just to be more clear that the '=>' isn't part of the string

mbomb007

Posted 11 years ago

Reputation: 21 944

Cracked – r3mainer – 11 years ago

It appears you found a workaround. Editing it to remove the possibility of that workaround. – mbomb007 – 11 years ago

0

Python, size 15 (Cracked)

This one is for the gold, though I find that unlikely. Again using http://repl.it/

Scrambled

[~]/:.*034`57:`

Output

=> '6991'

Original Source

`.03*7/5`[::~4]
~4 is just a fancy way to write -3

mbomb007

Posted 11 years ago

Reputation: 21 944

Cracked – r3mainer – 11 years ago

Does anyone know how I can correctly format the code in the solution? The backticks need to be escaped, but it'd be nice if the code could be formatted like code also (which normally involves surrounded with backticks, but it won't work.) Indenting with 4 spaces isn't working either. – mbomb007 – 11 years ago

@squeamishossifrage Thanks. – mbomb007 – 11 years ago

0

CMD, 9 (Cracked)

/0at!es!!

No spaces in source - Just a big fan of Oaties.

Output: 1

unclemeat

Posted 11 years ago

Reputation: 2 302

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

0

CMD, 21 (Cracked)

echo "/test!!">>afile

No files are produced.

Output: 0

Original program

set /a"!echo>>!tfile"

I evaluate two separate strings with ! (negation), each producing 1 - then perform a logical shift >> on the two values - which produces 0.

unclemeat

Posted 11 years ago

Reputation: 2 302

Cracked – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

-1

Python 2, 89 - Cracked

Code

   ''''''''((()))*,,,,...12;;=BFGGIIIILPRaaaaaabceeeeeeffgggggiiiiiklmmmmmmnnoopprrrsttvw

Output

No output to STDOUT ;)

Beta Decay

Posted 11 years ago

Reputation: 21 478

2Cracked. Turns out no unscrambling was necessary! – feersum – 11 years ago

@feersum I don't know if it's allowed, but I clarified what my code should do... – Beta Decay – 11 years ago

"Your program and output must use printable ASCII." And no fair adding new output after I already cracked it... – feersum – 11 years ago

-1

Java 6+ / Oracle's implementation (218 bytes)

Code

 ((((((()))))))*+,...........
000000000111222225677;;;
DEIPPSSS\\\\\\aaaaaaaaaaaabccccccccddeeeeeeeeeeeeffggggh
iiiiiiiiiiiijjllllmmmmnnnnnnnnnooooooppppppqqqq
rrrrrrrrssssstttttttttttttttttttuuuuuuuuvvxxxxyyy
{{{{}}}}

There are 5 new lines and 1 space. No other invisible character.

Output

723Unmatched closing ')'

With these many characters, it is probably open for many possibilities.

Hint

I don't know if there is any other solution, but it seems I have limit the solution to the following direction quite well.

import
java.util.regex.*;
class{public
static
void
main(String){try{Pattern.compile(((()))+.....000000000111222225677DI\\\\\\aaacdeeeeeffggiijnnopqqqqrstttuuuuux,);}catch(PatternSyntaxException ){System.out.print();}}}

And second hint is long-standing bug.

n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

Posted 11 years ago

Reputation: 5 683

Hmm, seems familiar, didn't I already do that one? – feersum – 11 years ago

@feersum: Yes, it is a rehashed version, but slightly modified - not sure if it can be solved similarly, though. – n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳ – 11 years ago

-4

Python - 62

Code

odado96\n5oar)mamn0arrd)(snp,nn.2m7dtitit.\nrmr)3i4(n nrope81(ed

Output

60132

Answer:

import random
random.seed(6)
print (random.randint(9805,73241))

f.rodrigues

Posted 11 years ago

Reputation: 645

Does this work in both Python 2 or 3? – Martin Ender – 11 years ago

Not sure since I don't have Python 3.

Probably it does. – f.rodrigues – 11 years ago

1Really, even with the argument of print needing parentheses? – feersum – 11 years ago

Well, in this case it will be missing those parentheses. – f.rodrigues – 11 years ago

Also, are there any newlines? While we're at it :) – Sp3000 – 11 years ago

Now for the third time it has a different set of characters and a different output. – feersum – 11 years ago

I had to change a few things that changed the output. Sorry for the inconvenience. Now it's working fine. – f.rodrigues – 11 years ago

Do the \ns represent newlines or a \\ and an n ? – feersum – 11 years ago

\n are newlines – f.rodrigues – 11 years ago

In that case the character count is not equal to the number of characters given. – feersum – 11 years ago

2cracked gg – feersum – 11 years ago

I had a bad feeling that the first line was import random... – Sp3000 – 11 years ago

Yes, random seem counterintuitive in search for a specific output, but since seed() makes this less random, it's still valid. – f.rodrigues – 11 years ago

5@f.rodrigues One could argue, that using a seed and randomint counts as hashing. – Martin Ender – 11 years ago