# Two Makes All The Difference - Cops

NOTICE - This challenge is now closed. Any new answers will be ignored and the accepted answer will not change

## Challenge

Write a valid program which, when just two characters in the program are changed, removed or added, completely changes the output.

The changed output must have a Levenshtein Distance of 15 or more from your original output.

The output must be non empty and finite. Your program therefore must terminate within 1 minute.

Your output must be deterministic, outputting the same thing each time you run the program. It also must not be platform dependent.

Any hash functions are disallowed, as are built in PRNGs. Similarly, seeding an RNG is not allowed.

After a period of three days, an uncracked submission will become safe. In order to claim this safety, you should edit your answer to show the correct answer. (Clarification: Until you reveal the answer, you are not safe and can still be cracked.)

## Formatting

# <Language name>, <Program length>

## Code

<code goes here>

## Original Output

<output goes here>

## Changed output

<changed output goes here>


## Robbers

You can find the robbers' thread here.

## Winning

The person with the shortest uncracked solution wins.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script>site = 'meta.codegolf';postID = 5686;isAnswer = false;QUESTION_ID = 54464;var safe_list=[];var uncracked_list=[];var n=0;var bycreation=function(x,y){return (x[0][0]<y[0][0])-(x[0][0]>y[0][0]);};var bylength=function(x,y){return (x[0][1]>y[0][1])-(x[0][1]<y[0][1]);};function u(l,o){ jQuery(l[1]).empty(); l[0].sort(o); for(var i=0;i<l[0].length;i++) l[0][i][1].appendTo(l[1]); if(l[0].length==0) jQuery('<tr><td colspan="3" class="message">none yet.</td></tr>').appendTo(l[1]);}function g(p) { jQuery.getJSON('//api.stackexchange.com/2.2/questions/' + QUESTION_ID + '/answers?page=' + p + '&pagesize=100&order=desc&sort=creation&site=codegolf&filter=!.Fjs-H6J36w0DtV5A_ZMzR7bRqt1e', function(s) { s.items.map(function(a) { var he = jQuery('<div/>').html(a.body).children().first(); he.find('strike').text(''); var h = he.text(); if (!/cracked/i.test(h) && (typeof a.comments == 'undefined' || a.comments.filter(function(b) { var c = jQuery('<div/>').html(b.body); return /^cracked/i.test(c.text()) || c.find('a').filter(function() { return /cracked/i.test(jQuery(this).text()) }).length > 0 }).length == 0)) { var m = /^\s*((?:[^,;(\s]|\s+[^-,;(\s])+)\s*(?:[,;(]|\s-).*?([0-9]+)/.exec(h); var e = [[n++, m ? parseInt(m[2]) : null], jQuery('<tr/>').append( jQuery('<td/>').append( jQuery('<a/>').text(m ? m[1] : h).attr('href', a.link)), jQuery('<td class="score"/>').text(m ? m[2] : '?'), jQuery('<td/>').append( jQuery('<a/>').text(a.owner.display_name).attr('href', a.owner.link)) )]; if(/safe/i.test(h)) safe_list.push(e); else uncracked_list.push(e); } }); if (s.length == 100) g(p + 1); else { var s=[[uncracked_list, '#uncracked'], [safe_list, '#safe']]; for(var p=0;p<2;p++) u(s[p],bylength); jQuery('#uncracked_by_length').bind('click',function(){u(s[0],bylength);return false}); jQuery('#uncracked_by_creation').bind('click',function(){u(s[0],bycreation);return false}); } });}g(1);</script><link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"><style>table th,table td { padding: 5px;}th { text-align: left;}.score { text-align: right;}table a { display: block;}.main { float: left; margin-right: 30px;}.main h3,.main div { margin: 5px;}.message { font-style: italic;}</style><div class="main"><h3>Uncracked submissions</h3><table> <tr> <th>Language</th> <th class="score">Length</th> <th>User</th> </tr> <tbody id="uncracked"></tbody></table><div>Sort by: <a href="#" id="uncracked_by_length">length</a> <a href="#" id="uncracked_by_creation">creation</a></div></div><div class="main"><h3>Safe submissions</h3><table> <tr> <th>Language</th> <th class="score">Length</th> <th>User</th> </tr> <tbody id="safe"></tbody></table></div>

• @BetaDecay How do you define a hash function? – isaacg Aug 11 '15 at 8:47
• @xnor Theoretically, but the number of possibilities increases hugely as the program length increases and so may take a long time – Beta Decay Aug 11 '15 at 8:48
• @RedPanda Yes, I would think so – Beta Decay Aug 11 '15 at 10:34
• @isaacg I decided to change the safe date to three days – Beta Decay Aug 12 '15 at 7:37
• Would it be possible to put the leaderboard code on fewer lines so it takes up less visual room? – isaacg Aug 13 '15 at 0:49

# VBA, 72 bytes

Sub q()
Dim a(2) As Double
a(0)=-5
a(1)=10
msgbox IRR(a,0.253)
End Sub


Original Output

 0.999999999999136


1.82842712474619


Need to see some more VBA representation round here.=) Runs in Excel 2007+

• The adjusted output looks so familiar. I feel like that's a number I ought to know. – Alex Van Liew Aug 12 '15 at 18:16
• @AlexVanLiew The adjusted output is probably equal to 2*sqrt(2)-1 according to WolframAlpha – mbomb007 Aug 12 '15 at 20:19
• @mbomb007 Yeah, that's what I was thinking too. I also feel like that number holds some significance, but I don't think it's a trig special angle and I can't think of what might generate it. – Alex Van Liew Aug 12 '15 at 20:27
• cracked – mbomb007 Aug 13 '15 at 15:47
• Good job. Its hard to hide what your doing in vba. So i went with the fact there are a lot of obscure libraries for finance functions that i thought most programmers won't know what they do. Sadly programmers are fast learners. Might have to try again a little more obscure this time. – JimmyJazzx Aug 13 '15 at 17:36

## bc, 22 bytes

4518574615489737231532


Current output

4518574615489737231532


Desired output

195543687803724


# MATLAB, 62 bytes

## Code

mistake=-1;tragic=rosser;a=hilb(8)*42;
a(:,:)+tragic(8)/mistake


## Original Output

   13.0000   -8.0000  -15.0000  -18.5000  -20.6000  -22.0000  -23.0000  -23.7500
-8.0000  -15.0000  -18.5000  -20.6000  -22.0000  -23.0000  -23.7500  -24.3333
-15.0000  -18.5000  -20.6000  -22.0000  -23.0000  -23.7500  -24.3333  -24.8000
-18.5000  -20.6000  -22.0000  -23.0000  -23.7500  -24.3333  -24.8000  -25.1818
-20.6000  -22.0000  -23.0000  -23.7500  -24.3333  -24.8000  -25.1818  -25.5000
-22.0000  -23.0000  -23.7500  -24.3333  -24.8000  -25.1818  -25.5000  -25.7692
-23.0000  -23.7500  -24.3333  -24.8000  -25.1818  -25.5000  -25.7692  -26.0000
-23.7500  -24.3333  -24.8000  -25.1818  -25.5000  -25.7692  -26.0000  -26.2000


## Changed Output

  -22.0000   19.0000   11.0000  -50.5000  -51.6000    1.0000   -1.0000  -51.7500
12.0000  -41.0000  -43.5000   -3.6000   -6.0000  -45.0000  -44.7500  -11.3333
-3.0000  -36.5000  -37.6000  -13.0000  -15.0000  -37.7500  -37.3333  -19.8000
-29.5000  -17.6000  -20.0000  -31.0000  -30.7500  -25.3333  -26.8000  -29.1818
-23.6000  -27.0000  -29.0000  -23.7500  -23.3333  -33.8000  -35.1818  -21.5000
-34.0000  -17.0000  -16.7500  -39.3333  -40.8000  -15.1818  -14.5000  -44.7692
-43.0000   -9.7500   -9.3333  -47.8000  -49.1818   -7.5000   -6.7692  -53.0000
-2.7500  -53.3333  -54.8000   -1.1818   -0.5000  -58.7692  -60.0000    1.8000

• That's just evil. lol. – rayryeng - Reinstate Monica Aug 13 '15 at 14:56
• @rayryeng: but it has 42 in it! – Jonas Aug 13 '15 at 14:58
• ... and that's why it's even more evil lol. We still don't know what the question is! – rayryeng - Reinstate Monica Aug 13 '15 at 14:59
• Cracked – Luis Mendo Aug 13 '15 at 16:04

# Code

format long
arg = [.1 .2 .3];
sin(arg'*exp(9))


## Original Output

  -0.220680258232564
-0.430479305680324
-0.619052457794081


## Changed Output

  -0.803636351328917
-0.721159584869623
-0.148487879352133


Hint: there's another solution to this question

• But this doesn't fulfill the minimum Levenshtein distance requirement – Luis Mendo Aug 13 '15 at 14:24
• The Lev. distance for this code is 12. Minimum is 15. – rayryeng - Reinstate Monica Aug 13 '15 at 14:29
• @rayryeng: apologies, format long added :) – Jonas Aug 13 '15 at 14:43
• Cracked – Luis Mendo Aug 13 '15 at 15:10
• @LuisMendo: good job! – Jonas Aug 13 '15 at 16:02

# Javascript, 53 bytes

## Code

a=(((b=(a=1)+a)+a)-b-a)*(a=[b])['length'];


## Original Output

0


## Changed output

5.551115123125783e-18


Tested under: Firefox, Chrome, IE

• Interesting. So far, I managed to find 5.551115123125783e-17. – Dennis Aug 13 '15 at 13:54
• I confirm that it should be e-18. I noticed myself the solution for e-17 – Razvan Aug 13 '15 at 13:57
• Cracked. – jimmy23013 Aug 14 '15 at 0:02

## Lua, 55 bytes

Now with less skimpy underwear! This code might look like my last code that was sadly cracked, but I can assure the solution is completely different

G={load="lfkjgGsHjkU83fy6dtrg"}


Current output:

lfkjgGsHjkU83fy6dtrg


The correct output on 64 bit machines:

26


And on 32 bit machines:

18

• I can't quite figure this one out. – Alex Van Liew Aug 13 '15 at 2:09
• Sorry, the output is that number. I'll edit my answer. – Nico A Aug 13 '15 at 17:17
• Cracked by Xrott? – Dennis Aug 14 '15 at 3:33
• @Dennis Yeah, I'm pretty sure that's the intended solution – Alex Van Liew Aug 14 '15 at 16:52

# Stuck, 21 Bytes

I'll start with an easy one, since nobody has seen this before and there's no documents.. Anyways, Stuck is a stack-based language, very similar in usage to CJam. All you need to know is:

NR -> creates a range [1,N] on the stack.
[N]z -> zips together the top 2 lists, unless an optional N is specified, then the top N lists.
] -> Flattens the top list by one "dimension".


For the record, while I have made commits since this challenge happened, all of this functionality has been present long before.

### Code:

1R2R3R4R5R6R7R8R9R9z]


