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.
- When marking it safe, post the intended solution and score it as
Winning
- The uncracked post with the lowest
c*nscore, 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.
19 Answers 19
Java 8, 97 Bytes, 34 Unique Bytes, Kevin Cruijssen
interface Fillerrrrrrrrrrr{static void main(String...a){System.out.println(1.4241570377303032);}}
Super innovative crack, spent hours on it
MATL, 4 bytes, 4 unique bytes, Stewie Griffin
1X2p
Explanation
1X2 % Push predefined literal: string 'double'
p % Product of array. For strings it uses code points. Implicit display
-
\$\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\$Stewie Griffin– Stewie Griffin2017年11月10日 10:16:19 +00:00Commented 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 with9:"@X1pDchangingXand1\$\endgroup\$Luis Mendo– Luis Mendo2017年11月10日 10:32:23 +00:00Commented Nov 10, 2017 at 10:32
MATL, 6 bytes, 3 unique, Luis Mendo
FFFTZF
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 toTFT. A separator may be needed if a new logical array follows:TFT TT. But it’s not necessary in other cases:TFT3.5.
-
1\$\begingroup\$
FandTare "sticky". SoFFTdefines a row vector[false, false, true]\$\endgroup\$Luis Mendo– Luis Mendo2017年11月10日 14:46:23 +00:00Commented Nov 10, 2017 at 14:46 -
\$\begingroup\$ @LuisMendo thank you, that is clear now. \$\endgroup\$Giuseppe– Giuseppe2017年11月10日 16:09:49 +00:00Commented Nov 10, 2017 at 16:09
Haskell, 29 bytes, 15 unique, Laikoni
f<$>[1..74]
f 47='4'
f f1='3'
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
-
\$\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– lynn2017年11月13日 00:38:01 +00:00Commented Nov 13, 2017 at 0:38 -
1\$\begingroup\$ also, I had no idea you could place a semicolon right after
dolike that! \$\endgroup\$lynn– lynn2017年11月13日 00:39:47 +00:00Commented 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– H.PWiz2017年11月13日 00:41:29 +00:00Commented Nov 13, 2017 at 0:41
-
\$\begingroup\$ @Lynn Laikoni has claimed that the solution is a single expression in chat \$\endgroup\$H.PWiz– H.PWiz2017年11月13日 00:43:32 +00:00Commented Nov 13, 2017 at 0:43
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
-
1\$\begingroup\$ This one outputs the extra 5 at the end:
_=_=>1/44.4\$\endgroup\$milk– milk2017年11月10日 22:31:48 +00:00Commented 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– Arnauld2017年11月10日 22:45:47 +00:00Commented 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– milk2017年11月10日 22:49:07 +00:00Commented Nov 10, 2017 at 22:49
-
\$\begingroup\$ said it was an easy one :p \$\endgroup\$Brian H.– Brian H.2017年11月13日 09:19:33 +00:00Commented Nov 13, 2017 at 9:19
Wolfram Language (Mathematica), 8 bytes, 3 unique, Jenny_mathy
7!!!/77!
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.
Brain-Flak, 62 total bytes, 6 unique, Wheat Wizard
(((((((()()()){}){}){}){}){}){(({})[()])}{})({{()({}[()])}{}})
-
\$\begingroup\$ Good job! That's not what I had intended but it works! \$\endgroup\$2017年11月30日 20:15:15 +00:00Commented Nov 30, 2017 at 20:15
Japt, 5 bytes, 5 unique bytes, Shaggy's submission
10l Ä
Simple enough: 3628801 is 10! (10l) plus one (Ä).
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
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.
-
\$\begingroup\$ Alternative:
8µḤ!×!(with trailing space) \$\endgroup\$user202729– user2027292017年11月13日 08:35:28 +00:00Commented Nov 13, 2017 at 8:35 -
\$\begingroup\$ Or
8,4!Pwith 2 trailing spaces (Orqor some other unimplemented byte) \$\endgroup\$Jonathan Allan– Jonathan Allan2017年11月13日 09:24:58 +00:00Commented Nov 13, 2017 at 9:24
Jelly, 3 bytes, 3 unique Erik the Outgolfer
ȷc5
How?
ȷc5 - Main link: no arguments, no input
ȷ - literal one-thousand
5 - literal ten
c - choose (A.K.A. binomial coefficient) = 263409560461970212832400 as required.
PowerShell, 7 Bytes, 5 Unique Bytes, AdmBorkBork
1PB#---
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.
-
\$\begingroup\$ Nice. I had thought tacking on a comment would toss people for a loop, but looks like I was wrong. :) \$\endgroup\$AdmBorkBork– AdmBorkBork2017年11月14日 13:19:45 +00:00Commented Nov 14, 2017 at 13:19
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.
Alice, 9 bytes, 8 unique bytes, Leo
/Yr@
\no/
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.
-
\$\begingroup\$ You're right about the mirrors! I've become too rusty with Alice :) \$\endgroup\$Leo– Leo2017年11月13日 06:29:07 +00:00Commented Nov 13, 2017 at 6:29
Haskell, Laikoni, 30 bytes, 17 unique
show.length.show=<<['0円'..'0']
-
\$\begingroup\$ Nice! How did you get tins? \$\endgroup\$emanresu A– emanresu A2021年08月27日 20:41:14 +00:00Commented 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 ofa..., 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\$Aaroneous Miller– Aaroneous Miller2021年08月27日 20:50:59 +00:00Commented Aug 27, 2021 at 20:50
J, 8 bytes, 6 unique bytes, Bolce Bussiere
;p.p:i.9
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.
Jelly, 8 bytes, 6 unique, Mr. Xcoder
7x72¤ḌḤ2
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
Explore related questions
See similar questions with these tags.