title: Unscramble the Source Code

text:
# Question
Title: Unscramble the Source Code
> **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̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

```
$(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>
```

# Answer
> 71 votes
## 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.

# Answer
> 55 votes
## Python 3, size 12 (Cracked)

```
print (abcd)

```

My program produces no output and no errors.

# Answer
> 41 votes
# CJam, size 20 (Cracked)

## Code

```
"Stop, Hammer time!"

```

## Output

```
2.956177636986737

```

# Answer
> 27 votes
# 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.

# Answer
> 25 votes
## 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 :)

# Answer
> 23 votes
# 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.

# Answer
> 18 votes
## 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).

# Answer
> 16 votes
# Ruby, 17 (Cracked)

Going for something really short this time.

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

```

Output:

```
2
2

```

# Answer
> 16 votes
## GolfScript (16 bytes) \[SAFE\]

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

```

Expected output:

```
-117345085515973157874551915956356303213327583847247840186528288852476459638212404362749

```

Original source:

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

# Answer
> 13 votes
# 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 `sum`med.

# Answer
> 12 votes
# Python, size 56 (cracked)

## Code

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

## Output

`hi mom`

# Answer
> 11 votes
# 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

# Answer
> 9 votes
# Pyth, 11

```
\\,,"$: Ndw

```

### Output:

```
",input(),"

```

# Answer
> 9 votes
# 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);`

# Answer
> 8 votes
# Ruby, 38 - cracked by Martin Büttner

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

```

Output:

```
u

```

Original:

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

# Answer
> 7 votes
# Python 3, size 16 (Cracked)

Code:

```
help tim__rolo__

```

Output (with newline at end):

```
Hello world!

```

# Answer
> 7 votes
# 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`.

# Answer
> 7 votes
# Ruby, 33 - cracked by user23013

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

```

Output:

```
[*]

```

Original:

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

# Answer
> 7 votes
## 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".

```

# Answer
> 7 votes
# 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.

# Answer
> 6 votes
# Perl, 36 ← cracked by grc

## Code

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

```

## Output

```
perl

```

Tested here

# Answer
> 6 votes
# 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

```

# Answer
> 6 votes
# PHP, size 49 \[Cracked by Martin Büttner\]

## Code

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

```

## Output

```
{main}

```

# Answer
> 6 votes
# CJam, 32 bytes (cracked)

### Scrambled source

```
"Beware the Jabberwock, my son!"

```

### Output

```
4074552392882954617076720538102062920

```

# Answer
> 6 votes
# MATLAB, 41 bytes

### Cracked by feersum

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

```

### Output

```
1

```

# Answer
> 6 votes
## Pyth \- 35 - Cracked

In the spirit of @MartinBüttner:

### Code

```
"Programming Puzzles and Code Golf"

```

### Output

```
4.459431618637297

```

Try to decode it online here.

# Answer
> 6 votes
## J, 22 bytes

### Code

```
!%()1348:::bbceehorvxx

```

### Output (97 chars)

```
1226317306651180983274420265228191056569220222873505571155987454033425908908110103433163350999040

```

I expect this to be practically impossible...

# Answer
> 5 votes
## 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]`

# Answer
> 5 votes
## TinyMUSH 3.1, 20

Scrambled:

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

```

Output:

```
3210

```

# Answer
> 5 votes
# CJam, 19 (Cracked)

## Code

```
JJ2334567899#%**~""

```

## Output

```
500827930823087774653348

```

# Answer
> 5 votes
# Grass, size 134 \[safe\]

## Code

```
WWWWwwWwWwWWWwWWWWwwwWwWwwwWwwwwwWWwWwwWwWWwWwwWWwwwwWwwwwWwwwWWwwwWwwwWWwwwWWWWWWWWwwWWwwwWwWWWWWwWWWwWWwwwwWWWwwWWwwwWwWWWwWwwwWWWWW

```

## Output

```
wwwwwwwwwwwwwww

```

Tested in the Python interpreter.

## Solution

> `wWWWwwwwWwwwwwWwWwwwwwWwwwwwwwwWWwWWWwWWWWwWWWWWWwwwwwwWwwwwwwWwwwWWwWWWwWWWWwWWWWWWwwwwwwWwwwwwwWwwwWWwWWWwWWWWwWWWWWwWWWWWWwWWWWWWWw`

I wonder if anyone has tried...

# Answer
> 5 votes
# 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.

# Answer
> 5 votes
# 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()`.

# Answer
> 5 votes
# GolfScript, 20 bytes \[safe\]

## Code

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

```

## Output

```
32

```

**Output does not have a newline character in the end.**

Inspired by this comment.

## Solution

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

# Answer
> 5 votes
# 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`

# Answer
> 5 votes
# JavaScript, 73