### Original Output:

(1, 1, 1, 1, 1, 1, 1, 1, 1)


### Changed Output:

(1, 1, 1, 1, 1, 1, 1, 1)(2, 2, 2, 2, 2, 2, 2, 2)(3, 3, 3, 3, 3, 3, 3, 3)

• I made a minor edit that I think helps clarify the commands, let me know if it looks good. – Alex Van Liew Aug 13 '15 at 17:08
• @AlexVanLiew Yeah, that should help clarify :) Thanks! – Kade Aug 13 '15 at 17:25
• No problem. One other thing: does the R command create an inclusive range or an exclusive range? ie, does 1R push an empty list, or does it push [1]? (same thing for 2R, does it push [1] or [1, 2]?) – Alex Van Liew Aug 13 '15 at 18:08
• @AlexVanLiew Just clarified that in the post. It's inclusive. – Kade Aug 13 '15 at 18:21
• Cracked. – Alex Van Liew Aug 14 '15 at 17:22

Cracked

# Ruby, 24

## Code

p _=?9;p$.+=1until 9#$./


## Original Output

"9"


## Changed output

"9"
1
2
3
4
5
6
7
8
9

• Do all Ruby programs look like someone took a shotgun loaded with ASCII and shot it at the screen, or just the ones that I see here? – Alex Van Liew Aug 13 '15 at 2:51
• Ruby was designed to let you choose whether you imitated Perl (seemingly any random keysmash is valid syntax) or Python (just copy-paste the pseudocode and you're good to go). On these sorts of challenges Perlisms tend to do better. – histocrat Aug 13 '15 at 15:03
• No kidding. I couldn't even figure out what the original snippet does (random space between p and _? adding 1 to the value of the global that keeps track of line numbers 9 times? or adding 1 to the value of p$., which ought to be nil, which seems like it ought to throw an error?). I'll leave this one for one of the greats. Or at least someone that knows Ruby, ahaha. – Alex Van Liew Aug 13 '15 at 17:12 • The "9" and trailing / makes me think there is a regex involved here – gnibbler Aug 14 '15 at 22:27 • This one is totally messing with me... Closest so far is p _=?9;p$.+=1until 9<$.... Arrgghh! :) – Dom Hastings Aug 15 '15 at 12:26 # Befunge 98, 30 Bytes(Safe) ## Code 153+:*,+:f#v_ + ':_;#:-1;#@;,  ## Original output: @@@@@@@@@@@@@@@@  ## Changed output: @~}|{zyxwvutsrqponmlkjihgfedcba_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!


