11
\$\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 robbers thread. Post solutions that you cracked here.

The COPS thread is located here.


Robbers should post solutions like this:

#[Language], `n` Bytes, `c` Unique Bytes (Cracked)[Original Link to Cop Thread]
 [Solution]
 
(Explanation)

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.

Winning

  • The uncracked post with the lowest c*n score, wins the cop's thread.
  • Whomever cracks the most wins the robbers thread, with earliest crack breaking the tie.
  • 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.

Note: Also, please remember to upvote cracks, they're usually the impressive part.

asked Nov 10, 2017 at 2:50
\$\endgroup\$
0

19 Answers 19

4
\$\begingroup\$

Java 8, 97 Bytes, 34 Unique Bytes, Kevin Cruijssen

interface Fillerrrrrrrrrrr{static void main(String...a){System.out.println(1.4241570377303032);}}

Try it online!

Super innovative crack, spent hours on it

answered Nov 10, 2017 at 14:23
\$\endgroup\$
0
4
\$\begingroup\$

MATL, 4 bytes, 4 unique bytes, Stewie Griffin

1X2p

Try it online!

Explanation

1X2 % Push predefined literal: string 'double'
p % Product of array. For strings it uses code points. Implicit display
answered Nov 10, 2017 at 9:28
\$\endgroup\$
2
  • \$\begingroup\$ You know all the predefined literals... I don't... It wasn't exactly the same as I had, but it was of course the product of 'double'. :) \$\endgroup\$ Commented Nov 10, 2017 at 10:16
  • \$\begingroup\$ @StewieGriffin Ah, I see, so you used something like 1X%p. Actually I only know a few predefined literals. I brute-forced with 9:"@X1pD changing X and 1 \$\endgroup\$ Commented Nov 10, 2017 at 10:32
4
\$\begingroup\$

MATL, 6 bytes, 3 unique, Luis Mendo

FFFTZF

Try it online!

I immediately recognized the output

1+0i 0+1i -1+0i 0-1i

as the 4-th roots of unity, and I knew that the fft on [0 0 0 1] would result in this.

It took me quite a while to figure out that FFFT would push [0 0 0 1](削除) and I'm still not sure how it works. (削除ここまで) EDIT: Luis Mendo explained that F and T are "sticky", so a sequence of F and T will automatically horzcat them together, hence, FFFT pushes [0 0 0 1].

This is expressed succinctly in the documentation (once I looked it up):

For logical row vectors the square brackets can be omitted; that is, the notation [T F T] or [TFT] can be simplified to TFT. A separator may be needed if a new logical array follows: TFT TT. But it’s not necessary in other cases: TFT3.5.

answered Nov 10, 2017 at 14:32
\$\endgroup\$
2
  • 1
    \$\begingroup\$ F and T are "sticky". So FFT defines a row vector [false, false, true] \$\endgroup\$ Commented Nov 10, 2017 at 14:46
  • \$\begingroup\$ @LuisMendo thank you, that is clear now. \$\endgroup\$ Commented Nov 10, 2017 at 16:09
4
\$\begingroup\$

Haskell, 29 bytes, 15 unique, Laikoni

f<$>[1..74]
f 47='4'
f f1='3'

Try it online!

I previously had the two nearly solutions:

do;d<-[2..74];'3':['4'|d==47] -- 29,16
do;d<-[-41..31];'3':['4'|d==4] -- 30,15
answered Nov 13, 2017 at 0:34
\$\endgroup\$
4
  • \$\begingroup\$ ahh, Laikoni’s comment led me to think the answer needed to be a single expression... closest I got was ["34"!!(0^x^2)|x<-[-46..27]] (28, 18). \$\endgroup\$ Commented Nov 13, 2017 at 0:38
  • 1
    \$\begingroup\$ also, I had no idea you could place a semicolon right after do like that! \$\endgroup\$ Commented Nov 13, 2017 at 0:39
  • 1
    \$\begingroup\$ Yes, I had a space there for a long time before guessing it might be valid. \$\endgroup\$ Commented Nov 13, 2017 at 0:41
  • \$\begingroup\$ @Lynn Laikoni has claimed that the solution is a single expression in chat \$\endgroup\$ Commented Nov 13, 2017 at 0:43
3
\$\begingroup\$

Haskell, Laikoni

0x90090009

Try it online!

I feel like I got lucky here...

