# The Mystery String Printer (Robbers)

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

• 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

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

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 COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";

/* App */

comment_page;

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

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function(data) {
data.items.forEach(function(a) {
});
comment_page = 1;
}
});

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function(data) {
data.items.forEach(function(c) {

});

else process();
}
});
}

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 = [];

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) {

.replace("{{NAME}}", a.user)
.replace("{{SUBMISSIONS}}", a.numberOfSubmissions)
.replace("{{POINTS}}", a.points);

});

}
body {
text-align: left !important
}
width: 240px;
float: left;
}
#open-list {
width: 450px;
float: left;
}
font-weight: bold;
vertical-align: top;
}
table td {
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<tr>

<td>Author</td>
<td>Submissions</td>
<td>Score</td>
</tr>

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

<table style="display: none">
<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).

• Note: every additional submission earns 5 points – Daniel M. Oct 12 '15 at 20:13

# 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 *)


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

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

• I was thinking Tstep, but this works as well. Nice job! – Conor O'Brien Nov 7 '15 at 18:58