### Code

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

```

### Output

```
denied

```

# Answer
> 4 votes
## PHP, 53 (Cracked)

### Code

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

```

### Output

```
571349220413226117734422843528553434864141775449210755731225661136475615328581707

```

# Answer
> 4 votes
# 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 ''

```

# Answer
> 4 votes
# Golfscript, 32

## Code

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

```

## Output

```
1993841993677373809355710590420516863199384199367737380935571059042051686311

```

# Answer
> 4 votes
# PHP, size 23 \[Cracked\]

## Code

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

```

## Output

```
bbbbb

```

# Answer
> 4 votes
# JavaScript, length 32 (cracked)

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

```

## Output

```
puGiXm

```

# Answer
> 4 votes
# 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');}`

# Answer
> 4 votes
# 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...

# Answer
> 4 votes
# 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.)

# Answer
> 4 votes
# CJam, 34 bytes (cracked)

### Scrambled source

```
""Beware the Jabberwock, my son!""

```

### Output

```
1.0245778622239579

```

# Answer
> 4 votes
# 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.

# Answer
> 4 votes
# Ruby, 35

**Code**

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

```

**Output**

```
shadilyshadily

```

# Answer
> 4 votes
# 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*

# Answer
> 4 votes
## 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").

# Answer
> 4 votes
## Perl - 26 bytes (cracked by choroba)

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

```

### Output

```
potato

```

# Answer
> 4 votes
# 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.

# Answer
> 3 votes
# CJam, size 15 (Cracked)

## Code

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

```

## Output

```
882

```

# Answer
> 3 votes
# 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

```

# Answer
> 3 votes
## SAS, 17 (Cracked)

```
%%()1;>>aabelptuv

```

Outputs 0

# Answer
> 3 votes
# 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.

```

# Answer
> 3 votes
# 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).

# Answer
> 3 votes
# 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...

# Answer
> 3 votes
# C++, 192 chars (Cracked)

## Code

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

```

## Output

```
3.141592653589793

```

# Answer
> 3 votes
## GolfScript (13 bytes) (Cracked)

```
&+,,../224?{}

```

Expected output:

```
1234260885218145824583458445854586253225388392299142924142925142926142927142928302928497409497409

```

# Answer
> 3 votes
# 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).

# Answer
> 3 votes
# 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));}`

# Answer
> 3 votes
# 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).

# Answer
> 3 votes
# Java - 70 bytes

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

```

output:

```
s

```

no quotation marks? What sorcery is this???

# Answer
> 3 votes
# 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.

# Answer
> 3 votes
# 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 `if`s 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))))`

# Answer
> 3 votes
# 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.

# Answer
> 3 votes
## 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.

# Answer
> 3 votes
# 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*

# Answer
> 3 votes
## 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

```

# Answer
> 3 votes
# 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])`
> :)

# Answer
> 3 votes
# 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`

# Answer
> 3 votes
## Java, size 134 (Cracked)

**Code:**

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

```

**Output:**

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

```

# Answer
> 3 votes
# 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.

# Answer
> 3 votes
# Ruby, size 17

## Code

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

```

## Output

```
1

```

# Answer
> 3 votes
# CJam, size 51

Thought I'd give this a *shot*!

**Code**

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

```

**Output**

```
Bond, James Bond.

```

# Answer
> 3 votes
## 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

```

# Answer
> 3 votes
# 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

# Answer
> 3 votes
## 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`.

# Answer
> 3 votes
# 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

```

# Answer
> 3 votes
# ASP/ASP.Net - 14 \[SAFE\]

### Code

```
<%=Len('12')%>

```

### Output

```
1

```

### Answer

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

# Answer
> 2 votes
# CoffeeScript, size 25 \[Cracked\]

## Code

```
the terse tales // [.]

```

## Output

```
false

```

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

# Answer
> 2 votes
# 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

```

# Answer
> 2 votes
# Python 2, 29 bytes (cracked)

```
(.;i;=)de mnoprrrsssssssttyyy

```

No output.

# Answer
> 2 votes
# JavaScript, 26 (cracked)

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

```

## Output

```
999

```

# Answer
> 2 votes
# PHP, Size 14 (Cracked)

```
aaaaaa:::::??;

```

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

# Answer
> 2 votes
## Golfscript - 20 (Cracked)

```
"open world thrill!"

```

## Output

```
hello world!

```

# Answer
> 2 votes
**Lua 5.2.3, Size: 18 chars (Cracked)**

```
pghmint(rat.hue)<3

```

**Output:**

```
true

```

# Answer
> 2 votes
## JavaScript, 61 (Cracked)

### Code

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

```

### Output

```
ring

```

# Answer
> 2 votes
# APL, size 17 (Cracked)

## Code

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

