56
\$\begingroup\$

This challenge is in honor of mathematician John Conway who passed away April 11, 2020 due to COVID-19. He was famous for coming up with the Game of Life cellular automaton and many other mathematical contributions such as the surreal numbers and the monster group.

The advanced math of those topics is out scope for this programming challenge, though I strongly recommend people watch the various Numberphile videos about Conway. In one of those videos Conway says that he'd like to know why the monster group exists before he dies. It's unfortunately too late for that now but we can honor his memory in a very small way by exploring in code the strange number associated with the group.

Challenge

The monster group is the largest sporadic simple group in the branch of group theory in mathematics. But the only thing to know for this challenge is that its order, or number of elements it contains is:

808017424794512875886459904961710757005754368000000000

Your task is to write a program that outputs this number. However, to keep this from being trivial, your program may not contain any digits, 0 through 9. That is, your program may not contain any of the ten characters 0123456789.

Your output must be the precise digits of the number:

808017424794512875886459904961710757005754368000000000

or the digits with appropriate commas:

808,017,424,794,512,875,886,459,904,961,710,757,005,754,368,000,000,000

(Commas , are allowed in your code.)

Any usual output method is valid. No input should be required. The shortest program in bytes wins.

If it helps anyone the factorization of the number is:

2^46 * 3^20 * 5^9 * 7^6 * 11^2 * 13^3 * 17 * 19 * 23 * 29 * 31 * 41 * 47 * 59 * 71

(Factorization is not valid output.)

\$\endgroup\$
10
  • 1
    \$\begingroup\$ Are non-Ascii digits like acceptable? \$\endgroup\$ Commented Apr 14, 2020 at 23:47
  • 1
    \$\begingroup\$ @JonathanAllan Certainly. \$\endgroup\$ Commented Apr 15, 2020 at 0:13
  • 3
    \$\begingroup\$ How is this not a duplicate of the 2014 version of this challenge? The only difference what number is being output. \$\endgroup\$
    – Wheat Wizard
    Commented Apr 15, 2020 at 0:27
  • 7
    \$\begingroup\$ I don't consider this a duplicate at all, just another challenge in the same genre. Different target numbers are quite different--ranging from easy targets (like 2014) to theoretically difficult ones (such as incompressible numbers in the sense of Chaitin). Interesting ones would usually be between these two extremes, like this monster challenge. They're like any code-golf puzzle--you need to find hidden patterns in the target that you can exploit. But different numbers have different patterns! (That this challenge can be interesting is borne out by the variety of solutions already posted.) \$\endgroup\$ Commented Apr 15, 2020 at 3:25
  • 13
    \$\begingroup\$ I feel obligated to link to the real codegolf monster related to John Conway: tetris made in Game of life: codegolf.stackexchange.com/questions/11880 \$\endgroup\$ Commented Apr 15, 2020 at 10:28

36 Answers 36

22
\$\begingroup\$

Sledgehammer, 4 bytes

31 bits, to be overly specific
please upvote the author of this awesome language instead of me

⣶⣖⡥⣕

(this is a very awesome Mathematica compressor, and it really excels at compressing code with only a few powerful built-ins)

In this case, the built-ins are GroupOrder and MonsterGroupM, because of course they exist.

In case this somehow helps, the exact bits contained in the code are 01110111 01110101 10110010 1011010, the corresponding Mathematica code is GroupOrder@MonsterGroupM[], and the internal suffix code is call["MonsterGroupM", 0], call["GroupOrder", 1], where 0 and 1 are the argument counts.

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

Python 2, 61 bytes

Port of Neil's answer.

-5 bytes thanks to @Surclose Sputum!

for i in"  @@G^dddrstuuuvwxxy{|~~~~~":True*=ord(i)
print True

Try it online!


Python 3, 60 58 bytes

Thanks to @Surculose Sputum for saving 2 more bytes!

k=True
for i in b"?G^dddrstuuuvwxxy{|~~~~":k*=i+i
print(k)