answered Nov 10, 2017 at 19:51
\$\endgroup\$
3
\$\begingroup\$

JavaScript (ES6), Brian H.

Thanks @Milk for fixing the last trailing '5'

f=f=>1/44.4
console.log(f())

Unique characters: ., /, 1, 4, =, >, f

answered Nov 10, 2017 at 13:14
\$\endgroup\$
4
  • 1
    \$\begingroup\$ This one outputs the extra 5 at the end: _=_=>1/44.4 \$\endgroup\$ Commented Nov 10, 2017 at 22:31
  • \$\begingroup\$ @milk That looks better indeed. Let me know if you'd like to post it and I'll delete this one. \$\endgroup\$ Commented Nov 10, 2017 at 22:45
  • \$\begingroup\$ That's cool, you can just update your post if you want. I got this from building off your crack. \$\endgroup\$ Commented Nov 10, 2017 at 22:49
  • \$\begingroup\$ said it was an easy one :p \$\endgroup\$ Commented Nov 13, 2017 at 9:19
3
\$\begingroup\$

Wolfram Language (Mathematica), 8 bytes, 3 unique, Jenny_mathy

7!!!/77!

Try it online!

Breakdown: Factorial[7!!] / Factorial[77] where !! is double factorial.

First I notice the long sequence of 0 at the end so I guess it may be some kind of factorial. FactorInteger gives the largest factor 103, so I try n/103!, and get the next largest (negative) prime factor is 73. Tweaking the factors for some time gives 105!/77!, then I think "there are already 3 symbols 7, ! and /, so the way to create 105 must be from those symbols!". So I tried 7!! (which is one of a few things to try) and get 105 as the correct result.

answered Nov 13, 2017 at 9:06
\$\endgroup\$
3
+200
\$\begingroup\$

Brain-Flak, 62 total bytes, 6 unique, Wheat Wizard

(((((((()()()){}){}){}){}){}){(({})[()])}{})({{()({}[()])}{}})

Try it online!

answered Nov 30, 2017 at 20:14
\$\endgroup\$
1
  • \$\begingroup\$ Good job! That's not what I had intended but it works! \$\endgroup\$ Commented Nov 30, 2017 at 20:15
2
\$\begingroup\$

Japt, 5 bytes, 5 unique bytes, Shaggy's submission

10l Ä

Try it online!

Simple enough: 3628801 is 10! (10l) plus one (Ä).

answered Nov 10, 2017 at 22:04
\$\endgroup\$
2
\$\begingroup\$

Jelly, 7 bytes, 6 unique, Erik the Outgolfer

- For some reason I started with a trailing zero in the result. Without it I would have given
8,16!PP
as a solution.


8,4!PP0

Try it online!

How?

8,4!PP0 - Main link of a program taking no arguments and no input
 4 - literal sixteen
8 - literal eight
 , - pair = [8,16]
 ! - factorial (vectorises) = [8!, 16!] = [40320, 20922789888000]
 P - product = 40320 ×ばつかける 20922789888000 = 843606888284160000
 P - product (no effect) = 843606888284160000
 0 - literal zero (just gets printed)
 - leaving STDOUT displaying 8436068882841600000, as required

...8,4!’P for 6 bytes, 6 unique would have been much harder to crack since the result of 843585965494231681 (40319 ×ばつ 2092278988799) does not look so factorial-based.

answered Nov 10, 2017 at 22:57
\$\endgroup\$
2
  • \$\begingroup\$ Alternative: 8µḤ!×! (with trailing space) \$\endgroup\$ Commented Nov 13, 2017 at 8:35
  • \$\begingroup\$ Or 8,4!P with 2 trailing spaces (Or q or some other unimplemented byte) \$\endgroup\$ Commented Nov 13, 2017 at 9:24
2
\$\begingroup\$

Jelly, 3 bytes, 3 unique Erik the Outgolfer

ȷc5

Try it online!

How?

ȷc5 - Main link: no arguments, no input
ȷ - literal one-thousand
 5 - literal ten
 c - choose (A.K.A. binomial coefficient) = 263409560461970212832400 as required.
answered Nov 10, 2017 at 23:54
\$\endgroup\$
2
\$\begingroup\$

PowerShell, 7 Bytes, 5 Unique Bytes, AdmBorkBork

1PB#---

Try it online!

The output 1125899906842624 is equal to 2^50 and 2^50 Bytes is equal to 1 Pebibyte. The actual code is just 3 bytes, therefore I added a comment at the end.