```

There is a space

## Output

```
27 3 3 4.434264882430378e+38

```

Tested here.

# Answer
> 2 votes
# 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 _;`

# Answer
> 2 votes
# 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.

# Answer
> 2 votes
## Perl 5, size 27 (cracked)

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

```

Output:

```
ohm

```

Works under `use strict`.

# Answer
> 2 votes
# 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

```

# Answer
> 2 votes
# 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...

# Answer
> 2 votes
# 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 :)

# Answer
> 2 votes
# 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.

<sup>For a BF program, 118's not that long...</sup>

---

## 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.

# Answer
> 2 votes
# C, 30 (cracked by feersum)

## Code

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

```

## Output

```
1

```

# Answer
> 2 votes
# ECMAScript, 26

***Run in a Chrome browser console***

# Code

```
$( convenient )({"awful"})

```

# Output

`$ {}`

# Answer
> 2 votes
# Ruby, 49 - cracked by nooodl

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

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

```

Newlines are significant. Output:

```
'
""

```

Original:

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

# Answer
> 2 votes
# 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.

# Answer
> 2 votes
# Mathematica, 18 (Cracked)

## Code

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

```

## Output

```
-EulerGamma + Log[2]

```

# Answer
> 2 votes
# Haskell, 48 (safe)

## Code

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

```

## Output

```
[""]

```

## Solution

-

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

# Answer
> 2 votes
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])`

# Answer
> 2 votes
## C, 53 bytes \[Cracked\]

### Code

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

```

### Output

```
58980

```

# Answer
> 2 votes
# 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).

# Answer
> 2 votes
## 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);}`

# Answer
> 2 votes
# Rust + Clojure, version 2 \[SAFE\]

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

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

Checked with dash, bash, ksh a zsh.

# Original source codes

**⚠Note: without `>!` spolier marks.⚠**

```

    (the code is immediately visible below)

```

**⚠Note: without `>!` spolier marks.⚠**

### Rust

(does not work anymore with modern Rust)

```
fn x(r:int)->int{if r==1{1}else if r%2==0{x(r/2)+1}else{x(3*r+1)+1}}fn main(){for i in range(1,50){print!("{}",x(i))}}

```

### C

```
int x(int r){if(r==1)return 1;if(r%2==0)return x(r/2)+1;return x(3*r+1)+1;}int main(){int i;for(i=1;i<50;++i)printf("%d",x(i));}

```

### Perl

```
int x(int r){if(r==1)return 1;if(r%2==0)return x(r/2)+1;return x(3*r+1)+1;}int main(){int i;for(i=1;i<50;++i)printf("%d",x(i));}

```

### Clojure

```
(defn x[r](+ 1(if(= r 1)0(if(=(mod r 2)0)(x (/ r 2))(x (+(* 3 r)1))))))(doseq[i(range 1 50)](print (x i)))

```

### Shell

```
r(){ if [ $1 = 1 ]; then echo 1; elif [ $(($1%2)) = 0 ]; then echo $((1+`r $(($1/2))`));else echo $((1+`r $(($1*3+1))`));fi;}; for i in `seq 1 49`; do printf `r $i`; done

```

### Haskell

```
x 1=1;x r|mod r 2==0=1+x(div r 2)|True=1+(x$3*r+1);main=mapM_(putStr.show.x)[1..49]

```

### Hint

```
echo 'http://en.wikipedia.org/wiki/Collatz_conjecture' | perl -pe 's//\n/g' | sort -R | tr -d '\n'; echo

```

Characteres were manually moved around to make it appear like a character substitution command, which is a red herring.

# Explanation

Here is readable modern Rust code:

```
fn x(r: i32) -> i32 {
    if r == 1 {
        1
    } else if r % 2 == 0 {
        x(r / 2) + 1
    } else {
        x(3 * r + 1) + 1
    }
}
fn main() {
    for i in 1..50 {
        print!("{}", x(i))
    }
}

```

It prints 50 elements of https://oeis.org/A008908 glued together. Algorithm is the same for all languages.

# Answer
> 2 votes
# Interactive Python 2.6, 15 (Cracked)

## Code

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

```

## Output

```
270379522836753144265438496266566370136712020517640818813356355859028442008312225243036620289437521825508656065633888910684906390684337129360048186258048309000927118105125771665297425865729520809425997055097487267500801951307326211801132325770579267579825036033131104326181952588158139706361336195297731164624948083473959541919960343244739151223433852746136342590068225162166489275334797736589658479803522799496232002081568176260061240500941862631613470208955583641209766953178421429600070039361764538653961951816L

```

## Original code

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

# Answer
> 2 votes
# 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:

> « C$ 3 $12 7 2 / INT + »

# Answer
> 2 votes
# 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.

# Answer
> 2 votes
# Mathematica, 31

## Code

```
PowerMod[123456789,123456789,^]