Try it online!

\$\endgroup\$
12
  • 1
    \$\begingroup\$ 61 bytes \$\endgroup\$ Commented Apr 14, 2020 at 22:32
  • 1
    \$\begingroup\$ 60 bytes with a bytestring in Python 3. \$\endgroup\$
    – ovs
    Commented Apr 15, 2020 at 6:29
  • \$\begingroup\$ @ovs Thanks, funnily enough I tried to use a b-string in Python 2. I guess I forgot that it only works in Python 3. \$\endgroup\$ Commented Apr 15, 2020 at 6:37
  • 3
    \$\begingroup\$ 58 bytes in Python 3 by doubling each character before multiplying together. \$\endgroup\$ Commented Apr 17, 2020 at 7:07
  • 1
    \$\begingroup\$ @SurculoseSputum Indeed, it saves me 3 bytes in my answer too! \$\endgroup\$
    – Neil
    Commented May 8, 2020 at 12:35
15
\$\begingroup\$

Jelly, 21 bytes

⁴Ḥ®x“ÆÑ¥©µ"µ£€× œ‘;Æ¡

Try it online!

How?

$$|M|=13\times 43!+16\times 42!+4\times 41!+6\times 40!+9\times 39!+34\times 38!+9\times 37!+2\times 36!+12\times 35!+17\times 34!+32\times 33!+30\times 32!$$

So...

