Skip to main content
added 60 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27

Python 3, 224 220 219 215 211 211194 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
  • @Leaky nun saved 17 bytes with his awesome golfing skills(Thanks a lot!!!!): awesome use of modular indexing
i,j=0,1i=j=0
for x in bin(intk=int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC""OHZE5WCKDTW6JYMO1JNROAAJQVAN6F8KEO0SMKJM86XIBMCEH5FXXONZGBAVCN3689DS",36))[2:]
while k:r=x=='0';printj+=1;print(['k%2*'theanswertolifetheuniverseandeverything'[i%39]or' ',end='\n'*(40*'theanswertolifetheuniverseandeverything'j%27<1)[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1;i+=k%2;k//=2

Try it online!Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

111111100011111111000000111
111111000011111100000000011
111110000011111000111110001
111100000011111000111110001
111000100011111000111110001
110001100011111111111000011
100011100011111111100001111
000111100011111110000111111
000000000000111100011111111
000000000000111000111111111
111111100011111000111111000
111111100011111000000000000
111111100011111000000000000

We basically have two counters i and j. On encountering a 1 we print a space; Else if 0 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j%27<1 becomes true.

Python 3, 224 220 219 215 211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in bin(int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='0';print([' ',(40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

111111100011111111000000111
111111000011111100000000011
111110000011111000111110001
111100000011111000111110001
111000100011111000111110001
110001100011111111111000011
100011100011111111100001111
000111100011111110000111111
000000000000111100011111111
000000000000111000111111111
111111100011111000111111000
111111100011111000000000000
111111100011111000000000000

We basically have two counters i and j. On encountering a 1 we print a space; Else if 0 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j%27<1 becomes true.

Python 3, 224 220 219 215 211 194 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
  • @Leaky nun saved 17 bytes with his awesome golfing skills(Thanks a lot!!!!): awesome use of modular indexing
i=j=0
k=int("OHZE5WCKDTW6JYMO1JNROAAJQVAN6F8KEO0SMKJM86XIBMCEH5FXXONZGBAVCN3689DS",36)
while k:j+=1;print(k%2*'theanswertolifetheuniverseandeverything'[i%39]or' ',end='\n'*(j%27<1));i+=k%2;k//=2

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

111111100011111111000000111
111111000011111100000000011
111110000011111000111110001
111100000011111000111110001
111000100011111000111110001
110001100011111111111000011
100011100011111111100001111
000111100011111110000111111
000000000000111100011111111
000000000000111000111111111
111111100011111000111111000
111111100011111000000000000
111111100011111000000000000

We basically have two counters i and j. On encountering a 1 we print a space; Else if 0 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j%27<1 becomes true.

added 94 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27

Python 3, 224 220 219 215 211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in bin(int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='0';print([' ',(40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

000000011100000000111111000111111100011111111000000111
000000111100000011111111100111111000011111100000000011
000001111100000111000001110111110000011111000111110001
000011111100000111000001110111100000011111000111110001
000111011100000111000001110111000100011111000111110001
001110011100000000000111100110001100011111111111000011
011100011100000000011110000100011100011111111100001111
111000011100000001111000000000111100011111110000111111
111111111111000011100000000000000000000111100011111111
111111111111000111000000000000000000000111000111111111
000000011100000111000000111111111100011111000111111000
000000011100000111111111111111111100011111000000000000
000000011100000111111111111111111100011111000000000000

We basically have two counters i and j. On encountering a 01 we print a space; Else if 10 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j*(j%27<1) becomes true.

Python 3, 224 220 219 215 211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in bin(int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='0';print([' ',(40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

000000011100000000111111000
000000111100000011111111100
000001111100000111000001110
000011111100000111000001110
000111011100000111000001110
001110011100000000000111100
011100011100000000011110000
111000011100000001111000000
111111111111000011100000000
111111111111000111000000000
000000011100000111000000111
000000011100000111111111111
000000011100000111111111111

We basically have two counters i and j. On encountering a 0 we print a space; Else if 1 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j*(j%27<1) becomes true.

Python 3, 224 220 219 215 211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in bin(int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='0';print([' ',(40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

111111100011111111000000111
111111000011111100000000011
111110000011111000111110001
111100000011111000111110001
111000100011111000111110001
110001100011111111111000011
100011100011111111100001111
000111100011111110000111111
000000000000111100011111111
000000000000111000111111111
111111100011111000111111000
111111100011111000000000000
111111100011111000000000000

We basically have two counters i and j. On encountering a 1 we print a space; Else if 0 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j%27<1 becomes true.

added 94 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27

Python 3, 224 220 219 215 215211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in 7*'0'+binbin(int("617YVJ3DTR1CLG6IK8LCQAUQI28EG9NYMJVY1SY4K5J5BAJL2THFNTCWGGWKC67CQGV""OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='1';printr=x=='0';print([' ',(4*'theanswertolifetheuniverseandeverything'40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

000000011100000000111111000
000000111100000011111111100
000001111100000111000001110
000011111100000111000001110
000111011100000111000001110
001110011100000000000111100
011100011100000000011110000
111000011100000001111000000
111111111111000011100000000
111111111111000111000000000
000000011100000111000000111
000000011100000111111111111
000000011100000111111111111

We basically have two counters i and j. On encountering a 0 we print a space; Else if 1 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j*(j%27<1) becomes true.

Python 3, 224 220 219 215 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
i,j=0,1
for x in 7*'0'+bin(int("617YVJ3DTR1CLG6IK8LCQAUQI28EG9NYMJVY1SY4K5J5BAJL2THFNTCWGGWKC67CQGV",36))[2:]:r=x=='1';print([' ',(4*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

000000011100000000111111000
000000111100000011111111100
000001111100000111000001110
000011111100000111000001110
000111011100000111000001110
001110011100000000000111100
011100011100000000011110000
111000011100000001111000000
111111111111000011100000000
111111111111000111000000000
000000011100000111000000111
000000011100000111111111111
000000011100000111111111111

We basically have two counters i and j. On encountering a 0 we print a space; Else if 1 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j*(j%27<1) becomes true.

Python 3, 224 220 219 215 211 bytes

  • Thanks to @TFeld for 1 5 bytes: if(j%27<1)*j instead of if j*(j%27<1) and simplified print statement.
  • Thanks to @Leaky Nun for 4 bytes:Inverting 0 and 1, did not require the padding by zeros 7*'0'
i,j=0,1
for x in bin(int("OC5POO6MZYQNBWY0RP6BKBZCOZL13MIAB6I8YZ5N7LXSZBVKX7GC57AW5631YCJ6XCLC",36))[2:]:r=x=='0';print([' ',(40*'theanswertolifetheuniverseandeverything')[i]][r],end=['','\n'][j%27<1]);i+=r;j+=1

Try it online!

Explanation:

Uses base-36 compression to compress this binary number(new-line excluded)

000000011100000000111111000
000000111100000011111111100
000001111100000111000001110
000011111100000111000001110
000111011100000111000001110
001110011100000000000111100
011100011100000000011110000
111000011100000001111000000
111111111111000011100000000
111111111111000111000000000
000000011100000111000000111
000000011100000111111111111
000000011100000111111111111

We basically have two counters i and j. On encountering a 0 we print a space; Else if 1 is encountered we print next letter from the string and increase i. j increases for each 0 or 1. We also print new-lines whenever necessary i.e. when j*(j%27<1) becomes true.

added 32 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading
added 77 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading
deleted 6 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading
added 532 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading
added 532 characters in body
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading
Source Link
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27
Loading