23
\$\begingroup\$

Given the output of the cop's program (o), the byte-count (n) and the number of unique bytes (c) used, come up with a corresponding piece of code that is n bytes long with c unique bytes which matches the cop's output o.


This is the cops thread. Post solutions that are to-be-cracked here.

The robbers thread is located here.


Cops should post solutions like this:

#[Language], `n` Bytes, `c` Unique Bytes (c*n points) [Cracked](Link-To-Crack)

    [Output]

---
    
(Optional spoiler)

Rules

  • You may not take any input for your program.
  • The program must use at least 1 byte, but cannot exceed 255 bytes.
  • The output itself is also limited to 255 bytes.
  • The program must have consistent output results when executed multiple times.
  • If your submission is not cracked within 7 days, you may mark it as "safe".
    • When marking it safe, post the intended solution and score it as c*n.
    • Only mark an answer as "safe" if you really want the +15 for an accepted answer; it's more fun to see how long you can go.

Winning

  • The uncracked post with the lowest c*n score, wins the cop's thread.
  • This will be decided after 10 safe answers, or a few weeks.

Caveats

  • If you feel cocky, you may tell the user the algorithm using a spoiler tag.

Uncracked Submissions:

fetch("https://api.stackexchange.com/2.2/questions/147635/answers?order=desc&sort=activity&site=codegolf&filter=!.Fjs-H6J36vlFcdkRGfButLhYEngU&key=kAc8QIHB*IqJDUFcjEF1KA((&pagesize=100").then(x=>x.json()).then(data=>{var res = data.items.filter(i=>!/^#.*cracked/im.test(i.body_markdown)).map(x=>{const matched = /^ ?#{1,3} ?(?:(?:(?:\[|<a href ?= ?".*?">)([^\]]+)(?:\]|<\/a>)(?:[\(\[][a-z0-9/:\.]+[\]\)])?)|([^, ]+)).*[^\d](\d+) ?\[?(?:.*(?:byte|block|codel)s?)(?:\](?:\(.+\))?)? ?(?:\(?(?!no[nt][ -]competing)\)?)?/gim.exec(x.body_markdown);if(!matched){return;}return {link: x.link, lang: matched[1] || matched[2], owner: x.owner}}).filter(Boolean).reverse().forEach(ans=>{var tr = document.createElement("tr");var add = (lang, link)=>{var td = document.createElement("td");var a = document.createElement("a");a.innerHTML = lang;a.href = link;td.appendChild(a);tr.appendChild(td);};add(ans.lang, ans.link);add(ans.owner.display_name, ans.owner.link);document.querySelector("tbody").appendChild(tr);});});
<html><body><h1>Uncracked Submissions</h1><table><thead><tr><th>Language</th><th>Author</th></tr></thead><tbody></tbody></table></body></html>

\$\endgroup\$
  • 1
    \$\begingroup\$ Are functions allowed? (Provided that they return a string, I suppose.) \$\endgroup\$ – Arnauld Nov 10 '17 at 3:32
  • 1
    \$\begingroup\$ @cairdcoinheringaahing. OP has said: "The program must have consistent output results when executed multiple times." \$\endgroup\$ – user72349 Nov 10 '17 at 7:39
  • 5
    \$\begingroup\$ Just a suggestion for future CnRs: challenges where the user can choose an arbitrary fixed output are quite problematic for CnRs because people can basically mash their keyboard (barring syntax restrictions) and post the result, because there's no need for the cop to understand what their program is actually doing. Otherwise, this is a neat challenge idea. :) \$\endgroup\$ – Martin Ender Nov 10 '17 at 8:07
  • 4
    \$\begingroup\$ @EriktheOutgolfer As I said "barring syntax restrictions". The point wasn't that you actually post a random stream of characters, but a random valid program which you don't need to understand. And especially in many esolangs, it's very easy to write a program that outputs a decent amount of random garbage without having to understand what that program does. \$\endgroup\$ – Martin Ender Nov 10 '17 at 9:23
  • 1
    \$\begingroup\$ Considering that this challenge has already more than 30 answers, I suggest adding a code snippet which lists uncracked submissions like in this post. \$\endgroup\$ – user72349 Nov 13 '17 at 14:07

46 Answers 46

1
2
1
\$\begingroup\$

Haskell, 37 bytes, 20 unique, 740 points, safe

The answer is an expression whose result equals the string literal:

"4F\\DLE\\C\"S\\T \\\\DC$EO!RUr\\K\\SSS1\\%S\\\\AN\\D&CDI#3SSC\\\\\\E\\C\\YC\\USB2SNN\\ED'\""

(That is, when putStr’d, you’d get:)

4F\DLE\C"S\T \\DC$EO!RUr\K\SSS1\%S\\AN\D&CDI#3SSC\\\E\C\YC\USB2SNN\ED'"

Safe! Intended expression:

[show['\r'..]!!rem(w^7)77|w<-[7..77]]
| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

JavaScript (ES6), 35 bytes x 16 unique = 560 points - Safe!

Some kind of compromise between a reasonable size and an uncrackable algorithm (as it originally was meant to be ^^).

Expected output (255 bytes):

246913680357025702570358136924703692581470370360360370471582604715938260493827161505050505161728495173962851852963075208642087643221000001123457802570360483728396297532100123581594064200024727410136175571756954621413918119481621442132286383494753789149870

Intended solution

f=(x=0xff)=>--x&&(1/7/x+'')[7]+f(x)

O.innerText = f()
pre {
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  word-wrap: break-word;
}
<pre id=O></pre>

Unique characters: 0, 1, 7, f, =, (, x, ), >, -, &, /, +, ', [, ]

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

J, 8 Bytes x 6 Unique = 48 Points, Cracked

Output:

23 _0.677447j0.296961 _0.677447j_0.296961 0.125003j0.726137 0.125003j_0.726137 _0.379097j0.630438 _0.379097j_0.630438 0.518498j0.521654 0.518498j_0.521654

Hint:

It has to do with primes

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Explode, 24 total bytes, 7 unique, 168 points

Output:

\}AtAY)_)MqGq/Y,Y}AwA_)\)JqDq/Y,Y}AtA_)\)MqDq/Y,Y}AtA_)\)MqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb)\)JqDq2Y,YzAtAb3)yqobUPK>1,'zmhcVID?2% {na\WJ=83&ytobUPK>1,'zmhcVID?2% {na\WJ

Now that I've read the question correctly, you can truly see the output explode.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

><>, 16 Bytes * 11 Unique = 176 Points

Output:

; ;;;;;;;;   ;
;;;
;;;;;;;;;;;;;;;;;;; ;!;";#;$;%;&

Shouldn't be too hard.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Brainf**k, 220 bytes, 7 unique (1540 points), safe

Edit: Sorry that I counted the bytes wrong.

output (88 bytes)

rh3NY8C]'t/FS:\7pb5D?yc,G>A@OsWU_6x*gaRo)Hz-w.ul+T&IM<P;BvjK%imn1[Xk2Ef(Z|Q{dL^`e4q0V9J=