⁴Ḥ®x“ÆÑ¥©µ"µ£€× œ‘;Æ¡ - Main Link: no arguments
⁴                     - literal 16
 Ḥ                    - double = 32
  ®                   - recall from register = 0
   x                  - times = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
    “ÆÑ¥©µ"µ£€× œ‘    - list of code-page indices = [13,16,4,6,9,34,9,2,12,17,32,30]
                  ;   - concatenate = [13,16,4,6,9,34,9,2,12,17,32,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
                   Æ¡ - convert from factorial base to integer

For what it's worth a naive base-250 compression is 25 bytes AND contains digits: “Æ4Ḍ⁹|oGO⁷pNJ6þḤ)Ė⁽u2ẏẏż’

\$\endgroup\$
4
  • \$\begingroup\$ Nice! I didn't know that factorial representation of the number \$\endgroup\$
    – Luis Mendo
    Commented Apr 15, 2020 at 0:01
  • 2
    \$\begingroup\$ Neither did I, but I don't think it's all that unexpected for it to have a fairly nice representation in the factorial number system. \$\endgroup\$ Commented Apr 15, 2020 at 0:05
  • 1
    \$\begingroup\$ Darn, this was the method I was going to use - iterated and descending factorials. Absolutely well done, mate. Very crisp solution! \$\endgroup\$
    – Mathgeek
    Commented Apr 15, 2020 at 10:37
  • \$\begingroup\$ @Mathgeek go for it - unless your solution was also going to be in Jelly and would be longer I see no reason not to use the same idea! \$\endgroup\$ Commented Apr 15, 2020 at 18:40
12
\$\begingroup\$

Charcoal, 32 29 bytes

IΠE/Gdddrstuuuvwxxy{|~~~~~⊗℅ι

Try it online! Explanation: Converts the characters to their ASCII character codes, doubles them, then takes the product. Edit: Saved 3 bytes by porting @SurculoseSputum's golf of @dingledooper's Python 3 answer.

However, Charcoal can just compress the output text... except that compression of the whole text includes an 8, so you have to print it in two parts:

”)¶″³L⬤j$a◧EτB⊟[βω⁵↓≧O””|~ⅉE

(Compressing the string in the first program doesn't help as the resulting string contains a digit.)

Try it online! Link is to verbose version of code.

\$\endgroup\$
2
  • \$\begingroup\$ I still see a "6" there. \$\endgroup\$
    – Almo
    Commented Apr 15, 2020 at 19:12
  • 1
    \$\begingroup\$ @Almo Thanks; I discovered that I'd also pasted the wrong link anyway. The new one is a byte longer sadly. \$\endgroup\$
    – Neil
    Commented Apr 15, 2020 at 20:13
8
\$\begingroup\$

Wolfram Language (Mathematica), 34 32 bytes

Thanks @my pronoun is monicareinstate for shaving 2 bytes!

Someone has to do this...

Print@GroupOrder@MonsterGroupM[]

Try it online!

\$\endgroup\$
4
  • \$\begingroup\$ 32 bytes by @ instead of // and []: Try it online! \$\endgroup\$ Commented Apr 15, 2020 at 11:45
  • \$\begingroup\$ Alright, thanks! @mypronounismonicareinstate \$\endgroup\$
    – newbie
    Commented Apr 15, 2020 at 11:46
  • \$\begingroup\$ You can save a few bytes by writing GroupOrder@MonsterGroupM[]&. This is a function (which on here is equivalent to a program by default) that outputs the correct number regardless of the input. \$\endgroup\$ Commented Apr 17, 2020 at 16:59
  • 1
    \$\begingroup\$ Even shorter would be GroupOrder@*MonsterGroupM, which is the same as Greg Martin's function when called with no arguments \$\endgroup\$ Commented Apr 24, 2020 at 15:30
6
\$\begingroup\$

Ruby, 67 bytes

"nn/HM|Q:iv^YxO[e}%W}}WTBn}}}}}}}}".bytes{|i|$><<(i+?A.ord)%?_.ord}

Try it online!

By coincidence, the range of digit pairs is 0 to 94, which only just fits in the ASCII range.

(i+?A.ord)%?_.ord = (i+65)%95. The 65 offset ensures no digit characters in the magic string.

By default numbers are printed without leading zeros, so digit pairs in the range 00..09 require two characters in the magic string. The other digit pairs require one character.

\$\endgroup\$
5
\$\begingroup\$

Java 8, 86 bytes

v->"ᾑ䐑Ἂ㉌⊡▒д᭞ᵸ᪑".chars().forEach(c->System.out.print(~-c))

Try it online.

Explanation:

v->  // Method with empty unused parameter and no return-type
  "ᾑ䐑Ἂ㉌⊡▒д᭞ᵸ᪑".chars().forEach(c->
     //  Loop over the characters of this string as integer codepoints:
    System.out.print(~-c))
     //   Print this integer - 1 to STDOUT

The string contains the characters with the codepoints:

8081,17425,7946,12876,8865,59905,9618,1076,7006,7544,6801,1,1,1,1,1,1,1
\$\endgroup\$
2
5
\$\begingroup\$

MATL, 35 bytes

'nTIFBCAAAAA@A@A@A@@A'tfYqwIEW-^X$p

Try it online!

Explanation

This uses the prime factorization of the number:

\$ 808017424794512875886459904961710757005754368000000000 \\ = 2^{46} · 3^{20} · 5^9 · 7^6 · 11^2 · 13^3 · 17 · 19 · 23 · 29 · 31 · 41 · 47 · 59 · 71. \$

'nTIFBCAAAAA@A@A@A@@A' % Push this string
t                      % Duplicate
f                      % Indices of nonzero chars: gives [1 2 3 ... 19 20]
Yq                     % n-th prime, element-wise: gives [2 3 5 ... 67 71]
w                      % Swap
IEW                    % Push 3, multiply by 2, exponential with base 2: gives 64
-                      % Subtract, element-wise: subtracts 64 from the code point
                       % of each character of the string. Gives [46 20 9 ... 0 1]
^                      % Element-wise power. Gives [2^46 3^20 5^9 ... 1 71]
X$                     % Convert to symbolic (to achieve arbitrary precision)
p                      % Product. Implicit display 
\$\endgroup\$
4
\$\begingroup\$

Jelly, 37 30 bytes

ØẠiⱮ“tTIFBC”;⁽<(B¤
³ÆRṁ¢ż¢*/€P

Encodes the number as a list of exponents to primes, probably could be optimized with cleverer builtins

ØẠiⱮ“tTIFBC”;⁽<(B¤
    “tTIFBC”       the string "tTIFBC"
  iⱮ               find indices of each character in
ØẠ                 the alphabet in both cases "A..Za..z"
             ⁽<( ¤ the number 16041
                B¤ converted to binary
            ;      append
³ÆRṁ¢ż¢*/€P
 ÆR         all primes below
³           100
   ṁ        shaped like
    ¢       the above line
     ż      zipped with
      ¢     the above line
       */€  exponent for each pair
          P product

-7 bytes by encoding the final 0/1 sequence as binary

Try it online!

\$\endgroup\$
4
\$\begingroup\$

05AB1E, 29 28 27 bytes

-1 byte thanks to @KevinCruijssen

•∍ýö/V$Éb´‰ŒrƶÜλFÄôS•¦¾T<׫

Try it online!


05AB1E, 21 bytes

Answer suggested by @KevinCruijssen as a port of the Jelly answer by @JonathanAllen

₆ÍRžwŸ!•Pǝ½ζÄž,Ā•₆в*O

Try it online!

\$\endgroup\$
3
4
\$\begingroup\$

Haskell, 91 bytes

import Data.Numbers.Primes
product[p^length[';'..c]|(c,p)<-zip"hNC@<=;;;;;:;:;:;::;"primes]

Try it online! (has an extra 2 bytes for x=)

Probably suboptimal but I had a lot of fun writing it. I encode the prime exponents (including zeroes for the primes it doesn't have prior to 71) as a string using the character's relative distance from :. the rest is a simple matter of zipping the exponents against an infinite list of all primes, raising those primes to that power, and taking the product.

Edit: forgot to take the x= out of the source code on here.

\$\endgroup\$
2
  • \$\begingroup\$ almost... idk why product is returning a negative number tbh \$\endgroup\$
    – ASCII-only
    Commented May 8, 2020 at 11:01
  • 1
    \$\begingroup\$ @ASCII-only it's because length always returns an Int and this number is too big to be stored as an Int so it overflowed into the negatives. In my code I made sure the type of x was ambiguous so that GHC would default it to Integer which is arbitrary precision. \$\endgroup\$
    – colossus16
    Commented May 9, 2020 at 15:20
4
\$\begingroup\$

C (gcc), 84 \$\cdots\$ 81 83 bytes

Saved a byte thanks to ceilingcat!!!
Added 2 bytes to fix a bug kindly pointed out by gastropner.

*s;f(){for(s=L"nn/HM|Q:iv^YxO[e}%W}}WTBn}}}}}}}}";*s;)printf("%d",(*s+++'A')%'_');}

Try it online!

Port of Level River St's Ruby answer.

\$\endgroup\$
5
  • \$\begingroup\$ Oh wait... We got a problem here. 02 :( \$\endgroup\$
    – newbie
    Commented Apr 15, 2020 at 11:20
  • \$\begingroup\$ @newbie Yikes! Just saw that too! T_T \$\endgroup\$
    – Noodle9
    Commented Apr 15, 2020 at 11:20
  • \$\begingroup\$ Sorry, the direct approach is smaller. That %'_' doesn't actually save anything. \$\endgroup\$ Commented Jul 30, 2020 at 22:38
  • \$\begingroup\$ Think you need to sacrifice two bytes to change those numbers into chars to avoid digits. \$\endgroup\$
    – gastropner
    Commented Aug 21, 2020 at 21:24
  • \$\begingroup\$ @gastropner Oops, miss that. Now fixed. Well spotted - thanks! :-) \$\endgroup\$
    – Noodle9
    Commented Aug 21, 2020 at 22:09
4
\$\begingroup\$

Vyxal, 27 25 bytes

Thanks to Underslash for -2 bytes because numbers.

»$⇩∪£¼ɾǏ℅yṙ`₆gǏ¦¨λ»kεk×**

Try it Online!

Unfortunately, the compressed form of the number contains a 2 and a 0. This is a different number, multiplied by another number multiplied by another number, to get the target number.

»$⇩∪£¼ɾǏ℅yṙ`₆gǏ¦¨λ»        # Push 11482618231106483731969943632999939453125
                   kε      # Push 32768
                     k×    # 2147483648
                       **  # Multiply all the numbers
                           # Implicit output
\$\endgroup\$
1
  • \$\begingroup\$ 25 bytes by dividing the number by 2^31 and 2^15, compressing that, and then multiplying to get the correct output. \$\endgroup\$
    – Underslash
    Commented May 19, 2021 at 22:59
3
\$\begingroup\$

Wolfram Language (Mathematica), 93 bytes

FromDigits[LetterNumber/@Characters@"h h agdbdgideabhgehhfdeii difaga geg  egedcfh         "]

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ GroupOrder[MonsterGroupM[]] saves 66 bytes. \$\endgroup\$ Commented Apr 15, 2020 at 15:09
  • \$\begingroup\$ @MeesdeVries of course there is a mathematica built in... it is already posted in another answer \$\endgroup\$
    – ZaMoC
    Commented Apr 15, 2020 at 15:32
  • \$\begingroup\$ Oops, I didn't even read all the answers before commenting. My bad. :-) \$\endgroup\$ Commented Apr 16, 2020 at 7:53
3
\$\begingroup\$

Bash + Core utilities, 67 bytes

tr o-z /-:<<<xpxpqwtrtwytuqrxwuxxvtuyyptyvqwqpwuwppuwutsvxppppppppp

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Octave, 50 bytes

prod(primes('G').^sym('hNC@<=;;;;;:;:;:;::;'-':'))

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ This deserves more votes! I'm impressed! \$\endgroup\$
    – CG.
    Commented Aug 21, 2020 at 8:23
3
\$\begingroup\$

brainfuck, 183 171 170 bytes

++++++++[>+++++++>++++++<<-]>.>.<.>.+.<-.---.>+.<.+++.++.>++.+.
----.+.<-.-.>+++.<+..--.>-.+.<+++..>-----.++++.<.---.>---.<+.>.
-.<.--.++.>..<--.++.--.-.-.+++.++.>.........

Try it online!

Linebreaks added for readability so not included in the byte count.

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

C++ (gcc), 82, 76 bytes

Kudos to @ceilingcat for -6 bytes

void f(){for(auto s:L"󅑑񧭚񽍫󘚻󜼁𑖣򫂟ƴ󃔀")printf("%i",s);printf("%i%i%i",!f,!f,!f);};

Try it online!

C++ (gcc), 82 bytes

void f(){for(auto s:L"󅑑񧭚񽍫󘚻󜼁𑖣򫂟ƴ󃔀")printf("%i",s);printf("%i%i%i",NULL,NULL,NULL);};

Try it online!

My first ever Code Golf submission! :)

Explanation: The loop part of the function prints a decimal representation for each Unicode character in the string. I was really stumped as to how to print zeros without being allowed to have 0 in the code. I just added NULL characters cast to int.

\$\endgroup\$
5
  • \$\begingroup\$ Also, welcome to CGCC! \$\endgroup\$
    – ceilingcat
    Commented Apr 18, 2020 at 3:04
  • \$\begingroup\$ @ceilingcat - Thanks for the welcome and the tips. Of course! A boolean of a function name always exists. That's clever. \$\endgroup\$ Commented Apr 18, 2020 at 4:04
  • \$\begingroup\$ -3 bytes by replacing auto and void with int, and removing the semi-colon at the end. \$\endgroup\$ Commented Apr 18, 2020 at 5:52
  • \$\begingroup\$ @StealingMana You can't keep #include<cstdio> out of your code as it's needed for your function to work. In other words it has to be it part of your byte count. \$\endgroup\$
    – Noodle9
    Commented Aug 22, 2020 at 20:06
  • \$\begingroup\$ Suggest int instead of auto \$\endgroup\$
    – ceilingcat
    Commented Sep 11, 2020 at 8:27
3
\$\begingroup\$

Jelly, 14 bytes

“ ½‘!PדḥɗeŀƊ’

Try it online!

Just saw alephalpha's answer before edit and thought "what if I port it to Jelly?" and it worked.

Uses the formula from this comment:

31!10!27079205916672

then I noticed that 27079205916672 is a multiple of 32, so I changed the formula to

32!10!846225184896

cutting one more byte from the compressed number.

The Jelly code does "“ ½‘ (32, 10) !P factorial each and product × times “ḥɗeŀƊ’ 846225184896".

\$\endgroup\$
2
\$\begingroup\$

JavaScript (Node.js),  79 78  58 bytes

Saved 20 (!) bytes thanks to @tsh

A port of Neil's approach.

_=>eval(Buffer("?@^ddrtuuuvwxxy{|~~~~Ȁ掀").join`n*`+'n')

Try it online!


JavaScript (Node.js), 93 bytes

_=>eval('ZxEDCCCCBAECEBBBBn*ZxEAAFEEEFECn*ZxFFCn*ZxFDDAAEn*ZxAZZZZZZZZZZn'.replace(/Z/g,+[]))

Try it online!

The idea here was to look for factorizations of \$N\$ with factors whose hexadecimal representation only contains letters and \$0\$'s, so that we only need to replace \$0\$'s with a substitute character.

There are countless possibilities. We use this one:

0xEDCCCCBAECEBBBB * 0xEAAFEEEFEC * 0xFFC * 0xFDDAAE * 0xA0000000000

JavaScript (Node.js), 101 bytes

_=>eval("FxHOOFdNebfLLMHOGdFMcFGKKffKn*In**HFn<<JLn".replace(/[A-Z]/g,c=>c.charCodeAt()%(~[]+[+[]])))

Try it online!

The encoded expression is:

0x2990d8ebf667291d07c0155ff5n*3n**20n<<46n
\$\endgroup\$
8
  • 1
    \$\begingroup\$ Maybe _=>eval(Buffer(" @@G^dddrstuuuvwxxy{|~~~~~").join('n*')+'n')? \$\endgroup\$
    – tsh
    Commented Apr 15, 2020 at 8:50
  • \$\begingroup\$ Use " ^ddrtuuuvwxxy{|~~~~~Ȁ掀" may save 1 byte \$\endgroup\$
    – tsh
    Commented Apr 15, 2020 at 9:12
  • \$\begingroup\$ are we allowed to end the output by a "n" like this? \$\endgroup\$
    – Kaddath
    Commented Apr 15, 2020 at 10:22
  • \$\begingroup\$ @Kaddath It is notation for BigInt type. If you try to convert the result to String, the n will disappear. For example, you may print the result to a file by fs.writeFileSync('1.txt', f()). And you won't get n in the file. \$\endgroup\$
    – tsh
    Commented Apr 16, 2020 at 1:58
  • \$\begingroup\$ @tsh Thanks, it's a great answer of course, however, if I would be picky, the challenge being "Your output must be the precise digits of the number", the output is not exactly right and the code would be only missing +'' at the end.. \$\endgroup\$
    – Kaddath
    Commented Apr 16, 2020 at 10:44
2
\$\begingroup\$

Java (JDK), 81 bytes

v->"XPXPQWTRTWYTUQRXWUXXVTUYYPTYVQWQPWUWPPUWUTSVXPPPPPPPPP".chars().map(n->n-' ')

Try it online!

If Java's int allowed for (much) more than 32 bits, the following (65 bytes) would have worked:

v->",--------<?DGLRT\\^hhhpppptv|".chars().reduce(',',(a,b)->a*b)
\$\endgroup\$
2
\$\begingroup\$

K4, 64 bytes,

Solution:

,/$.Q.a?"iaiabhecehjefbcihfiigefjjaejgbhbahfhaafhfedgiaaaaaaaaa"

Explanation:

Really boring, lookup each letter in the alphabet (e.g. "b" => 1), convert to string and flatten

    ,/$.Q.a?"iaiabhecehjefbcihfiigefjjaejgbhbahfhaafhfedgiaaaaaaaaa" / solution
            "iaiabhecehjefbcihfiigefjjaejgbhbahfhaafhfedgiaaaaaaaaa" / a -> 0, b -> 1 etc
       .Q.a?                                                         / lookup in built-in alphabet a-z
      $                                                              / convert to string
    ,/                                                               / flatten
\$\endgroup\$
2
\$\begingroup\$

Perl 6, 42 bytes

say [*] ²X*'``}}}~~~~~yuuuwr\t|{^;G'.ords

Try it online!

Uses the same strategy of reducing the ordinal values of a string by multiplication as other answers, but also multiplies each element by 2 beforehand to save a byte on representing all those powers of two.

\$\endgroup\$
2
\$\begingroup\$

Ruby, 50 47 bytes

p eval (%w(Gv/ R>t. &DhP)*" @QQH}bMA").bytes*?*

Try it online!

Thanks histocrat for -1 byte, ad Jo King for pointing out some silliness in the original answer.

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

Io, 79 bytes

"ᾑ䐑Ἂ㉌⊡▒д᭞ᵸ᪑"foreach(i,(-i)bitwiseComplement print)

Try it online!

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

Red, 88 78 bytes

foreach c"XPXPQWTRTWYTUQRXWUXXVTUYYPTYVQWQPWUWPPUWUTSVXPPPPPPPPP"[prin c - sp]

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Pyth, 41 bytes

*F^MC,fP_TSC\G+C\.xLG"ujgcdbbbbbabababaab

Try it online!

*F^MC,fP_TSC\G+C\.xLG"ujgcdbbbbbabababaab    Implicit: G=lower case alphabet

                   L "ujgcdbbbbbabababaab    For each character in the string...
                  x G                        ... find it's index in the alphabet
              +C\.                           Prepend 46 (character code of .) - these are the prime powers
           C\G                               71
          S                                  Range 1-71
      fP_T                                   Filter keep the primes in the above
     ,                                       Pair the primes with the prime powers
    C                                        Transpose
  ^M                                         Map exponent operator over each pair
*F                                           Take product of the result, implicit print
\$\endgroup\$
1
\$\begingroup\$

Deadfish~, 164 bytes

iiisdo{d}oiiisdo{d}oioisiiiodddoddosoiiioiiodddddoioddddoioisdododdoiiiooddoddoioddsoo{d}oiisodsodddo{d}ioisiiio{d}iodoiisiiioddoiio{d}ooiisioiioddododoiiioii{o{d}}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

C (gcc), 77 bytes

*s;f(){for(s=L"pp!'JO~S<kx`[zQ]g kf YVDp        ";*s;)printf("%d",*s++-' ');}

Assumes that wchar_t and int have the same size. This way we can make the string wide and we can omit the type when declaring s.

A naive approach: group the digits in blocks of 1–3, each of which is an integer between 0 and 127 with no leading 0. Since character 0 can't be present in the string, characters are encoded as their value plus some constant. The constant is 32, which has the advantage of keeping all characters printable.

C (gcc), 78 bytes

Bonus: without relying on wchar_t and int having the same size. We save 1 byte (the L) by not having a wide string, but lose 1 byte because the implicit-int declaration *s is replaced by the explicit type name char.

f(){for(char*s="pp!'JO~S<kx`[zQ]g kf YVDp        ";*s;)printf("%d",*s++-' ');}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

><>, 36 bytes

|.ab*n!?+il"ØØØØØØÕìëöøèúúæò÷õîÐÐÄp"

Try it online!

It's based on a hand-optimized list of partial products of the prime factors of the number, each fitting within a byte.

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