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.

\$\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

\$\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
\$\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\$ 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\$
    – Luis Mendo
    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.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ F and T are "sticky". So FFT defines a row vector [false, false, true] \$\endgroup\$
    – Luis Mendo
    Nov 10, 2017 at 14:46
  • \$\begingroup\$ @LuisMendo thank you, that is clear now. \$\endgroup\$
    – Giuseppe
    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
\$\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\$
    – Lynn
    Nov 13, 2017 at 0:38
  • 1
    \$\begingroup\$ also, I had no idea you could place a semicolon right after do like that! \$\endgroup\$
    – Lynn
    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\$
    – H.PWiz
    Nov 13, 2017 at 0:41
  • \$\begingroup\$ @Lynn Laikoni has claimed that the solution is a single expression in chat \$\endgroup\$
    – H.PWiz
    Nov 13, 2017 at 0:43
3
\$\begingroup\$

Haskell, Laikoni

0x90090009

Try it online!

I feel like I got lucky here...

\$\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

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This one outputs the extra 5 at the end: _=_=>1/44.4 \$\endgroup\$
    – milk
    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\$
    – Arnauld
    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\$
    – milk
    Nov 10, 2017 at 22:49
  • \$\begingroup\$ said it was an easy one :p \$\endgroup\$
    – Brian H.
    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.

\$\endgroup\$
3
+200
\$\begingroup\$

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

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

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Good job! That's not what I had intended but it works! \$\endgroup\$
    – Wheat Wizard
    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 (Ä).

\$\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,⁴!PP0

Try it online!

How?

8,⁴!PP0 - Main link of a program taking no arguments and no input
  ⁴     - 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,⁴!’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.

\$\endgroup\$
2
  • \$\begingroup\$ Alternative: 8µḤ!×! (with trailing space) \$\endgroup\$
    – DELETE_ME
    Nov 13, 2017 at 8:35
  • \$\begingroup\$ Or 8,⁴!P with 2 trailing spaces (Or q or some other unimplemented byte) \$\endgroup\$ Nov 13, 2017 at 9:24
2
\$\begingroup\$

Jelly, 3 bytes, 3 unique Erik the Outgolfer

ȷc⁵

Try it online!

How?

ȷc⁵ - Main link: no arguments, no input
ȷ   - literal one-thousand
  ⁵ - literal ten
 c  - choose (A.K.A. binomial coefficient) = 263409560461970212832400 as required.
\$\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.

\$\endgroup\$
1
  • \$\begingroup\$ Nice. I had thought tacking on a comment would toss people for a loop, but looks like I was wrong. :) \$\endgroup\$ 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.

\$\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.

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

Haskell, Laikoni, 30 bytes, 17 unique

show.length.show=<<['\0'..'0']
\$\endgroup\$
2
\$\begingroup\$

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

ka¦²

Try it Online!

\$\endgroup\$
2
  • \$\begingroup\$ Nice! How did you get tins? \$\endgroup\$
    – emanresu A
    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\$ 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.

\$\endgroup\$
0
\$\begingroup\$

Octave, 4 bytes, 3 unique bytes, Tom Carpenter

j^7j

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Jelly, 8 bytes, 6 unique, Mr. Xcoder

7x7²¤ḌḤ²

Try it online!

How?

7x7²¤ḌḤ² - Main link: no arguments & no input
7        - literal 7
    ¤    - nilad followed by link(s) as a nilad:
  7      -   literal 7
   ²     -   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
       ² - square -> 241975308641975308641975308641975308641975308641926913580246913580246913580246913580246913580246916
         - implicit print
\$\endgroup\$

Your Answer

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

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