```

## Output

```
1617298209804017979868926932743750272386265163887231542207613855504645035580118031906932144113367511

```

# Answer
> 2 votes
# 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

```

# Answer
> 2 votes
## Python, 28 (Cracked)

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

Output: 100220321420320200100

# Answer
> 2 votes
# 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.

# Answer
> 2 votes
**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).

# Answer
> 2 votes
## 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.

# Answer
> 2 votes
# Python - 37

```
mr79ltmo22mat51p*h(* .ian tpihgt)or()

```

(NB: there are *exactly* two trailing spaces)

This is both easy and hard at the same time.

This program

+Returns 1975

+Does not error or throw any warings

+Uses all of the characters (no print(1975) for you)

As a bonus challenge:

```
(t.nmm)t(= (ihn ))tttu*oaniiorm(tignp2hlpa) npr * 2

```

(NB2: trailing space)

This takes in a number n as input and returns it, with no errors/unused characters.

# Answer
> 1 votes
# Javascript size 13 (Cracked)

Going for the shortest, runs on shell

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

# Output

```
"0"

```

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# CJam, 18 (Cracked)

## Code

```
012234567889""**%~

```

## Output

```
444

```

# Answer
> 1 votes
# Python, 68 (Cracked)

## Code

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

```

## Output

```
#123456789

```

# Answer
> 1 votes
## 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^=]

```

# Answer
> 1 votes
# Python \[both\], 154 characters (Cracked)

## Code

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

That's twelve (12) spaces.

## Output

`ruby`

# Answer
> 1 votes
# CJam, Size 12

### Cracked by user23013

```
!mop[ET_^~+1]

```

### Output

```
-214

```

My first ever CJam program. :)

# Answer
> 1 votes
# Python 3 size 54 (Cracked)

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

```

# Output

```
'head'

```

# Answer
> 1 votes
# 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);;++=>/|`)

# Answer
> 1 votes
## 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.

# Answer
> 1 votes
## Python 2 - 38 Cracked

## Code

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

```

## Output

```
beta

```

Now with 100% less `''` ;)

# Answer
> 1 votes
# PHP, 13 - Cracked

## Code:

```
abcde(())@i;_

```

## Output:

```
abc

```

## Original:

> die(\_(@abc));

# Answer
> 1 votes
# C - 43 - Cracked

## Code:

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

```

## Output

```
4

```

Tested with gcc

# Answer
> 1 votes
# Perl, 39 (Cracked)

## Code

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

```

## Output

```
H

```

Tested here

# Answer
> 1 votes
# ECMAScript, 29 (Cracked)

# Code

```
1("HAlf PEnCesEveNthswunG".5)

```

# Output

```
32768

```

# Answer
> 1 votes
# PHP, Size 30

```
hill_top_101_(at)merchant.net;

```

Prints nothing with no errors, even when E\_NOTICE is on.

# Answer
> 1 votes
# 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]);`

# Answer
> 1 votes
# Mathematica, 35 characters (Cracked)

## Code

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

```

## Output

```
0

```

# Answer
> 1 votes
## 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.

# Answer
> 1 votes
## Lua (again), length 28 -- Cracked

There are no newlines, and 1 space.

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

```

## Output

```
4.9348022005447

```

# Answer
> 1 votes
# 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`

# Answer
> 1 votes
**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.

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# 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*/`

# Answer
> 1 votes
# 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

```

# Answer
> 1 votes
# Javascript, 82, \[Cracked by Shawn Holzworth\]

Run in browser console, tested on Chrome 38

## Code

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

```

## Output

```
u never find

```

# Answer
> 1 votes
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