Just do some brainf**k for fun.

Intended solution:

>+[>[-]<[>+>+<<-]>>[<<+>>-]---<[>>>+<<<-]>>>[<<[<+>>+<-]>[<+>-]>-]<<<+]<[>>[-]<[-]<[>+>+<<-]>>[<<+>>-]++++++[-<------>]<->>>++++++[-<+++++[-<+++>]>]<<--[>>+<<<[->>>[-]<+<<]>>>[->+<]<[-<<+>>]<-<->]>>>[<<<<<.>>>>>-]<<<<<<]
I didn't golf this too much. This is a sequence generated by linear congruential method, but just I output bytes between 37 and 124.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Safe? (char limit) \$\endgroup\$ – user202729 Nov 20 '17 at 12:55
  • \$\begingroup\$ @user202729 Thanks for reminding me. I almost forgot this. \$\endgroup\$ – Colera Su Nov 20 '17 at 15:52
0
\$\begingroup\$

Alice, 7 bytes, 6 unique, 42 points, safe

-10764@

Try it online!

Solution

gZ/
@o@

Try it online!

g is the easiest way to get a decently big number onto the stack quickly, because it pops two implicit zeros from the stack and then reads the code point at that cell, which is 113 for g itself.

Z then packs 0 and 113 into a single integer, which is a good way to get an even bigger number. That number happens to be -10764.

The number gets printed in Ordinal mode, but then we run into g again in Ordinal mode. The label Alice is looking for is just an empty string. It finds that immediately in the bottom left corner and extracts the @ as a string. When we hit o again, that @ is printed as well.

Afterwards, the IP finds its way to the bottom right corner where the other @ terminates the program.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Python 2, 98 bytes, 30 unique, 2940 points

Output (249 bytes):