## Solution

g53+:*,+:f#v_
+ ':_;#:-1;#<@;,

• Why u so cruel?! – mbomb007 Aug 13 '15 at 19:49
• Is there a trailing space in the changed output? – Alex Van Liew Aug 14 '15 at 17:53
• @AlexVanLiew no trailing space. The '!' is the last character. – MegaTom Aug 14 '15 at 18:46
• Alright, I might give this a try when I get home. I've always wanted an excuse to learn this language. Can you link to the interpreter/compiler you used? – Alex Van Liew Aug 14 '15 at 18:47
• @AlexVanLiew befungius.aurlien.net – MegaTom Aug 14 '15 at 18:48

# PowerShell v3, 384 (SAFE)

(My second post ever on PPCG, please be gentle. :) I think I'm going to like this community!)

## Code:

$s="a*h*t*s*m*i*d*o*n*l*k*e*y*u*g*r*w*LOOD> AIG BAE>!+<R S!>>+<GH MHN JFKL> LOOD AIG BAE>?<+"$cur="";$l="";[char]$n="A";$st=@{} foreach($c in [char[]]$s){switch -regex($c){
"[\*\>]" {$st[$n]=$cur.TrimStart(" ");$n=[char]([int]$n-1);if($c-eq">"){$l+=$cur};$cur=""} "\+" {$l=$cur;$cur=""}
"\<" {$l+$cur;$l="";$cur=""}
default {if($st.Contains($c)){$cur+=$st[$c]}else{$cur+=$c}}}}  ## Original output: eggs and ham! eggs and ham! do you like eggs and ham?  ## Modified output: ! GH MHN JFKL LOOD aIG BaEt  (to be clear, that's a blank line in the middle of the modified output) Mini-hint: h/t to Adam Barr for the inspiration ## Edit - Safe - Below is corrected code, and below that is explanation $s = "a*h*t*s*m*i*d*o*n*l*k*e*y*u*g*r*w*LOOD> AIG BAE>!+<R S!>>+<GH MHN JFKL> LOOD AIG BAE>?<+" # The string we're cycling through
$cur = "" # What word(s) we've currently built$l = "" # The current line we've finished building
[char]$n = "A" # Cast as a character instead of a string, this is the index of our temporary store$st = @{} # Our temporary store - the first time through, this will populate out with the first part of the string $s foreach ($c in [char[]]$s) { # Loop through the string$s as an array, one $c character at a time switch -regex ($c) {
"[\*\>]" {
$st[$n] = $cur.TrimStart(" ") # Ensures that we're not adding a space, and adds what we've currently built into the store$n = [char]([int]$n + 1) #ONE OF THE CHANGES - Changed the +1 to -1, which causes the indexing of the store to be off if ($c -eq ">") { $l +=$cur } # If our current character is a >, add that to the line as it's finished
$cur = "" # Reset what we're building } "\+" {$l += $cur #ONE OF THE CHANGES - Changed the += to =, which causes the line to not get printed$cur = "" # Reset what we're building
}
"\<" {
$l +$cur # Add on our current word to the line and print it out
$l = "" # Reset our line$cur = "" # Reset what we're building
}
default {
if ($st.Contains($c)) {
$cur +=$st[$c] # If our store contains the character, add what's in the store's index at$c to our current word
} else {
$cur +=$c # Else, just add the character to our current word
}
}
}
}