answered Nov 11, 2017 at 21:19
\$\endgroup\$
1
  • \$\begingroup\$ Nice. I had thought tacking on a comment would toss people for a loop, but looks like I was wrong. :) \$\endgroup\$ Commented Nov 14, 2017 at 13:19
2
\$\begingroup\$

Excel, 22 bytes, 16 unique bytes, EngineerToast

A possible solution is:

=BAHTTEXT(2^(480-300))

The unique characters are =BAHTEX()^02348-.

I recognized that BAHTTEXT was used when seeing the output. By translating the output back from Thai to English, I was able to find the value of the number. I guessed it to be a power of 2, which it indeed is (namely 2180). The expression 480-300=180 was then constructed to make sure the solution contains 22 bytes with 16 unique.

answered Nov 12, 2017 at 13:39
\$\endgroup\$
2
\$\begingroup\$

Alice, 9 bytes, 8 unique bytes, Leo

/Yr@
\no/

Try it online!

Unfolded, this is nrYo@.

n negate the implicit empty string: creates the string "Jabberwocky".
r range expansion: produces a string that starts with J, 
 goes up in ASCII order to w, down to c, and then up to y.
Y separate this string into even and odd positions
o output the even positions
@ terminate

Incidentally, the orientation of the mirrors in the first column is completely irrelevant, so this could easily be reduced to 7 unique bytes.

answered Nov 13, 2017 at 6:20
\$\endgroup\$
1
  • \$\begingroup\$ You're right about the mirrors! I've become too rusty with Alice :) \$\endgroup\$ Commented Nov 13, 2017 at 6:29
2
\$\begingroup\$

Haskell, Laikoni, 30 bytes, 17 unique

show.length.show=<<['0円'..'0']
answered Nov 14, 2017 at 22:54
\$\endgroup\$
2
\$\begingroup\$

Vyxal d, 4 bytes, 4 unique, cracks emanresu A's answer

ka¦2

Try it Online!

answered Aug 27, 2021 at 13:39
\$\endgroup\$
2
  • \$\begingroup\$ Nice! How did you get tins? \$\endgroup\$ Commented Aug 27, 2021 at 20:41
  • \$\begingroup\$ @emanresuA I saw every letter of the alphabet, so I knew there was ka, which by itself was half the program. Then I noticed that there was a pattern of a..., a... b..., a... b... c..., a... b... c... d..., etc., so I knew there was ¦, for prefixes. From there, the only thing I knew of that created that specific pattern was multiplying strings together, so I thought about *, e, and Π, before remembering that ² doesn't vectorise properly, and would multiply the strings instead of splitting them. It really just came down to knowing the quirks of the commands. \$\endgroup\$ Commented Aug 27, 2021 at 20:50
1
\$\begingroup\$

J, 8 bytes, 6 unique bytes, Bolce Bussiere

;p.p:i.9

Try it online!

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

The obvious hint is that, in the given output, complex numbers always appear as conjugate pairs. It made me suspect the p. verb, which converts between plain polynomial and multiplier-and-roots forms.

So I tried:

p. 23;(...those complex numbers)
 2 3 5 7.00001 11 13 17 19 23

Yes, my thought was correct. The list of primes is easy. Monadic ; flattens the list of boxed arrays to simple linear one. The resulting expression has two p's and two dots, so the byte count is perfect.

answered Aug 30, 2018 at 4:08
\$\endgroup\$
0
\$\begingroup\$

Octave, 4 bytes, 3 unique bytes, Tom Carpenter

j^7j

Try it online!

answered Nov 10, 2017 at 23:34
\$\endgroup\$
0
\$\begingroup\$

Jelly, 8 bytes, 6 unique, Mr. Xcoder

7x72¤ḌḤ2

Try it online!

How?

7x72¤ḌḤ2 - Main link: no arguments & no input
7 - literal 7
 ¤ - nilad followed by link(s) as a nilad:
 7 - literal 7
 2 - square -> 49
 x - repeat elements -> [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
 Ḍ - convert from a decimal list -> 7777777777777777777777777777777777777777777777777
 Ḥ - double -> 15555555555555555555555555555555555555555555555554
 2 - square -> 241975308641975308641975308641975308641975308641926913580246913580246913580246913580246913580246916
 - implicit print
answered Nov 14, 2017 at 19:57
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.