-K:&qLcVoJk`N8QS@JH5c`1]T92i_bS.bv<zZK3vI&(kH!6=NrQGTL&VE:j|g..UQC)yk>3IoNhpjc'h0.x'L!aajp;Ip}+BQ/I64Q`5ZBRwOfDtt|O,6b>>UvvTt#8"z0CzEHtiVJ{lR-QBbhdqQnKK@.7Q$RLbso]?gR=ZN2;f5vTh|1@dI.cQ|b;F=lKyFZpx(mBPrqhiw1:`LD>AI{.S;POHfTd[5d;T=`162Hc]=.m7?T_1O<Kty

Edit: I think this is going to be too hard so I'll give a hint

Edit: Slightly more informative hint

seed(9)

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

PHP, 16 Bytes, 10 Unique Bytes (160 points) -- Safe!

0.42516833158764

Intended Solution (Try it online!)

<?=M_PI/M_E/M_E;

Simply divides π by e twice.

Edit

As with ThePirateBay's answer, I marked this as safe before I saw the OP's edit about seeing how long you can go without being cracked. Sorry to any who wanted to attempt a crack.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Python 2, 114 Bytes, 27 Unique (3078)

両寷動娯爅潟嗁琓偵桋斥獻曕檫垉哣抹妗惱畃

Function calls not counted, lambda expression counted.


Hint 1

Pseudo-random number generator with Unicode output. Beware of the offsets ;)

Hint 2

2 generators of the same kind but with different parameters are used alternatively, in the form of an+1 = f1(f2(an))

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Jelly, 13 bytes, 5 unique, 65 points

Output is the following 21 bytes.

HCG, AhhsNeg3 Aarrghh

The optimized string compressor won't help you.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

x86 Assemble, 22 Bytes * 17 types = 374 points, safe for 3 months

00000000h: 80 8A 5E FA 59 DF 69 24 F9 73 DA 8C 50 A6 F1 60
00000010h: 93 E3 3E 87 7D 08 F6 14 9E 03 EE 96 4E 48 99 61
00000020h: 2E 7A 62 71 96 39 69 27 CF 8E F7 AE 1A 37 71 8F
00000030h: B0 52 6A 85 F3 04 47 D4 A5 F1 8E 64 D8 4E A6 C1
00000040h: 0E 1E 35 EB C6 E3 99 28 67 79 80 58 52 F5 BF E7
00000050h: 28 87 1C E7 96 5E CA 8E 63 DB 3C 59 73 11 E1 9C
00000060h: E1 1D 6A 77 6B CD 6B 41 64 EA D6 02 0B 3F 89 60
00000070h: B4 DF 90 C4 AD AA 35 D5 14 6F 47 DC 3A 31 48 B5
00000080h: 50 87 5A 4C 5D FC 07 70 4B 6A 2A 6D 87 32 7F CA
00000090h: AB EB 75 4B 7C 17 1E 7D 01 49 C3 99 AF 98 8A 59
000000a0h: 6A B1 A1 2C B4 08 5D 42 9F AA E0 04 10 38 DC 87
000000b0h: E8 CB 15 BE CE 52 5D 02 4C 3C C4 C3 FF         

Answer:

00000000h: DB 06 01 01 B7 CD DD 17 D9 FE B4 02 8A 57 02 CD
00000010h: 21 FE C2 75 F1 C2                              
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Hint: 1) output uses MOV AH, xx; MOV D?, xx; INT 21 which costs at least 6 bytes; 2) return may be RET, INT 20, INT 21, but at least 1 byte required; 3) x87 used \$\endgroup\$ – l4m2 Dec 2 '17 at 5:44
  • \$\begingroup\$ I suppose the header should say "machine code" instead of "assembly"? \$\endgroup\$ – Weijun Zhou Mar 2 '18 at 18:01
  • \$\begingroup\$ maybe, though from the hint comment that can be inferred.... \$\endgroup\$ – l4m2 Mar 3 '18 at 1:50
0
\$\begingroup\$

CJam, 5 bytes × 5 unique = 25 points, safe

1406563064942.4553

J_#mq
This code computes sqrt(1919).
It could have been JJ_#mq for 20 points, but I didn't realize that until after I posted it.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

CJam, 13 bytes * 10 unique = 130 points

819457164140982707422640583089002841689
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

brainfuck, 25 bytes * 7 unique = 175 points

 .KoÌEÚ/îXÉAÀFÓg¤Mý´r7Ö°yh^[_j|µÜ
?{¾Y±vãWÒTÝm¢Gó¦`!é¸kO:,%%,:Ok¸é!`¦óG¢mÝTÒWãv±Y¾{?
ܵ|j_[^hy°Ö7r´ýM¤gÓFÀAÉXî/ÚEÌoK.   

This contains unprintables which will probably be mangled by SE, so here's the hexdump:

00000000: 0918 2e4b 6fc2 9ac3 8c05 45c2 8cc3 9a2f  ...Ko.....E..../
00000010: c28b c3ae 58c3 8941 c380 46c3 9367 02c2  ....X..A..F..g..
00000020: a44d c3bd c2b4 7237 03c3 96c2 b0c2 9179  .M....r7.......y
00000030: 685e 5b5f 6a7c c295 c2b5 c39c 0a3f 7bc2  h^[_j|.......?{.
00000040: be08 59c2 b110 76c3 a357 c392 54c3 9d6d  ..Y...v..W..T..m
00000050: 04c2 a247 c3b3 c2a6 6021 c3a9 c2b8 c28e  ...G....`!......
00000060: 6b4f 3a2c 2525 2c3a 4f6b c28e c2b8 c3a9  kO:,%%,:Ok......
00000070: 2160 c2a6 c3b3 47c2 a204 6dc3 9d54 c392  !`....G...m..T..
00000080: 57c3 a376 10c2 b159 08c2 be7b 3f0a c39c  W..v...Y...{?...
00000090: c2b5 c295 7c6a 5f5b 5e68 79c2 91c2 b0c3  ....|j_[^hy.....
000000a0: 9603 3772 c2b4 c3bd 4dc2 a402 67c3 9346  ..7r....M...g..F
000000b0: c380 41c3 8958 c3ae c28b 2fc3 9ac2 8c45  ..A..X..../....E
000000c0: 05c3 8cc2 9a6f 4b2e 1809 01              .....oK....
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Jelly, 4 bytes, 4 unique, 16 points.

[1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0]
| improve this answer | |
\$\endgroup\$
1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.