Reversed Engineered from Uniqueness (Robber's Thread)

11

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.

Magic Octopus Urn

Posted 2017-11-10T02:50:46.487

Reputation: 19 422

Answers

4

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

Luis Mendo

Posted 2017-11-10T02:50:46.487

Reputation: 87 464

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'. :) – Stewie Griffin – 2017-11-10T10:16:19.020

@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 – Luis Mendo – 2017-11-10T10:32:23.610

4

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

Roberto Graham

Posted 2017-11-10T02:50:46.487

Reputation: 1 305

4

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.

Giuseppe

Posted 2017-11-10T02:50:46.487

Reputation: 21 077

1F and T are "sticky". So FFT defines a row vector [false, false, true] – Luis Mendo – 2017-11-10T14:46:23.560

@LuisMendo thank you, that is clear now. – Giuseppe – 2017-11-10T16:09:49.983

4

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

H.PWiz

Posted 2017-11-10T02:50:46.487

Reputation: 10 962

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). – Lynn – 2017-11-13T00:38:01.737

1also, I had no idea you could place a semicolon right after do like that! – Lynn – 2017-11-13T00:39:47.277

1Yes, I had a space there for a long time before guessing it might be valid. – H.PWiz – 2017-11-13T00:41:29.307

@Lynn Laikoni has claimed that the solution is a single expression in chat – H.PWiz – 2017-11-13T00:43:32.933

3

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

Arnauld

Posted 2017-11-10T02:50:46.487

Reputation: 111 334

1This one outputs the extra 5 at the end: _=_=>1/44.4 – milk – 2017-11-10T22:31:48.397

@milk That looks better indeed. Let me know if you'd like to post it and I'll delete this one. – Arnauld – 2017-11-10T22:45:47.790

That's cool, you can just update your post if you want. I got this from building off your crack. – milk – 2017-11-10T22:49:07.577

said it was an easy one :p – Brian H. – 2017-11-13T09:19:33.250

3

Haskell, Laikoni

0x90090009

Try it online!

I feel like I got lucky here...

H.PWiz

Posted 2017-11-10T02:50:46.487

Reputation: 10 962

3

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.

user202729

Posted 2017-11-10T02:50:46.487

Reputation: 14 620

3

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

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

Try it online!

Riley

Posted 2017-11-10T02:50:46.487

Reputation: 11 345

Good job! That's not what I had intended but it works! – Post Rock Garf Hunter – 2017-11-30T20:15:15.683

2

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

10l Ä

Try it online!

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

Khuldraeseth na'Barya

Posted 2017-11-10T02:50:46.487

Reputation: 2 608

2

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.

Jonathan Allan

Posted 2017-11-10T02:50:46.487

Reputation: 67 804

Alternative: 8µḤ!×! (with trailing space) – user202729 – 2017-11-13T08:35:28.933

Or 8,⁴!P with 2 trailing spaces (Or q or some other unimplemented byte) – Jonathan Allan – 2017-11-13T09:24:58.620

2

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.

Jonathan Allan

Posted 2017-11-10T02:50:46.487

Reputation: 67 804

2

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.

ovs

Posted 2017-11-10T02:50:46.487

Reputation: 21 408

Nice. I had thought tacking on a comment would toss people for a loop, but looks like I was wrong. :) – AdmBorkBork – 2017-11-14T13:19:45.247

2

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.

wythagoras

Posted 2017-11-10T02:50:46.487

Reputation: 175

2

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.

Nitrodon

Posted 2017-11-10T02:50:46.487

Reputation: 9 181

You're right about the mirrors! I've become too rusty with Alice :) – Leo – 2017-11-13T06:29:07.430

2

Haskell, Laikoni, 30 bytes, 17 unique

show.length.show=<<['\0'..'0']

Lynn

Posted 2017-11-10T02:50:46.487

Reputation: 55 648

1

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.

Bubbler

Posted 2017-11-10T02:50:46.487

Reputation: 16 616

0

Octave, 4 bytes, 3 unique bytes, Tom Carpenter

j^7j

Try it online!

Luis Mendo

Posted 2017-11-10T02:50:46.487

Reputation: 87 464

0

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

Jonathan Allan

Posted 2017-11-10T02:50:46.487

Reputation: 67 804