# Explanation

The best way to explain this is that we're using the string at the start as a sort of cypher. The first half of the string, demarcated by asterisks, is our cypher results. The rest of the string is the output, encoded based off of the "integer" value of the letter (from an alphabetical perspective, not an ASCII perspective). For example, the LOOD> takes the 12th character (an e), the 15th character (a g) twice, and then the 4th character (a s), which forms the word eggs, then the > case, which trims off what we're building so that our words don't run together.

The script cycles through the string character by character, building the cypher store at first (because of all the asterisks, the first 34 times through the switch causes either the first case or the default case to be called), while the rest of the times through cause either an index lookup (because we've already added that letter) or text manipulation (e.g., the second change which just re-sets a variable rather than print it out).

Please let me know if you have further questions!

• This is safe now, you can reveal the solution if you wish – Beta Decay Aug 16 '15 at 0:13

# Fantom, 30 (safe)

## Code

[7115432d/9,219.or(64),37][0]


## Original Output

790603.5555555556


## Changed output

55


## Solution

"7115432d/9,219.or(64),37"[0]


By changing the array to a string literal, the index call actually gets the first character of the string. Characters in fantom are actually just ints, so the value of '7' is 55.

• Hey, you can still change the . to a , and change the index to 3 ([7115432d/9,219.or(64),37,55,0f][3]). I'll give you grace so you can fix it up again. ;P – Alex Van Liew Aug 13 '15 at 17:06
• Hey, thanks, that distraction was too much work for what it was worth – Cain Aug 13 '15 at 18:08
• You enjoy red herrings, don't you? 119.xor(64) is so close! – Alex Van Liew Aug 13 '15 at 18:22
• @AlexVanLiew Haha that's the idea, I wanted 55 to come up all over the place – Cain Aug 13 '15 at 18:37

# Malbolge, 411 bytes

### Code

bCBA@?>=<;:9876543210/.-,+*)('&%$#"!~}|{zyxwvutsrqponmlkjihgfedcba_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9y76543210/(L,l$H('&%$#"!~}v{zyxwvutm3qponmlkjihgfedcba_^]?zZYXWVOTSRQPONMFjJIHGFEDC<@?!=<;4X87w/S3s10/.-,+*)('&%$#"!~}|{zyxq7Xtmrk1onPlkdihg&dcbD_^]\[ZYXQutTSRQPONMLKJCgGFEDCBA@?>=<;:z81Uv43210/.'Kl*#G'&f|{A!~}|{zs9qvo5mrqponmle+*hgfe^c\"_^]\[ZYXWV8Nr5QPONGkKJ,HGFEDCBA@?>=<;:3W76/432+O/o-,+*)('&%|B/


### Original output

Two Makes All The Difference


### Modified output

Two


(note the trailing space)

### Solution

bCBA@?>=<;:9876543210/.-,+*)('&%$#"!~}|{zyxwvutsrqponmlkjihgfedcba_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9y76543210/(L,l$H('&%$#"!~}v{zyxwvutm3qponmlkjihgfedcba_^]?zZYXWcOTSRQPONMFjJIHGFEDC<@?!=<;4X87w/S3s10/.-,+*)('&%$#"!~}|{zyxq7Xtmrk1onPlkdihg&dcbD_^]\[ZYXQutTSRQPONMLKJCgGFEDCBA@?>=<;:z81Uv43210/.'Kl*#G'&f|{A!~}|{zs9qvo5mrqponmle+*hgfe^c\"_^]\[ZYXWV8sr5QPONGkKJ,HGFEDCBA@?>=<;:3W76/432+O/o-,+*)('&%|B/


# Perl, 49 byes (safe)

## Code

$_=cos 99;printf"%.16f",0x7275*sin$_/s/[3-8]/04/


## Original Output

145.9795577401910975


## Changed Output

23.3077670014990304


## Clue

I tried to do this before but there was another unintended (easier) solution. The robber to my previous challenge may help you solve this one. Try to solve it with three modifications and you'll be half way to the two modification answer.

# Solution

$_=cos 99;printf"%.16f",07275*sin$_/y/[3-8]/04/

1. Remove the x to turn hexadecimal 0x7275 (decimal 29301) into octal 07275 (decimal 3773)

2. Change the s/// (replacement) to y/// (transliteration) so that instead of the first digit from 3-8 becoming the string 04, all digits in that range become 4. Additionally, both return the number of changes; the s/// version only makes one change while y/// makes all 8 changes (the way s///g would). If you could change a third character, you could do s/[3-8]/4/g and have the same result as my y/[3-8]/04/. (This was exploited to solve my previous attempt.)

Example of s/// vs y///:

$_="s: 1234567890, ";s/[3-8]/04/;print;$_="y: 1234567890";y/[3-8]/04/;print
s: 12044567890, y: 1244444490
So therefore we're multiplying by a changed number and the function at the end alters the default variable differently and divides by a different number.

• Good going! Closest I got was 23.5402686025187862 with $_=cos 99;printf"%.16f",0x1275*sin$_/s/[3-8]/04/ didn't think to change the s///, d'oh! – Dom Hastings Aug 19 '15 at 6:35

# Cracked

C++ 91 Bytes

#include <iostream>
int main()
{
//can you figure it out?
std::cout << "I like cake and";
}


Output:

I like cake and

Changed output

• Your changed output is unclear? Is empty, a single newline or something else? – Dennis Aug 11 '15 at 21:55
• Cracked. I'm not really sure this is valid, though, as the spec says that output must be non-empty; it's unclear if this refers to both outputs or just the original one. – Alex Van Liew Aug 11 '15 at 22:03
• This is invalid. None of the outputs can be empty. CC @AlexVanLiew – Beta Decay Aug 11 '15 at 22:22
• Alex, I can't comment on the other post (not enough rep) but you got me – DoYouEvenCodeBro Aug 11 '15 at 23:03
• @f41lurizer Good try for a first post, but trigraphs and other similar shenanigans are pretty well known around here. Try giving it another go! – Alex Van Liew Aug 12 '15 at 18:18

# PHP 5.4, 92 bytes

<?php
define('E','!');

$x = 4;$t = " Hello World";
$t .= E;$t .= E;
$t .= E; print($t);


### Output:

 Hello World!!!


### Changed Output:

 Hello World! Hello World! Hello World! Hello World!


(Note: both outputs include a leading space)

• Please refer to the formatting guide (Byte count is missing) ;) – Beta Decay Aug 12 '15 at 12:04
• @BetaDecay sorry, I missed that! Usually I omit that from non-golfed code and completely missed it in the rules! – Dom Hastings Aug 12 '15 at 12:14
• It's fine by me :-D – Beta Decay Aug 12 '15 at 12:15
• Crack attempt #2 – Nathan Merrill Aug 12 '15 at 12:36
• @NathanMerrill You got it! – Dom Hastings Aug 12 '15 at 12:43