```

# Answer
> 1 votes
# CJam, size 13 (Cracked)

## Code

```
,/*#%CEffGIKs

```

## Output

```
030819828850379075460427536222159187897761502517030034671154875945928930530907551421904962649729

```

I think this should be hard without brute-forcing.

# Answer
> 1 votes
# 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 cstd**lib**, not cstd**int** as given in the scrambled version.

`uint64_t` does require C++11....

# Answer
> 1 votes
# 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)**

>

**Source (scrambled)**

```
550780299002200104931956059169005996800195499090005297333101782

```

**Output**

```
51

```

# Answer
> 1 votes
## Javascript, 30

```
(())M^aaaehhiilmmnrtttwx

```

Output:

```
0

```

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# 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

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# 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`. ;^)

# Answer
> 1 votes
# 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).

# Answer
> 1 votes
# ECMAScript, 90

# Code

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

```

# Output

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

# Answer
> 1 votes
# 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).

# Answer
> 1 votes
# 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

```

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
## 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}`

# Answer
> 1 votes
# 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*

# Answer
> 1 votes
## Java - Size 97 (Cracked)

**Code**

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

```

**Output**

```
X^Y

```

**note:** ends with a *newline*

# Answer
> 1 votes
# Ruby, 23 (Cracked)

**code scramble:**

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

```

**output :**

```
"lice"

```

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

# Answer
> 1 votes
# 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`

# Answer
> 1 votes
## Python, 45

**Code:**

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

```

**Output:**

```
0

```

**Original**

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

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
# Brainfuck, 39

### Code

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

```

### Output

```
SOS

```

# Answer
> 1 votes
## 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

```

# Answer
> 1 votes
## 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)]))`

# Answer
> 1 votes
# CJam, 14 (Cracked)

## Code

```
1.2e35 6.78e9%

```

## Output

```
108183.05975155532

```

# Answer
> 1 votes
# Insomnia, 14 (Cracked)

## Code

(Only 1 space, as seen below)

```
yes|grep-99 ii

```

## Output

```
101291340129

```

Interpreter

# Answer
> 1 votes
# JavaScript, 36

scrambled code:

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

```

output: `ion`

# Answer
> 1 votes
## Python 2, size 13 (Cracked)

**Code**

```
ex00123679///

```

**Output**

```
0.0068493150684931503

```

**Original Source**

> 6e1//073/0x92

# Answer
> 1 votes
# Python 3, 21 \[Cracked\]

**Code**

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

```

**Output**

```
pi

```

# Answer
> 1 votes
# 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

```

# Answer
> 1 votes
# Javascript - 10 (Cracked)

### Scrambled Code

```
foeblast()

```

### Output

```
W29iamVjdCBXaW5kb3dd

```

### Answer

> btoa(self)

# Answer
> 1 votes
# 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".

# Answer
> 1 votes
# 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.

# Answer
> 1 votes
## 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.

# Answer
> 1 votes
## 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)`

# Answer
> 0 votes
# Python \[any\] shell size 44 (Cracked)

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

```

# Output

```
'a'

```

# Answer
> 0 votes
# 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.

# Answer
> 0 votes
# Befunge-93, size 17 (cracked)

## Code

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

```

## Output

```
@

```

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

# Answer
> 0 votes
# BBC BASIC, 187 - Cracked

## Code

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

```

## Output

```
you'll never crack me

```

# Answer
> 0 votes
# PHP, 22 - Cracked by Martin Büttner

## Code:

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

```

## Output:

```
7

```

## Original

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

# Answer
> 0 votes
## PHP, 54, Cracked

### Code

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

```

### Output

```
42

```

## Original

> $a=21;$b=21;while($b){$a^=$b;$b=($b&$a^$b)\<\<1;}echo$a;

Original idea

# Answer
> 0 votes
# Haskell, size 34 (Cracked)

Shuffled:

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

```

Output:

```
-1121766947

```

# Answer
> 0 votes
## Python 2 - 57 Cracked

### Code

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

```

### Output

```
blue

```

Blue is the best colour ;)

# Answer
> 0 votes
# ECMAScript, 25 (Cracked)

***Executed on `window` object***

# Code

```
applet.stellar[flyer,(a)]

```

# Output

`function alert() { [native code] }`

# Answer
> 0 votes
# 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($_());`

# Answer
> 0 votes
# C, 28 (cracked by feersum)

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

```

Prints `Hi!`

# Answer
> 0 votes
# Java, size 108

## Code

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

```

## Output

```
3.141593

```

# Answer
> 0 votes
**Bash shell script, 33 characters**

**Code**

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

```

**Output**

```
shellpower

```

# Answer
> 0 votes
# 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 `(&)`).

# Answer
> 0 votes
# Python 3, 46

## Program

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

```

Plus two newlines.

## Output

```
'(otlotb)'

```

# Answer
> 0 votes
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))

# Answer
> 0 votes
# 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

```

# Answer
> 0 votes
# JavaScript, 285

## Code

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

```

***Note:*** The `\n`s are one character.

## Output

```
AZ

```

# Answer
> 0 votes
# Python, 41 bytes

## Code:

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

```

## Output:

```
6314

```

# Answer
> 0 votes
## 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);}`

# Answer
> 0 votes
# Arithmetic (ECMAScript, Java, C, C++, BASIC, Perl, Python, Ruby), 31

# Code

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

```

# Output

`77`

# Answer
> 0 votes
# 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!!!

# Answer
> 0 votes
# C, 63 (Cracked)

## Code

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

```

## Output

```
131088

```

## Original Solution

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

# Answer
> 0 votes
# 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!!!

# Answer
> 0 votes
## Python 2, 37

**Code**

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

**Output:**

`1`

# Answer
> 0 votes
# 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!

# Answer
> 0 votes
# 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`).

# Answer
> 0 votes
# 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!

# Answer
> 0 votes
# 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!!!

# Answer
> 0 votes
## 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.

# Answer
> 0 votes
# Python, size 37

### Scrambled:

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

```

## Output:

```
12369.0

```

# Answer
> 0 votes
# PHP, 62 chars

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

```

## Output:

```
1. Monday 2. Tuesday

```

# Answer
> 0 votes
# 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

```

# Answer
> 0 votes
# 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.

# Answer
> 0 votes
# 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.

# Answer
> 0 votes
# J 25

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

```

**output**

```
3

```

# Answer
> 0 votes
# 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

# Answer
> 0 votes
## 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.

# Answer
> 0 votes
## C - size 19

**Code:**

```
int main(){return;}

```

There is 1 space.

**Output:**

```
Segmentation fault

```

or similar.

Compiled in http://codepad.org/

# Answer
> 0 votes
# 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` or`6277101735386680763835789423207666416102355444464034512896`. Because this would be an easily recognizable number, it's then converted to a string and only every third digit is printed.

# Answer
> 0 votes
# 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.)

# Answer
> 0 votes
## C - size 33 (Cracked)

**Code:**

```
#() {} * +257;
adeeefiimnnnppprrtu

```

So 3 spaces and 1 newline

**Output:**

Exits with return code `173`

# Answer
> 0 votes
## Javascript, 35

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

**Output:** `0.674284933420515`

# Answer
> 0 votes
# 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)`

# Answer
> 0 votes
# 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.

# Answer
> 0 votes
# Python, 39 \[Cracked\]

Scrambled code

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

```

Output

```
06555

```

# Answer
> 0 votes
# 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!

# Answer
> 0 votes
# Javascript - 68 \[SAFE\]

### Scrambled Code

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

```

### Output

```
9+10

```

### Answer

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

# Answer
> 0 votes
# Javascript - 15 (Cracked)

### Scrambled Code

```
''O1ahintsM.()+

```

### Output

```
0.8414709848078965O

```

EZ PZ :D

### Answer

> Math.sin(1)+'O'

# Answer
> 0 votes
# Python, 13 \[Cracked\]

**Code**

```
printline("")

```

**Output**

```
6

```

# Answer
> 0 votes
# 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.

# Answer
> 0 votes
# Python 2 (Cracked)

### Scrambled Code:

```
int r*37230,
p rp tin * 73

```

### Output:

```
222222

```

# Answer
> 0 votes
# Python 2, 78

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

```

### Output

```
16777216

```

**UPDATE** The output has a newline after it.

# Answer
> 0 votes
## 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.                    ^
> ```

# Answer
> 0 votes
## 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`

# Answer
> 0 votes
# CMD, 9 (Cracked)

```
/0at!es!!

```

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

Output: `1`

# Answer
> 0 votes
# 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`.

# Answer
> 0 votes
## 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`

# Answer
> 0 votes
# 05AB1E, 7 bytes (Cracked by Bubbler)

Quite obvious if you examine the output, right?

```
BA5E10™

```

# Expected output

```
Abcdefghijklmnopqrstuvwxyz

```

# Answer
> 0 votes
# Actually, 6 bytes (Cracked by Bubbler)

```
Hello!

```

## Expected

```
485165195.4097903

```

# Answer
> 0 votes
# C, 117 bytes

Output:

```
*old meats*

```

Scrambled eggs:

```
o]00a;ci&955t[]e,o}ps,;5a(;o1-e=drffe0(px2,m*7^100ni,c=,,40o4xp;xom170&),at{9)x9=]h={p-,o5cm[;(nd4ex,,r([7r},xc)4)7,,

```

You earn my respect if you can guess how this program was scrambled.

# Answer
> 0 votes
# Python 3, 124 bytes

```
ticdinstliub________.:1()niprt prinont"if"
ssA sslacpa:
()Aa=
"prprontint"".a
""a()intpr:________.insbuilticd.  nipront. aif

```

Try it online!

Should output `a`.

# Answer
> -1 votes
# Python 2, 89 - Cracked

## Code

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

```

## Output

No output to STDOUT ;)

# Answer
> -1 votes
# 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.

# Answer
> -5 votes
# 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))`

---
Tags: code-golf, cops-and-robbers
---


title: Organize a Kiowa library

text:
# Question
Title: Organize a Kiowa library
We are probably all used to the English alphabetical order:

```
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

```

When we compare words in English for the sake of alphabetization we first compare the first letter, whichever word has the later first letter comes later. If they are the same we check the second letter and so on until we reach two letters that are different or one of the words runs out of letters to check in which case the word that ran out of letters comes first.

However in the Kiowa language, things work a little differently. The letters are ordered based on phonetic principles so the order is completely different:

```
A AU E I O U B F P V D J T TH G C K Q CH X S Z L Y W H M N

```

You will notice also that certain digraphs such as `TH` are considered single letters.

We can use the same process for alphabetization with the Kiowa alphabetical order to get very different results.

We start by comparing the first *letter*, noticing that the digraphs `AU`, `TH` and `CH` each count as a single letter. So if we are comparing `AN` and `AUN`, `AN` comes first because `A` comes before `AU`, even though `N` comes after `U`.

If the first letters are the same we move onto the second letter repeating the process and so on until we reach two letters that are different or one of the words runs out of letters to check in which case the word that ran out of letters comes first.

## Task

You will take two non-empty strings as input and output the string which comes first in terms of the alphabetization described above.

You may alternatively choose to always output the string which comes last or both strings in either ascending or descending order as long as you do so consistently.

The input strings will only consist of a sequence of letters from the Kiowa alphabet as described above in upper case.

This is so the goal is to minimize the size of your source code as measured in bytes.

## Test cases

Here we output the string which comes earlier.

```
A N -> A
N A -> A
EEED EEEE -> EEEE
EVEV EVEV -> EVEV
AN AUN -> AN
CH CN -> CN
CH CA -> CA
CH KH -> KH
CH XA -> CH

```

---

Some simplifications are made here to serve the purpose of this challenge. Natural languages are wonderfully complex things and you should not take anything here as fact. However if you are interested I encourage you to learn more as the details can be quite interesting.

# Answer
# , ~~99~~ ~~96~~ 95 bytes

```
\(a)a[order(chartr("AEIOUBFPVDJTtGCKQcXSZLYWHMN","1A-Z",gsub("(A)U|(T|C)H","\\L\\1\\2",a,,T)))]
```

Attempt This Online!

Outputs the sorted strings.

**Explanation outline:**

* substitutes digraphs with their first letter converted to lowercase (with some PERL regex magic)
* translates Kiowa's order to `A-Z` with `1` prepended (we omit the `a` as it's in the right place and notice that there's no `R` in Kiowa language so we need only two additional characters: `1` and `a`)
* orders with the built-in string method (digits first).
> 5 votes

# Answer
# 05AB1E, 42 bytes

```
Σžn29£S•3ž¶`ÆNιÐßóθ£÷•.Is.•1ƶ<ð•u2ôžRlS:Sk

```

I/O as a pair of string, where the output is correctly ordered.

Try it online or verify all test cases.

**Explanation:**

```
Σ                   # Sort the (implicit) input-pair by:
 žn                 #  Push "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
   29£              #  Only leave the first 29: "ABC...XYZabc"
      S             #  Convert it to a list of characters
       •3ž¶`ÆNιÐßóθ£÷•
                    #  Push compressed integer 273531916594452580416824730457
        .I          #  Get the 273...457'th permutation of the earlier string:
                    #   (as list) "AaEIOUBFPVDJTbGCKQcXSZLYWHMNR"
 s                  #  Swap so the current string is at the top
  .•1ƶ<ð•           #  Push compressed string "authch"
         u          #  Converted to uppercase: "AUTHCH"
          2ô        #  Split into parts of size 2: ["AU","TH","CH"]
            žR      #  Push builtin "ABC"
              lS    #  Converted to lowercase list: ["a","b","c"]
                :   #  Replace the ["AU","TH","CH"] to ["a","b","c"]
                 S  #  Then split the string to characters
                  k #  And get the index of each in the earlier alphabet
                    # (after which the sorted pair is output implicitly)

```

See this 05AB1E tip of mine (sections *How to compress strings not part of the dictionary?* and *How to compress large integers?*) to understand why `•3ž¶`ÆNιÐßóθ£÷•` is `273531916594452580416824730456` and `.•1ƶ<ð•` is `"authch"`.

The `273531916594452580416824730456` is generated (as 1-based index instead of 0-based) with the Jelly builtin `Œ¿`.
> 5 votes

# Answer
# JavaScript (ES6),  ~~112~~  111 bytes

*Saved 1 byte thanks to @l4m2*

Expects `(a)(b)`. Returns the string which comes earlier.

```
a=>b=>(g=s=>s.replace(/AU|[TC]H|./g,([a,b])=>10+"AA0EIOUBFPVDJTT0GCKQC0XSZLYWHMN".search(b?a+0:a)))(a)<g(b)?a:b

```

Try it online!

### How?

Using the regular expression `/AU|[TC]H|./g`, the helper function `g` replaces each Kiowa letter in a given string with a 2-digit number between 10 and 40 according to their position in the following lookup string:

```
AA0EIOUBFPVDJTT0GCKQC0XSZLYWHMN
^         ^         ^         ^
10        20        30        40

```

where the letters `AU`, `TH` and `CH` are first turned into `A0`, `T0` and `C0` respectively.

The final result is found with a standard lexicographic comparison between `g(a)` and `g(b)`.
> 1 votes

# Answer
# Perl 5, 81 bytes

```
s/(A)U|(T|C)H/$1$2_/g;s/C_/Q_/g;y/EIOUBFPVDJTGCKQXSZLYWHMN/B-Z/;/ /;$_=$F[$`gt$']

```

Try it online!

```
s/(A)U|(T|C)H/$1$2_/g;           #turn all AU, TH, CH in input into A_, T_, C_
s/C_/Q_/g;                       #turn all C_ into Q_ since CH lies right after Q
y/EIOUBFPVDJTGCKQXSZLYWHMN/B-Z/; #remap all letters into letters of correct order
                                 #...as recognized by gt below
/ /;                             #sets $` to converted string before space
                                 #...and $' to converted string after space
$_ = $F[                         #output first or second word in input array @F
  $` gt $'                       #gt is true(1) if first converted word is
]                                #...greater than(gt) the second, otherwise
                                 #...false(0), using 0 or 1 as index in array @F

```
> 1 votes

# Answer
# C (gcc), ~~282~~ 277 bytes

* -5 thanks to ceilingcat

Returns the lowest-sorted input. The digraphs are converted into `[0..2]` and the source string advanced, then the characters are compared; comparisons continue until the end of one of the strings or a mismatch.

```
#define a(a,b,c,d,e)a-c|*b-d||(a=e,b++),
*n="A0EIOUBFPVDJT1GCKQ2XSZLYWHMN";f(s,t,e,u,v,c,d)char*s,*t,*u,*v,c,d;{for(u=s,v=t,e=0;!e&&(c=*u++)&&(d=*v++);)a(c,u,65,85,48)a(d,v,65,85,48)a(c,u,84,72,49)a(d,v,84,72,49)a(c,u,67,72,50)a(d,v,67,72,50)e=index(n,c)-index(n,d);s=e<0?s:t;}

```

Try it online!
> 1 votes

# Answer
# Retina 0.8.2, ~~70~~ 68 bytes

```
%`^
$',
T`L`06ga27fu3birvx48j_nc59tmsq`.+,
05
1
cu
e
gu
k
O^`
!`\w+$

```

Try it online! Takes input on separate lines but link is to test suite that splits on commas for convenience. Explanation:

```
%`^
$',

```

Duplicate each word.

```
T`L`06ga27fu3birvx48j_nc59tmsq`.+,

```

Convert the (uppercase) letters in the first copy to an extended alphabet of digits and lowercase letters that aren't magic in Retina's Transliterate command, sorted in Kiowa order.

```
05
1
cu
e
gu
k

```

Fix up the digraphs.

```
O^`

```

Sort in reverse order, so that the required word is now at the very end.

```
!`\w+$

```

Output just that word.
> 0 votes

# Answer
# Python 2, 120 bytes

```
lambda*a:min(a,key=lambda s:map("@EIOUBFPVDJT?GCKQ#XSZLYWHMN".find,R(R(R(s,"AU","@"),"TH","?"),"CH","#")))
R=str.replace
```

Attempt This Online!

Replaces each digraph with a special character, and then uses the indices of each character in the magic string `@EIOUBFPVDJT?GCKQ#XSZLYWHMN` to choose the lexicographically earliest of the two strings.
> 0 votes

# Answer
# Charcoal, 54 bytes

```
⊟⌊ＥＥ²Ｓ⁺Ｅ⪫⪪⪫⪪⪫⪪ιAUＩ⁰THＩ¹CHＩ²⌕”B↗3∧=◧$×⁸}U‹⌕VψωB↑?υ”λ⟦⁰ι

```

Try it online! Link is to verbose version of code. Explanation:

```
    ²                                   Literal integer `2`
   Ｅ                                    Map over implicit range
     Ｓ                                  Next input string
  Ｅ                                     Map over input strings
              ι                         Current string
             ⪪ AU                       Split on `AU`
            ⪫    Ｉ⁰                     Joined with `0`
           ⪪       TH                   Split on `TH`
          ⪫          Ｉ¹                 Joined with `1`
         ⪪             CH               Split on `CH`
        ⪫                Ｉ²             Joined with `2`
       Ｅ                                Map over characters
                           ⌕            Find index of
                                 λ      Current character
                            ”...”       In compressed lookup table
      ⁺                                 Concatenated with
                                  ⟦     List of
                                   ⁰    Zero terminator
                                    ι   Current string
 ⌊                                      Take the minimum
⊟                                       Pop the original input string
                                        Implicitly print

```
> 0 votes

---
Tags: code-golf, string, natural-language
---