The Mystery String Printer (Robbers)

26

2

The cops thread can be found here: The Mystery String Printer (Cops)

Your challenge

  • Choose a submission from the cops thread, and print out the string from an answer in that thread.
  • The submission that you choose must not be safe (it must be newer than 7 days).
  • Your program, function, or REPL script needs to follow the same rules as the cops thread. Just to recap:

    • Your program must be ≤128 characters (if a cop's submission is in a smaller range of program lengths, your program must also be in that length range. For example, if a cop's program is ≤32 bytes, your program must be ≤32 bytes).
    • The program must produce the same output every time it is run.
    • No cryptographic functions.
    • The program must not take input.
    • No standard loopholes.
  • All new submissions must use the same language. Submissions from before this rule was made are fine, even if they don't.

Scoring

Scoring works similarly for robbers, but it is slightly different:

  • Cracking any program of ≤8 bytes gives 1 point.
  • Cracking a ≤16 byte program gives 2 points. ≤32 bytes gives 4 points, and so on.
  • Every additional submission, no matter the length, earns +5 points
  • Each cop's submission can only be cracked once- only the first person to crack each submission gets the points.

Submissions

Each answer must include

  • A link to the cop's submission.
  • Your program and programming language.
  • Also have the cop's program length (as a power of 2) as the last number in your header.

Additionally, please comment on the cop's submission with a link to your answer.

Here is a Stack Snippet to generate leaderboards. Please leave a comment if there is a problem with the snippet. If you would like to see all open cop submissions, see the snippet in the cops' challenge.

/* Configuration */

var QUESTION_ID = 60329; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";

/* App */

var answers = [],
  answers_hash, answer_ids, answer_page = 1,
  more_answers = true,
  comment_page;

function answersUrl(index) {
  return "//api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "//api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {

  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });

}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      data.items.forEach(function(c) {

        answers_hash[c.post_id].comments.push(c);

      });

      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var POINTS_REG = /(?:<=|≤|&lt;=)\s?(?:<\/?strong>)?\s?(\d+)/
var POINTS_REG_ALT = /<h\d>.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;