## Lua, 54 Bytes

G={string="gs_hSDrGSFG5;U*ts"}
print(tostring(G.string))


Current output:

gs_hSDrGSFG5;U*ts


Desired output:

23


Note: I'm not exactly sure why, but if you are using an online compiler (specifically repl.it) the correct output will be 15.

• Could you post which environment you're using that achieves 23? I can get 15 in lots of different ways on repl.it and lua53.exe. – Alex Van Liew Aug 12 '15 at 18:39
• Lua 5.2 on Windows 7. Don't think it makes a difference, but installed through LuaRocks. – Nico A Aug 12 '15 at 18:48
• This might give it away, but the way you tell is this program: t = {} print(t) If it says table: 0000000(random numbers) then the correct answer is 23, if it says 0x(random stuff) the correct answer is 15. – Nico A Aug 12 '15 at 18:52
• Hmm. Well, cracked? I'm almost certain the reason the 15/23 difference exists is because the intended solution has to do with pointer size (if you print a table, it prints the memory location); so on a 64-bit system you go from a 8-character pointer to a 16-character pointer; which accounts for the missing (extra?) 8 characters. I'll see if I can figure out what the intended solution was in the meantime, though. – Alex Van Liew Aug 12 '15 at 18:52
• Actually no, I'm going to edit my code a bit. The only reason you got 15 is because the length of G.string is 15, but the length of G is only 15 because of the Levenshtien distance rule. Sorry about that, I'm going to edit my code. – Nico A Aug 12 '15 at 18:53

# PHP, 21 bytes

## Code

print_r(range(i,09));


## Original Output

Array ( [0] => 0 )

## Changed output

Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 )

# Fantom, 34

## Code

[7115432d/9,219.or(64),37,5555][0]


## Original Output

790603.5555555556


## Changed output

55


Ok, hopefully this one is a little more competitive than my previous attempt. Levenshtein Distance of 15. Run it in fansh.

## Better Code

@isaacg found an easy solution I hadn't even seen. This code removes that solution while keeping the original one I intended, if anyone still wants the challenge.

[7115432d/9,219.or(64),37,55.0f][0]

• Cracked. – isaacg Aug 13 '15 at 0:39
• This is clearly not my game – Cain Aug 13 '15 at 1:35
• @Sp3000 I mean the new code I posted is the one to be cracked, without the loophole I missed that isaacg found. – Cain Aug 13 '15 at 1:43
• I think it'd be better to make a new answer for that (or you won't show up on the snippet) – Sp3000 Aug 13 '15 at 1:48

# Matlab/Octave, 10 bytes

this should be a fairly easy one.

I only tried it with Octave online, but it should run fine in matlab.

## Code:

e^(i*pi)+1


## Output

0.0000e+00 + 1.2246e-16i


## Changed Output

1.9336e+04