function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {

  var valid = [];
  var open = [];

  answers.forEach(function(a) {

    var body = a.body;
    var cracked = false;

    var points = body.match(POINTS_REG);
    if (!points) points = body.match(POINTS_REG_ALT);

    if (points) {
      var length = parseInt(points[1]);
      var crackedpoints = 0;
      if (length > 64) crackedpoints = 16;
      else if (length > 32) crackedpoints = 8;
      else if (length > 16) crackedpoints = 4;
      else if (length > 8) crackedpoints = 2;
      else crackedpoints = 1;

      valid.push({
        user: getAuthorName(a),
        numberOfSubmissions: 1,
        points: crackedpoints

      });
    }
  });

  var pointTotals = [];
  valid.forEach(function(a) {

    var index = -1;
    var author = a.user;
    pointTotals.forEach(function(p) {
      if (p.user == author) index = pointTotals.indexOf(p);
    });

    if (index == -1) pointTotals.push(a);
    else {
      pointTotals[index].points += a.points;
      pointTotals[index].numberOfSubmissions++;
    }

  });

  pointTotals.forEach(function(a) {
    a.points += +((a.numberOfSubmissions - 1) * 5);
  });

  pointTotals.sort(function(a, b) {
    var aB = a.points,
      bB = b.points;
    return (bB - aB != 0) ? bB - aB : b.numberOfSubmissions - a.numberOfSubmissions;
  });

  pointTotals.forEach(function(a) {


    var answer = jQuery("#answer-template").html();
    answer = answer
      .replace("{{NAME}}", a.user)
      .replace("{{SUBMISSIONS}}", a.numberOfSubmissions)
      .replace("{{POINTS}}", a.points);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);


  });

}
body {
  text-align: left !important
}
#answer-list {
  padding: 20px;
  width: 240px;
  float: left;
}
#open-list {
  padding: 20px;
  width: 450px;
  float: left;
}
table thead {
  font-weight: bold;
  vertical-align: top;
}
table td {
  padding: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">
<div id="answer-list">
  <h2>Robber's Leaderboard</h2>
  <table class="answer-list">
    <thead>
      <tr>

        <td>Author</td>
        <td>Submissions</td>
        <td>Score</td>
      </tr>
    </thead>
    <tbody id="answers">

    </tbody>
  </table>
</div>

<table style="display: none">
  <tbody id="answer-template">
    <tr>
      <td>{{NAME}}</td>
      <td>{{SUBMISSIONS}}</td>
      <td>{{POINTS}}</td>
    </tr>
  </tbody>
</table>

This contest is now closed.

Overall winner: kennytm

Most submissions: Sp3000

(Note that the amount of submissions doesn't translate exactly to the points, as the length of the cracked program is counted when calculating the score).

Daniel M.

Posted 2015-10-11T02:38:50.903

Reputation: 3 737

Note: every additional submission earns 5 points – Daniel M. – 2015-10-12T20:13:11.027

Answers

29

Pyth, Dennis, ≤ 8

V./Tp*FN

Damn that was fun - the hardest part was figuring out how to do it short enough in Pyth.

Analysis

The 1234 at the start hints that we're probably dealing with a list of numbers, printed without a separator. Let's try and split the numbers up in a way that makes sense:

1 2 3 4 4 6 5 8 8 9 6 12 10 12 7 16 16 18 12 15 16 8 24 20 24 14 27 18 20 9 32 32 36 24 30 32 16 36 21 24 25 10

There's a few hints that we're on the right track:

  • All numbers have prime factors less than 10
  • A lot of numbers are pretty close to their index in the list

However, there are a few peculiarities. The number at index 23 is 24, and is the only case where the number at the index is greater than the index itself. However, the bigger clue is that some numbers are clearly smaller than their neighbours, particularly the 7 at index 15, the 8 at index 22 and the 9 at index 30.

Noting that this forms a 7-8-9 pattern, we can also see that the last number is a 10 at index 42. Given @Dennis' recent question on abelian groups, a quick check on OEIS reveals that 15, 22, 30, 42 is a subsequence of the partition numbers. Pyth has a builtin for partitions, which gives us two of eight characters: ./

But note that the last number is 10, which is suspicious because 10 is a preinitialised variable in Pyth, as T. ./T gives a full list of the 42 partitions of the number 10, which looks like it might come in handy.

Now the printing is done without a separator, so this hints at a use of p. Perhaps we loop through each partition, do something to it, then print with p? This gives us the following template:

V./Tp??N

where V is a for loop which loops over an iterable, storing each element in the variable N.

A quick look at the second last partition (5, 5) should make it obvious that we want to take a product. The naive way to reduce a list by multiplication is

u*GHd1

where d is the list in question. However, this is far too long.

Unfortunately, this is where I had to pull out a brute forcer. I haven't kept up with Pyth for a while, so I didn't know many of the newer features. There were only two characters left, which looked entirely doable.

The brute forcer then returned:

V./Tp*FN

where *F is fold by * (multiplication). No wonder I didn't find it in my search - I was looking up the keyword "reduce" rather than "fold"!

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

4Even possible in 7: jk*M./T – Jakube – 2015-10-11T07:39:48.633

@Jakube Oh wow, if the range had been <= 7 I would have been doomed. It sure has been a while since I've checked out the language. – Sp3000 – 2015-10-11T07:43:05.317

10

Mathematica, alphalpha, ≤ 32

GroupOrder[MonsterGroupM[]]

I hate to say this, but I just recognised the number on the spot.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

3Even shorter: 31!10!27079205916672 – kennytm – 2015-10-13T03:50:05.527

2Dammit, I knew that number looked familiar. – Dennis – 2015-10-13T03:56:03.777

9

><>, VTCAKAVSMoACE, ≤ 64

'9?':?!;1-$:'@'+o'3'*'='%$30.

Ironically, not only is this much lower the range limit, it's also portable and works with the online interpreter.

Analysis

Let's start with the target string:

yh[cPWNkz^EKLBiQMuSvI`n\Yw|JVXDUbZmfoRC_xrq{TlpHjGt]OadFAsgeyh[

><> pushes chars to the stack with ' or " in string mode, but with 63 chars to print and only 64 bytes to work with, the presence of capital letters (invalid instructions in ><>, for the standard looparound trick) make direct printing impossible. Hence, we must be doing something with the code points.

Converting to code points gives (I'm using Python here):

>>> L = [ord(c) for c in "yh[cPWNkz^EKLBiQMuSvI`n\Yw|JVXDUbZmfoRC_xrq{TlpHjGt]OadFAsgeyh["]
>>> L
[121, 104, 91, 99, 80, 87, 78, 107, 122, 94, 69, 75, 76, 66, 105, 81, 77, 117, 83, 118, 73, 96, 110, 92, 89, 119, 124, 74, 86, 88, 68, 85, 98, 90, 109, 102, 111, 82, 67, 95, 120, 114, 113, 123, 84, 108, 112, 72, 106, 71, 116, 93, 79, 97, 100, 70, 65, 115, 103, 101, 121, 104, 91]

Note that the last three numbers are the same as the first three. This hints at a possible modulo loop going on.

Let's take a look at how many different elements we have:

>>> len(set(L))
60

We have 63 elements in L, the first three of which coincide with the last three. This means that, aside from this collision, all other elements are unique. Now this hints at something like taking powers modulo a prime number. Indeed, 60 + 1 = 61 is prime, which is a good sign.

Let's try finding the smallest element

>>> min(L)
65

and use that to scale all the elements down so that the min element is 1:

>>> M = [x-64 for x in L]
>>> M
[57, 40, 27, 35, 16, 23, 14, 43, 58, 30, 5, 11, 12, 2, 41, 17, 13, 53, 19, 54, 9, 32, 46, 28, 25, 55, 60, 10, 22, 24, 4, 21, 34, 26, 45, 38, 47, 18, 3, 31, 56, 50, 49, 59, 20, 44, 48, 8, 42, 7, 52, 29, 15, 33, 36, 6, 1, 51, 39, 37, 57, 40, 27]

Note how the element after 1 is 51. If there's some sort of powers/multiplication thing going on, this is a good guess for our multiplier.

Let's give it a shot:

>>> (57*51)%61
40
>>> (40*51)%61
27
>>> all((x*51)%61 == y for x,y in zip(M, M[1:]))
True

Bingo! We can now backtrack, giving the following code:

x = 57
for _ in range(63):
    print(chr(x + 64), end="")
    x = (x*51)%61

which was then translated to ><>

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

1Interestingly, this is dissimilar many ways to what I did - I used 37 and 112 (meant to use 101, but made a mistake in the code. Epic fail) as a continued multiplication set and modulo'd with 63, then added 64 to get into a readable ASCII range. +1 Well done. – Addison Crump – 2015-10-11T14:39:46.617

Very nice, wish I could do that ;) – J Atkin – 2015-10-12T21:24:50.560

8

Pyth, Maltysen, ≤4

C.ZG

Brute force took so long that I did it faster manually.

Analysis

C (convert string to base 256 int) is the easiest way to generate a large number in Pyth, so it's probably the first character. If we convert from base 256, we get:

xÚKLJNIMKÏÈÌÊÎÉÍË/(,*.)-+¯¨¬ 

Hmm... not very illuminating.

Now G is the alphabet string "abc...z", which looks like it could be a source for a long string to feed into C. Looking through the docs I find:

.Z    Compresses or decompresses a string.

If we're dealing with compression here, it wouldn't be surprising to get all sorts of extended ASCII characters. Trying C.ZG then gave the answer.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

6

Fourier, Beta Decay, ≤ 32

2~x1~y20(xoy~z*x~yz~xq^~q)

Or alternatively, in CJam:

X0I{_2$+}*]2\f#

Analysis

At the start we can see a lot of powers of 2:

2
1
2
2
4
8
32
256
8192
2097152
...

If we take the log base 2 of these numbers, we get:

1 0 1 1 2 3 5 8 13 21 ...

which is the Fibonacci series, starting at 1, 0.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

6

Snails, feersum, ≤2 bytes

z

This is actually 2 bytes; the character z followed by a newline \n.

I have no idea how it works or what it's doing, but after testing all possible inputs apart from ~+ and ~,, this was the only 2-byte program that produced 8 as output.

And it took ages to get this result. No wonder it's called "Snails" :-D


Note to self: The next time you fuzz test unknown software, do it inside a VM.

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

5

Rust, Liam Noronha, ≤128 bytes

fn main(){print!("AACAAEGAAACIIMOAAACAAEGQQQSYYDFAAACAAEGAAACIIMOHHHJHHLNXXXAGGKMAAACAAEGAAACIIMOAAACAAEGQQQSYYDFOOO");}

Simply printing the string verbatim is 120 bytes...

Doorknob

Posted 2015-10-11T02:38:50.903

Reputation: 68 138

1wow it was late when I did that. So dumb sorry. I could have made the text considerably longer with no effort. I'll post the actual source. – Liam – 2015-10-11T20:51:05.943

5

Macaroni 0.0.2, Doorknob, ≤64

set x "................................."print x print x print x

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

5

Python 2, Clear question with examples, <=64

One possible solution:

print ''.join([" `{.~{{~||"[int(c)] for c in str(3**4278)])

(9**2139, 27**1426 and 729**713 also give the same result)

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

5

CoffeeScript, user2428118, ≤64

alert 0+(btoa k.substr -2 for k of document.body.style).join ''

(works only on Chrome 46.0.2490.71 as described by the Cop.)


The output is obviously a concatenation of short base64-encoded strings due to all the "=". After decoding them, we find a list of 2-character strings like

['nt', 'ms', 'lf', 'ne', 'll', 'on', 'ay', 'on', …

which does not seem to make sense. But I find some odd items in it, like nX and tY. After filtering these out we get

>>> # Python
>>>
>>> [i for i in tt if not re.match('[a-z]{2}$', i)]
['nX', 'nY', 'tX', 'tY', 'wX', 'wY', 'r', 'nX', 'nY', 'tX', 'tY', 'nX', 'nY', 'nX', 'nY', 'nZ', 'x', 'y']

These X and Y seem to indicate the original source code used position properties like offsetX/Y. A particularly interesting is the nZ item. To check my assumption, I searched for all properties that end with "Z":

// CoffeeScript
checked = []
f = (o) ->
    if !(o in checked) 
        for k of o
            if /Z$/.test(k)
                console.log(o, k)
            if o[k] instanceof Object
                f o[k]
f window

which shows tons of CSSStyleDeclaration, "webkitTransformOriginZ". From this we have a strong indication that the list is built up by the last 2 characters of all the keys of a style object, which the test above shows indeed is correct.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

You found it, congratulations! Original source code

– user2428118 – 2015-10-15T20:47:18.393

5

Lua <= 4, Egor Skriptunoff

A lot of users were getting agitated about this answer in chat, so I must relieve them from their misery. I don't know Lua and wasn't able to test it, but I would be very surprised if this doesn't work.

4^~9

This would be pretty obvious, but probably no one got it because bitwise operators were only added in version 5.3; ideone.com only has version 5.2.

feersum

Posted 2015-10-11T02:38:50.903

Reputation: 29 566

facepalm I overlooked bitwise operators because they only use integers. – LegionMammal978 – 2015-10-18T18:53:21.107

5

Python 2, histocrat, ≤16

[[[51002**3/6]]] 

The biggest hint is the promise that it won't work in Python 3. What's changed in Python 3? The biggest suspect is that the division operator returns a float in Python 3.

So I assume the solution is of the form ⌊αβ/n⌋ = c = 22111101102001, as exponentiation is the only short way to create huge numbers.

If {α, β, n} indeed forms a solution, then (cn)1/β ≈ α should be very close to an integer. Therefore I use the following to try to brute-force the {α, β} for each n:

(* Mathematica *)
n=2; Sort[Table[{N[Abs[k - Round@k] /. k -> (22111101102001*n)^(1/b), 12], b}, {b, 2, 50}]]

(* Output: {{0.00262542213622, 7}, ...}

   The first number is the "quality" of the solution, lower is better.
   the second number is β.
   Thus α ≈ (nc)^(1/β) = 89
   But (89^7)/2 = 22115667447764, which is still far away from the answer.

*)

The actual result quickly comes out when n = 6.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

Well done! That's the intended solution, and about how I expected someone would solve it (although I didn't realize ahead of time just how platform-dependent it was). – histocrat – 2015-10-19T20:11:58.170

4

MATLAB, StewieGriffin, ≤ 16

[36;87]*' |'*5

Prints:

ans =
        5760       22320
       13920       53940

Tom Carpenter

Posted 2015-10-11T02:38:50.903

Reputation: 3 990

Nice! Glad you liked it :-) the way I did it: 5*'$W'.'*' |'. – Stewie Griffin – 2015-10-12T05:25:18.613

I was considering making it a lot harder by multiplying by e.g. .73 instead of 5, do +5, or make it a 3x3 matrix but figured this was more fun. Could have done a lot with the three remaining bytes. – Stewie Griffin – 2015-10-12T05:34:50.150

@StewieGriffin Never come across .' before, but makes complete sense - was wondering how to transpose a string without resorting to brackets. – Tom Carpenter – 2015-10-12T14:22:17.373

4

Mathematica, LegionMammal978, ≤64

Print@Nest[Compress,ExampleData[{"Text","ToBeOrNotToBe"}],13]

alephalpha

Posted 2015-10-11T02:38:50.903

Reputation: 23 988

4

Matlab, Luis Mendo, ≤16

I found it, yay!

fix(peaks(9).^2)

I didn't know that Octave can do this, too.

Wauzl

Posted 2015-10-11T02:38:50.903

Reputation: 161

How? Had you heard of peaks()? – lirtosiast – 2015-10-12T14:00:37.907

Yes, I have. I have by hazard been playing around with peaks. – Wauzl – 2015-10-12T16:42:30.493

4

Python, spacemanjosh, ≤ 64

n=0;d=1;L=[]
exec("L+=[10/(100-n)**.5];n+=d;d+=2;"*10)
print(L)

Glorious inverse symbolic calculator. Not well golfed, but hey it fits.

Edit: I golfed it.

print([10/(100-n*n)**.5for n in range(10)])

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

4

JavaScript ES6, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤128 bytes

var x=122,s='0037122342526683102122';for(var i=23;i<=505;i+=2)s+=(x+=i);s;

I doubt this is exactly right since I didn't need anywhere near 128 bytes, but finding a repeating sequence was fun challenge.

SLuck49

Posted 2015-10-11T02:38:50.903

Reputation: 901

Wow. I used a completely different method. Does that still count? :3 – Conor O'Brien – 2015-10-13T17:40:00.007

@CᴏɴᴏʀO'Bʀɪᴇɴ Usually does. I'm really curious about the original and what produces those first 22 bytes though, I'd guess something funky in the loop init – SLuck49 – 2015-10-13T19:15:23.213

I'll post it when I get the time. I think its the flooring of the function s * s - s/(5-s) – Conor O'Brien – 2015-10-13T19:17:54.847

4

Thue, ppperry, <=64

0::=11
1::=22
2::=33
3::=44
4::=55
a::=bbb
b::=000
::=
aaaaaaa

Decomposes 2016 into its prime factors, essentially. 62 characters, so my guess is this is similar to what you were going for.

histocrat

Posted 2015-10-11T02:38:50.903

Reputation: 20 600

You can do 0::=2222 to save some bytes. – lirtosiast – 2015-10-13T22:31:48.577

Fair point, seems a bit less elegant though. – histocrat – 2015-10-13T23:02:50.737

4

Python, DLosc, ≤32

(This solution uses Python 2)

a=97
while a<4e31:a^=a*2;print a

Egor Skriptunoff

Posted 2015-10-11T02:38:50.903

Reputation: 688

4

><>, Sp3000, <=8

'l(?; o>

The instruction pointer wraps around and the following steps happen:

  • 'l(?; o>' pushes the ASCII values of l(?; o> to the stack
  • l pushes the size of the stack on the stack
  • ( compare the top two stack elements: size of stack and ord('>')
  • ?; stops the program if the stack size was bigger
  • o output the top element of the stack as character (this will be always o)
  • > sets IP direction, here it is no-op
  • we go back to the first step

Output is oooooooooooo.

We can get a lot of different outputs by changing [space] to something which pushes or pops on the stack and using another valid character instead of >, which may also push or pop.

randomra

Posted 2015-10-11T02:38:50.903

Reputation: 19 909

Nice! For reference, I had: 'l=?;o* – Sp3000 – 2015-10-15T16:03:58.867

4

CJam, Reto Koradi, ≤ 4

HJK#

Pushes 17, then 1920 = 37589973457545958193355601.

Try it online.

There are only so many things you can do in four bytes. An integer this big had to involve powers or factorials somehow, and a factorial would have trailing zeroes.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

That's correct. I'll handle the official post update later today. – Reto Koradi – 2015-10-16T18:14:34.740

4

JavaScript, ev3commander, ≤ 32

console.log(0.1411200080598672)

OK, that was easy.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

4

Pyth <= 4, Dennis

ljyG

That's length of join on newlines of all subsets of the alphabet.

Test run:

$ pyth -cd 'ljyG'
==================== 4 chars =====================
ljyG
==================================================
imp_print(Plen(join(subsets(G))))
==================================================
939524095

I figured out the number was 2^27 * 7 - 1 which is a strong hint that it's based on yG, which is 2^26 elements long. I then guessed it had to be converted to a string and its length printed. However, the only way of doing this I could think of for a while was ``, repr. Then I thought of j, which fits perfectly.

isaacg

Posted 2015-10-11T02:38:50.903

Reputation: 39 268

4

C, tucuxi, ≤64

main(i){for(i=0;i<11000;++i)if(!(i&2*i))printf("1%d",!(i&1));}

The output are all 0 and 1, but C cannot print binary directly, so it's very likely these are boolean results.

There are more 1 than 0s, so I recorded the positions of 0s (3, 9, 13, 19, …), which turns out to be OEIS A075318. This is not useful though, there isn't a simple formula to determine where a number is in this sequence.

But we note that there are all odd numbers, so perhaps (x-1)/2 = {1, 4, 6, 9, 12, …} have more useful information. And this is A003622.

A003622 can be defined as "positions of 1's in A003849", which is exactly what we need to crack here. And A003849 is defined as "A003714 mod 2", where A003714 are simply all integers that x & (2*x) == 0. Thus we have got the solution.

OEIS rox.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

truly impressive - I never cease to be surprised by the this site's users – tucuxi – 2015-10-19T16:59:00.543

4

Dyalog APL, Dennis, ≤4

*⍨⍟8

Computes ln(8)^ln(8). Would StackExchange stop converting my answers? I'll type a bunch of stuff here so it doesn't get turned into a comment.

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

I had 8*⍟⍟8 but didn't know about . Nice work :) – Sp3000 – 2015-10-22T08:23:21.570

3

Stuck, @quartata, ≤8

The following Pyth program:

^33 9

produces the desired output

46411484401953

Cracking method: Searched Google for the number.

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

3

PARI/GP, alephalpha, ≤ 4

9!-9

I don't actually know the language, but that has to be the right answer.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

3

Pyth, xnor, ≤ 4

C`CG

CG (convert the alphabet string "abc...z" from base 256) is the typical Pyth way of generating a really large number. After that it's just stringify and convert from base again.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

3

Python 3, Mego, ≤128

(Using Python 3.5.0, not tested on previous versions. 105 98 bytes.)

import sys
a=sys.stdout
sys.stdout=None
from this import*
a.write(s.translate(s.maketrans(d))[4:])

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

Very good! I did it in 94, see my cops post for code. – Mego – 2015-10-11T11:26:47.460

3

Ruby, Doorknob, ≤64

'@@'=~/(.)(.)/
p$~
test 0 rescue p"#$!@@".gsub //,$!.inspect+$/

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

3

Matlab/Octave, Wauzl, ≤16

"234"'*"567"

Using the same idea as Tom Carpenter's answer

(If it did not work, try this:)

[50;51;52]*'567'

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

@NaN See update. Both are ≤16 bytes and work on ideone. – kennytm – 2015-10-12T13:07:57.387

Nice. I had (1*'234')'*'567' in mind, because your first answer does not work in Matlab. – Wauzl – 2015-10-12T13:26:36.417

3

CoffeeScript, J Atkin, ≤ 16

Math.PI*Math.LN2

Hooray for the inverse symbolic calculator.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

Well, that was fast. – lirtosiast – 2015-10-13T02:40:36.343

Ok, that was lame of me to try that ;) – J Atkin – 2015-10-13T02:55:04.493

3

TI-BASIC, quartata, ≤2

Xmin

On a fresh calculator, the window dimensions are Xmin=Ymin= -10, Xmax=Ymax=10. I actually posted about this in a TI-BASIC golfing tip answer before @quartata posted the cop!

Current consensus is to allow all code to be run on a fresh interpreter. We can take advantage of this—all uninitialized real variables start at 0 in TI-BASIC, and Xmin starts as the possibly useful value -10. So if you ever need to take a running total in a program that doesn't take input from Ans, or you really need a -10 in one less byte, this tip can help you.

There are therefore four solutions: Xmin, Ymin, ZXmin, and ZYmin—the latter are the zoom tokens, which I don't know the exact purpose of.

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

I think the zoom tokens represent the screen location after zooming in on a graph... See here.

– mbomb007 – 2015-10-16T15:19:50.593

3

LOLCODE, sysreq, ≤ 4

OBTW

Found the intended solution here. :/

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

3+1 for either research or reading every single post on this site, not sure which – lirtosiast – 2015-10-17T02:53:12.787

3

><> , randomra, ≤ 8

'ol(?;r>

For some reason, 23 was surprisingly hard to get.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

1Nice! My solution was 'l(?;o>x, with non-deterministic run and deterministic output. – randomra – 2015-10-17T10:24:14.900

3

TI-BASIC, Thomas Kwa, ≤ 4

³√(tanh(7°

I don't have any way to test the code, so I'm not completely sure if the notation is correct. The sequence of steps I used to get the output are:

  1. Value 7.
  2. Convert from degrees to radians.
  3. Apply hyperbolic tangent.
  4. Apply cube root.

Cracking method:

  • I made the assumption that the 4 bytes were one single byte constant, with 3 operators listed as "1 byte token" in the documentation applied to it.
  • For the constants, I used the 10 single digit numbers, and pi, giving 11 options.
  • For the operators, I picked the ones from the list of one byte tokens that looked like they would make sense in this context, resulting in a list of 26 operators.

This left me with brute forcing 11 * 26 * 26 * 26 possibilities, which a small C++ program completed in milliseconds on my laptop. Listing the smallest differences to the target value, it gave a bunch in the range of 1e-5, and a single one that was about 6e-8, which was close enough to be a solution.

Reto Koradi

Posted 2015-10-11T02:38:50.903

Reputation: 4 870

1Something like ʳ? – Dennis – 2015-10-17T20:40:42.147

@ThomasKwa I multiplied by (pi/180). Reading the documentation again, I guess it makes sense that it would be the other operator. Because that one says "you can have the angle evaluated as if in degree mode". – Reto Koradi – 2015-10-17T20:47:59.747

Did you brute-force, or solve this manually? – lirtosiast – 2015-10-17T20:51:00.990

@ThomasKwa I mostly let my computer solve it. ;) I'll add some explanation. – Reto Koradi – 2015-10-17T20:52:27.150

3

gs2, quartata, Range: <= 8

\x01\x02\x01\x07/e\x81e

The number is simply 2^5040 (i.e., 2 raised to the power of 7 factorial). Factorizing it was the easy part. Finding out how to work gs2 took a lot longer.

The workings of the program are described below (using \xNN notation to represent non-ASCII bytes):

\x01\x02                   Push the number 2 onto the stack
        \x01\x07           Push the number 7 onto the stack
                /          Change this into a list [1,2,3,4,5,6,7]
                 e         Multiply everything in this list (5040)
                  \x81     Make a list containing [2,2,2...] 5040 times
                      e    Multiply everything together again

This leaves the number 27! on the stack, which is printed when the program exits.

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

3

AppleScript, VTCAKAVSMoACE, ≤16

{1=1,1=0}>0

Needs 5 more bytes to redirect to stdout, so total size is exactly 16 bytes.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

Well done! :D I was mildly hopeful that no one would recognize that the > character would throw that specific error, and try to use as integer or the like. – Addison Crump – 2015-10-18T17:32:12.177

3

JavaScript, histocrat, ≤ 32

Well, this was lucky. I needed exactly 32 bytes:

[...'aa0abaabaa4abaaaa6abaa']+''

How this works:

  • the brand new spread-operator* creates an array from a string
  • + '' forces the array to be casted to string, which implies a concatenation by , in JavaScript
  • the result of the expression is printed onto the console

So basically it's a shorter version of:

'aa0abaabaa4abaaaa6abaa'.split('').join()

* The spread-operator is a new Array Initializer in ECMAScript 2015 (ES6) standard. Works currently in Chrome and Firefox.

insertusernamehere

Posted 2015-10-11T02:38:50.903

Reputation: 4 551

1Ha, had no idea javascript had a splat now. – histocrat – 2015-10-19T13:10:17.723

2

TI-BASIC, quartata, <=7

πE8/e

I found this using RIES.

NinjaBearMonkey

Posted 2015-10-11T02:38:50.903

Reputation: 9 925

1It seems like REIS will prevent most simple math ops, which I can't say is such a bad thing. – Daniel M. – 2015-10-11T04:04:43.607

Did not know about RIES. Definitely won't be doing any number ones then :P – a spaghetto – 2015-10-11T04:14:30.543

2

LegionMammal978

Posted 2015-10-11T02:38:50.903

Reputation: 15 731

Yeah, that's right. – SuperJedi224 – 2015-10-11T16:41:23.600

2

Python, Status, ≤128 bytes

print"NEENER"*3# This code outputs the following string: "NEENERNEENERNEENER". This is achieved by evaluating "NEENER" * 3.

LegionMammal978

Posted 2015-10-11T02:38:50.903

Reputation: 15 731

2

Microscript, SuperJedi224, ≤4 bytes

'~$q

It took me a while to find the ' instruction...

LegionMammal978

Posted 2015-10-11T02:38:50.903

Reputation: 15 731

2

bc -l, NaN, <=8

l(4.76)

Derived from a rather longer solution found using ISC.

SuperJedi224

Posted 2015-10-11T02:38:50.903

Reputation: 11 342

2

Javascript, user2428118, <= 16

Math.PI*9e9

Thanks to Sven the Surfer for the help.

I used ISC which was used to crack one of my answers.

jkabrg

Posted 2015-10-11T02:38:50.903

Reputation: 299

2

TI-89 BASIC, @DankMemes, <=8

236!

The string of zeroes at the end gave it away.

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

2

Python, Zach Gates, ≤ 64

s='UCAG'
print(" ".join(x+y+z for x in s for y in s for z in s))

Behold the ton of other attempts:

# Python 3 only
from itertools import*
print(*map("".join,product(*["UCAG"]*3)))

# Python 2 only
def f(s):
 if s[2:]:print s,
 else:for x in"UCAG":f(s+x)
f("")

# Too long
o=""
for n in range(64):exec("o+='UCAG'[n%4];n//=4;"*3);o+=" "
print(o)

# Too long
L=[""]
exec("L=[x+y for x in L for y in'UCAG'];"*3)
print(" ".join(L))

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

2

><>, Cole, ≤ 8

'l?!;}n!

Pretty obvious when the code points in the output give basically all the chars.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

Didn't have time to comment on this earlier but I'm still pretty impressed at how fast you got that. I wasn't sure if errors were allowed, but I considered putting * in stead of }; would that have been any harder? Ah well, guess I'll have to take a look at your submission. – cole – 2015-10-13T02:15:35.213

@Cole * would indeed have been harder, but I'm not sure about the error thing either... – Sp3000 – 2015-10-13T02:20:20.303

2

PowerShell, TimmyD, ≤2

$?

I looked at this page of commands and found two that seemed like they would print true.

Sven Writes Code

Posted 2015-10-11T02:38:50.903

Reputation: 974

2

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

2

QBasic, DLosc, <=32

FOR c=1TO 8
?TAB(c*c);c;
NEXT

The answer was so trivial, it was converted to a comment.

TAB can be used in a PRINT (shortcut ?) statement to set the cursor position.

Fabian Schmengler

Posted 2015-10-11T02:38:50.903

Reputation: 1 972

Looks good now! (Also, not my original code, by the way--in fact, yours is 2 bytes shorter.) – DLosc – 2015-10-13T20:49:18.150

2

JavaScript, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤16 bytes

You could just enter the number in hexadecimal at the console like this:

0x6ffffffffffffe

This is one byte shorter:

s=1<<26;s*s*7-2

(In other languages, (7<<52)-2 would have worked fine, but not Javascript.)

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

Not the exact same one I had in mind. – Conor O'Brien – 2015-10-14T01:41:36.960

@CᴏɴᴏʀO'Bʀɪᴇɴ but he produced the string. Was it 7*Math.pow(2,52)? – Sven Writes Code – 2015-10-14T13:08:45.710

2

VBA, JimmyJazzx, ≤32

Sub a()
MsgBox -2^31+23
End Sub

I think; I can't actually get it to stay like this since the VBA editor reformats and adds spaces between the math operators ... but typing that in works and doesn't error...

TessellatingHeckler

Posted 2015-10-11T02:38:50.903

Reputation: 2 412

Yep. Not exactly what I had, But works just as well. VBA editor is a pain for spaces.And for most of the golfing counts its acceptable to remove unnecessary spaces from VBA. as long as when you copy paste it works.

Good job! knew someone would out math me quite quickly, but with 10 bytes to play with your limited – JimmyJazzx – 2015-10-15T11:30:30.400

2

Lua, Egor Skriptunoff, ≤ 32

_='()()()'print(_:gsub(_,_.rep))

Doub

Posted 2015-10-11T02:38:50.903

Reputation: 121

2Welcome to PPCG! You should also ensure to add a comment on Egor's answer linking back to this post, so that Egor is aware you potentially cracked the solution. – AdmBorkBork – 2015-10-15T13:03:43.277

2

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

It was also the only Google search result, but I was too slow trying to figure out how to CJam. Well done. – Sven Writes Code – 2015-10-17T23:59:28.693

2

Pip, DLosc, ≤ 4

mTB3

The value is 1000 in base 3.

This one was easy to crack manually. The most obvious guess was that it was a number converted to binary. But that number would have been 105, which has no nice shortcut, and would result in 5 bytes of code. The next attempt was to try base 3 instead of base 2, and bingo!

Reto Koradi

Posted 2015-10-11T02:38:50.903

Reputation: 4 870

2

Javascript (ES6, console), Shaun H, <= 64

[...[].pop+''].sort().map(x=>x.charCodeAt()+'').join('')

At first I thought I could get the Chrome string short enough with just hex literals, but then I realized what the code must have been doing.

Anyway, the main hint was that native functions have slightly different string representations in Chrome vs FF.

SLuck49

Posted 2015-10-11T02:38:50.903

Reputation: 901

2

J, Mauris, <=4

%!7

This wasn't difficult. 0.000198413 = 1/5040 = 1/(7!)

randomra

Posted 2015-10-11T02:38:50.903

Reputation: 19 909

2

J, Dennis, <=4

8!^5

How I found it:

  • assumed f ? ? ? format and inverted one-variable one-letter verbs (f) with no success
  • assumed x f g y format and checked fg == !! with (!!)"0/~i.10 then fg == !^ with (!^)"0/~i.10 which contained the desired output (4.81845e12) for 8!^5

randomra

Posted 2015-10-11T02:38:50.903

Reputation: 19 909

1

Mathematica, Eridan, ≤64

IntegerString[18612512719586442658197,2]

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

1

Fishing, Eridan, ≤ 32

v+CCCCCCCCCCC
  `65617`nSSP

Calculates (65617^2)^2.

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

1

MATLAB, Tom Carpenter, ≤16

v=ver;[v.Name]

Thanks Martin for helping me out with this.

a spaghetto

Posted 2015-10-11T02:38:50.903

Reputation: 10 647

1

Groovy, quartata, ≤128

Only checked on ideone, I'm not sure if the output is the same on all platforms.

ClassLoader.systemClassLoader.packages.each{if(!(it.name=~/ls$/))println it.name[6..-1].reverse()}

The it.name=~/ls$/ is to filter out the additional org.codehaus.groovy.tools package.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

Does not output the same on my system (Oracle Java 8, Groovy 2.4.5). Don't be fooled, this isn't what it looks like. – a spaghetto – 2015-10-11T18:23:33.960

Wait a second... I'm confused. I believe I might have posted the wrong string... – a spaghetto – 2015-10-11T18:25:48.880

Dammit. It appears that I posted the output of an older version of my program. I'm not sure what to do. – a spaghetto – 2015-10-11T18:27:00.257

@quartata I recommend correcting the output in your original post. kennytm, I recommend deleting this answer for now, trying to crack the corrected submission, and then undeleting it. Does that sound reasonable? – Alex A. – 2015-10-11T18:35:10.130

@quartata Updated with the new submission (still only tested on ideone, groovy 2.4).

– kennytm – 2015-10-11T19:00:25.783

You got me (and you outgolfed me by one character D:) – a spaghetto – 2015-10-11T20:43:51.193

1

Octave, flawr, ≤4

i^-i

which is equal to eπ/2 ≈ 4.8105.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

Dangit, you got it just before me! – Addison Crump – 2015-10-11T18:44:00.847

1

vim, Doorknob, 16

:redi@"|Ni!
pg?G

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

1

STATA, bmarks, ≤32 bytes

set ob 82
g a=_n*9/8
set ob 99
l

This uses the free interpreter.

LegionMammal978

Posted 2015-10-11T02:38:50.903

Reputation: 15 731

This doesn't match the .s in lines 83 and after. – bmarks – 2015-10-12T01:36:29.380

@bmarks Also, are you completely sure (including newlines) that the program is less than ≤ 32 bytes long? – LegionMammal978 – 2015-10-12T10:25:06.563

The program (including newlines) is definitely ≤ 32 bytes long according to https://mothereff.in/byte-counter

– bmarks – 2015-10-12T20:18:35.680

@bmarks I fixed it – LegionMammal978 – 2015-10-13T12:12:40.797

1

MATLAB, Tom Carpenter, ≤4

pi^i

It's not hard when the absolute value is 1.

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

Didn't think it would take long ;) – Tom Carpenter – 2015-10-12T02:52:24.350

1

Javascript, Ludovic Zenohate Lagoua, ≤64

var a="'";for(var b=11;b<2004;b+=4){a+=b;}a+="'";console.log(a);

Sven Writes Code

Posted 2015-10-11T02:38:50.903

Reputation: 974

1

Python 2.7.2, Beta Decay, ≤ 64

import math,re;print zip(dir(math),dir(re))

I had 2.7.10 installed, and the additional __loader__ messed with the results, but this is probably it (I had to confirm with @BetaDecay in chat).

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

I can confirm this is the same program – Beta Decay – 2015-10-12T17:11:02.067

1

Brainfuck, Daniel M., ≤ 64

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

The code points are

[40, 80, 60, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104]

So we print the first three separately, then using the 80 to increment by 2 each time for the rest of the chars.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

1

Python 2, <=8, by Clear question with examples

947**687

Factorizing this number took no time at all :-)

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

1

Hassium (in REPL), <=32 bytes, by Jacob Misirian

for(i=0;i<99;i++)print(i%6==0)

Not too much fancy in this one.

pandorym

Posted 2015-10-11T02:38:50.903

Reputation: 121

1

AppleScript, VTCAKAVSMoACE, ≤32 bytes

repeat 409 times
log "(**)"
end

The log command actually adds comment markers (*...*) to everything it outputs to the Messages window of the script editor, but it looks like they have to be added explicitly when printing to stdout. Either way, the program is still less than 32 characters.

I'm using Digital Trauma's trick of replacing end repeat with end to save a few bytes.


EDIT: As kennytm correctly pointed out, this outputs to stderr instead of stdout. As a workaround, I can suggest the following:

osascript -e 'repeat 409
log "(**)"
end' 2>&1

Including line breaks, the script inside the single quotes is 25 bytes, Add 5 bytes for 2>&1 at the end of the command line to redirect stderr to stdout, and it's still within the 32 byte limit.

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

Heh, nice one. I used Script Editor, so it did not require the end repeat with end trick. +1 – Addison Crump – 2015-10-13T08:57:15.027

1The times is optional. However, on El Capitan it outputs to stderr. – kennytm – 2015-10-13T09:57:12.540

1

Javascript, RononDex, ≤ 32 bytes

console.log(Math.log(42))

Very easy :-D

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

2That wonderful inverse calculator :) – J Atkin – 2015-10-13T15:31:31.280

1

Thue, histocrat, ≤64

a::=yellowyellowyellowredyellowred
::=
aaaaaa

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

1

><>, Fongoid, ≤ 16

'$1-:0(?;$:o3+ !

That was some nice golfing practice.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

1

AppleScript, VTCAKAVSMoACE, ≤ 2 Bytes

id

I have no idea why this produces the output missing value; I just wrote a bash script to test all pairs of printable ASCII characters. I also found that it and me result in the output «script».

r3mainer

Posted 2015-10-11T02:38:50.903

Reputation: 19 135

Gah. Brute forcing. But yes, that's correct. I was originally going to do a it, me, or, in fact, name code, but « wasn't ASCII. The reason why it outputs "missing value" is that id will (almost) never throw a syntax error, but executing it on its own without a following value will cause the script, not the compiler to say that it's missing a value. id would typically be used with, say, window id 283 of app "TextEdit" to select that specific window. +1, but sad that you brute forced it. – Addison Crump – 2015-10-16T12:14:16.717

1

AppleScript, VTCAKAVSMoACE, ≤64

osascript -e 'repeat with i from 688 to 195049 by 629
log i mod 1e3
end' 2>&1

Needs a redirect to stdout, similar to https://codegolf.stackexchange.com/a/60601/32353. Total size is 64.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

No, this is not correct - I do print to STDOUT. – Addison Crump – 2015-10-16T15:46:41.953

@VTCAKAVSMoACE: Okay. – kennytm – 2015-10-16T18:27:29.073

1

MATLAB, Tom Carpenter, ≤ 2

!<

Thanks to @AlexA. and @RetoKoradi for helping me test this. I don't have a Windows PC/VM...

Googling the desired output immediately revealed it as a typical Windows Cmd error. In fact,

<

produces the desired output, and a MATLAB command that is prefixed by a ! is a system command. I don't have MATLAB at hand to test this, but it should work.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

Yup. Thought that one would be quite difficult, but never mind. I'd actually used !> but both do the same thing. – Tom Carpenter – 2015-10-17T14:29:26.723

Google is your foe here. Searching for the error message immediately revealed it as a typical Cmd error. – Dennis – 2015-10-17T14:38:19.900

1

><>, quartata, ≤ 32

1"qq"+\
v!?:  <$*d$-1
>~n;

I'd like to thank @quartata for make this interesting - despite being such a long number, it's actually just 13^226.

Sp3000

Posted 2015-10-11T02:38:50.903

Reputation: 58 729

1

><>, Fongoid, ≤64 Bytes

"!":"~"=a$.1+:"!"(?;::1-$oo20.
"+"f8+0pa0.2-"-"c0p"3"f7+0p

A little bit hard-coded since I had room and I couldn't really think of a good way to go down once I got to ~ in the output (there probably is one and I probably just don't see it).

You can try it online here.

cole

Posted 2015-10-11T02:38:50.903

Reputation: 3 526

That self-modifying code is pretty slick! – DLosc – 2015-10-19T16:19:29.770

1

Pip, DLosc, ≤ 2

O_

I don't really understand what the code does, but 2 characters is wide open to brute force cracking.

Reto Koradi

Posted 2015-10-11T02:38:50.903

Reputation: 4 870

I've added an explanation to the original post. – DLosc – 2015-10-19T16:12:35.187

1

Wolfram programming language, Eridan, ≤32

ContinuedFraction[Zeta[3],36]

It's sequence A013631 on OEIS.

alephalpha

Posted 2015-10-11T02:38:50.903

Reputation: 23 988

1

Lua, jcgoble3, ≤ 128

x=111111111
h="haha"
p=h..3*x..2*x..h..7*x..h..2*x
q="ha"..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x
"ha"..(q..h):rep(11)..q

124 bytes. Tested in Lua 5.3.1 REPL.

This is a cleaner version that can be executed as a single command or even a full program:

x=111111111 h="haha" p=h..3*x..2*x..h..7*x..h..2*x q=h..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x print((q.."ha"):rep(11)..q)

125 bytes. Tested in Lua 5.3.1 REPL and ideone.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

1

Pyth, ConfusedMr_C, ≤ 32

sm*2s_c4s_Mcd2%2_c4sCM127

Only needed 25 chars. Took some while though.

Try it online: Demonstration

The idea is to take all chars of the ranges 32-63 und 96-126 (Yes, 127 is not included), rearrange them, duplicate these strings and join them.

Jakube

Posted 2015-10-11T02:38:50.903

Reputation: 21 462

1

Self-modifying Brainfuck, mbomb007, ≤8

<[-.+<]

stdin needs to be /dev/null and disregard the output from stderr.

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

1

QBasic, DLosc, ≤16

?STRING$(3,34)

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

Aw, shoot. Not the solution I had in mind. Have a +1 anyway--I learned something. – DLosc – 2015-10-22T07:36:16.783

1

QBasic, DLosc, ≤8

?TAN(22)

Does the leading/trailing space thingy. I guess it's a QBasic quirk.

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

1

CJam, Eridan, ≤8

6C#E130#

I assumed it would be a list of numbers of the form i^j, so I did a search for those using substrings from output. I found that it was str(6 ** 12) + str(14 ** 130) using a Python script.

Lynn

Posted 2015-10-11T02:38:50.903

Reputation: 55 648

1

Python 3, ppperry, ≤32

0x1d4f620cb7a9ca2c585c639763613

kennytm

Posted 2015-10-11T02:38:50.903

Reputation: 6 847

That was not what I had in mind. – pppery – 2015-10-24T19:26:42.993

1

J, randomra, ≤ 8

#:/:|i:9

Try it online.

Cracking the code

Each row looks like the binary representation of a small integer, specifically of these integers:

9 8 10 7 11 6 12 5 13 4 14 3 15 2 16 1 17 0 18

These integers are a permutation of the range 0 … 18, so they were most likely the product of "grading up" a list of length 19.

Grading that list up once more yields

17 15 13 11 9 7 5 3 1 0 2 4 6 8 10 12 14 16 18

meaning that we must find a list whose elements are in the same order as this one. This very same list would work, but we must find another that fits in the byte range.

An obvious candidate is

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

which can be generated by applying absolute value to the list

_9 _8 _7 _6 _5 _4 _3 _2 _1 0 1 2 3 4 5 6 7 8 9

How it works

  • i:9 generates the range -9 … 9.

  • | applies absolute value to each integer in that range.

  • /: "grades up", i.e., sorts the indices of the above list by the values at those indices.

  • #: converts the resulting indices to binary.

Dennis

Posted 2015-10-11T02:38:50.903

Reputation: 196 637

1

Mathematica, quartata, 25 <= 64 bytes

2^315 3^117 75844139371^9

Method

output = 368921261...764501504

test = FactorInteger[output]
(* {{2,315},{3,117},{7,18},{11,9},{13,9},{17,9},{19,9},{23,9},{31,9},{47,9}} *)

(Times @@ Power @@@ Drop[test, 2])^(1/9)
(* 75844139371 *)

2^315 3^117 75844139371^9 == output
(* True *)

2012rcampion

Posted 2015-10-11T02:38:50.903

Reputation: 1 319

1

TI-BASIC, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤2

θStep

I was thinking of using one of these window tokens for my 4-byte cop, but I didn't want to abuse the "may assume default settings" rule too much.

lirtosiast

Posted 2015-10-11T02:38:50.903

Reputation: 20 331

I was thinking Tstep, but this works as well. Nice job! – Conor O'Brien – 2015-11-07T18:58:26.150