• Cracked. – isaacg Aug 13 '15 at 8:21
• @isaacg not the solution i had intended, but it works ;) to keep it short i left out the format long, then using 2 would not match the output. but nevertheless, well done! – paul.oderso Aug 13 '15 at 8:51
• +e then, I assume? – isaacg Aug 13 '15 at 8:58
• @isaacg right ;) – paul.oderso Aug 13 '15 at 9:11

# Javascript, 169 bytes

## Code

a=1,b=a*2,c=a+b,d=[a+b];while(c>b)c-=a;for(i=1;i<=c;i++)d.push(i);i=''+c*d['length']*d['length'];alert(Math[String.fromCharCode(i.charCodeAt(0) * i.charCodeAt(1) / 32)])


## Original Output

undefined


## Changed output

2.718281828459045

• Cracked. – Dennis Aug 12 '15 at 16:37

# Python 2, 57 bytes

## Code

i=long;j=map;print reduce(i.__mul__,j(i,j(ord,i)))/1234


## Original Output

3164217824783520557889


## Changed output

9072146982802639849575831250318562874251

• Cracked – Sp3000 Aug 12 '15 at 9:52

# Python 2, 41 bytes

## Code

print sum((ord(i)<<0x156 for i in sum))


## Original Output

19718712710133388269747721838124583424582966957653854505259504044885223633870136963133245450763229047291904


## Changed output

20

• Cracked – Sp3000 Aug 12 '15 at 12:15

# MATLAB / Octave, 33 bytes

## Code

eig(cov(reshape(sin(1:60),5,[])))


## Original Output

ans =

-0.0000
-0.0000
-0.0000
-0.0000
-0.0000
-0.0000
0.0000
0.0000
0.0000
0.0000
2.4410
4.5766


## Changed Output

ans =

0.0064
0.0000
0.0000
-0.0000
-0.0000
0.0000


# Code:

f=@(x)x^.7;g=@(x)7/f(x);g(7)


# Original output:

ans =

1.7928


# Changed output

ans =

-0.3011 - 0.4144i


# Clojure, 35 Bytes

## Code

(printf "%d\n" 2155263413256326162)


## Original Output

2155263413256326162
nil


## Changed output

3681347803529195
nil


# GolfScript, 4 bytes

9,!9


### Original output

09


(trailing linefeed)

### Modified output

0123456789012345678


(no trailing linefeeed)

If you test your code in Web GolfScript, you have to look at the source code of the output, since the (lack of a) trailing linefeed will be undetectable in the rendered page. For the correct solution, there should be no linefeed between 0123456789012345678 and </textarea>.

It might be easier to use the Ruby interpreter for this one.

• 012345678*9*012345678? – The_Basset_Hound Aug 13 '15 at 21:08
• Yes, the 9 has to stay. – Dennis Aug 13 '15 at 21:09
• – The_Basset_Hound Aug 13 '15 at 21:23
• Crap, how do I format that? – The_Basset_Hound Aug 13 '15 at 21:23
• Cracked. – jimmy23013 Aug 13 '15 at 23:22

# CSS, 53

## Code

body:after{counter-reset:a 512;content:counter(a)"₽"}


## Original Output

512₽


## Changed output

0%


## Snippet

body:after{counter-reset:a 512;content:counter(a)"₽"}

• "The changed output must have a Levenshtein Distance of 15 or more from your original output." – Jakube Aug 14 '15 at 9:19
• @Jakube, ok, I'll think about a fix. Anyway, there is no common symbols in input and output and it's impossible to only change output directly without getting my idea. – Qwertiy Aug 14 '15 at 9:40
• Cracked and unfortunately i don't think a high enough distance is possible because counter-reset maxes at 2417483647 – SLuck49 Aug 14 '15 at 12:34
• I was wrong, it is possible if you add multiple counters like so body:after{counter-reset:a 2417483647;content:counter(a)counter(a)"₽"} – SLuck49 Aug 14 '15 at 12:40
• @SLuck49 Your "cracked" link is wrong. – isaacg Aug 14 '15 at 19:57

# Mathematica, 35 bytes (safe)

## Code

z=Zeta[4/3,1/2];N[Min[z,Sec[z]],20]


## Original Output

1.4508303658284314991


## Changed output

-0.72451364607415832407


Edit: Note that the original code will sort-of work on Wolfram Alpha, but the modified code does not.

# Changed Code

z=Zeta[4/3,1/2];N[Sin[z,Set[z]],20]


Set[z] evaluates to Sequence[] so Sin[z,Set[z]] = Sin[z]. Moreover, Mathematica evaluates function arguments serially and in order, so Set[z] is evaluated after the value of z is already used.

• I hate seeing answers in Mathematica, since it's a proprietary language. There's no way for us to test it if we don't pay for it. – mbomb007 Aug 13 '15 at 19:49
• @mbomb007 Many people on PPCG do have a copy of Mathematica. If you don't, then you can simply scroll past my answer. – jcai Aug 13 '15 at 20:00
• Sometimes they work on WolframAlpha. – Alex Van Liew Aug 13 '15 at 20:37
• @mbomb007 - MATLAB is as well, but I don't see people complaining about it. Octave is not a full replacement to MATLAB, much like Wolfram Alpha isn't a replacement for Mathematica. I like seeing Mathematica code because it's cool to see how some minor changes gives you extraordinarily different output. – rayryeng - Reinstate Monica Aug 14 '15 at 15:14

# APL, 5 characters

3⍟877


## Current output

6.1682424839682115


## Modified output

0.20016493054644696


An edit distance of 16.

• Cracked – Dennis Aug 16 '15 at 17:44

# Python 2/3, 70 bytes (safe)

## Code

x=932436
for i in range(99**4):x=(1103515245*x+12345)%2**31
print(x*x)


## Original Output

211455574532454121


## Changed output

1039038861760158249


## Solution

x=9372436
for i in range(59**4):x=(1103515245*x+12345)%2**31
print(x*x)


The solution initializes x to 9372436 instead of 932436, and does range(59**4) instead of range(99**4). As an aside, the solution runs in about 1/10th of the time.

I probably could have made it shorter without making it too much easier, or at all easier.

• This is python 3 only, but i assume that using python 2 won't hurt (original code returns (459842989, 459842989)) – Blue Aug 12 '15 at 10:17
• Oh yea, I doubled the output to conform to the Levenshtein distance rule; forgot it would be a tuple in Python 2. Still, same effect. – Cyphase Aug 12 '15 at 10:38
• Since you use brackets on the print, I think you should say this is Python 3, for good form – Beta Decay Aug 12 '15 at 12:04
• Those two parentheses are the only difference between Python 2 only and Python 2/3; the output is slightly different in each, but I don't think that violates any rules; certainly not the spirit of the rules. But if it really is bad form, I guess I'd go with the Python 2 only version to save 1 byte. – Cyphase Aug 12 '15 at 12:08
• wouldn't print(x*x)` work ok too? – gnibbler Aug 13 '15 at 14:10