title: ASCII art for torrent UI

text:
# Question
Title: ASCII art for torrent UI
# Problem

Recreate the UI from a torrent program

Given no input, output the following:

```
+----------+----------+----------+
|a.exe     |##########|seeding   |
+----------+----------+----------+
|b.exe 10% |#         |leeching  |
+----------+----------+----------+
|c.exe     |##########|seeding   |
+----------+----------+----------+
|d.exe 20% |##        |leeching  |
+----------+----------+----------+
|e.exe     |##########|seeding   |
+----------+----------+----------+
|f.exe 30% |###       |leeching  |
+----------+----------+----------+
|g.exe     |##########|seeding   |
+----------+----------+----------+
|h.exe 40% |####      |leeching  |
+----------+----------+----------+
|i.exe     |##########|seeding   |
+----------+----------+----------+
|j.exe 50% |#####     |leeching  |
+----------+----------+----------+
|k.exe     |##########|seeding   |
+----------+----------+----------+
|l.exe 60% |######    |leeching  |
+----------+----------+----------+
|m.exe     |##########|seeding   |
+----------+----------+----------+
|n.exe 70% |#######   |leeching  |
+----------+----------+----------+
|o.exe     |##########|seeding   |
+----------+----------+----------+
|p.exe 80% |########  |leeching  |
+----------+----------+----------+
|q.exe     |##########|seeding   |
+----------+----------+----------+
|r.exe 90% |######### |leeching  |
+----------+----------+----------+
|s.exe     |##########|seeding   |
+----------+----------+----------+
|t.exe     |##########|seeding   |
+----------+----------+----------+
|u.exe     |##########|seeding   |
+----------+----------+----------+
|v.exe     |##########|seeding   |
+----------+----------+----------+
|w.exe     |##########|seeding   |
+----------+----------+----------+
|x.exe     |##########|seeding   |
+----------+----------+----------+
|y.exe     |##########|seeding   |
+----------+----------+----------+
|z.exe     |##########|seeding   |
+----------+----------+----------+

```

progress for programs are:

`b=10% d=20% f=30% h=40% j=50% l=60% n=70% p=80% r=90%`

amount of `#`'s for leeching programs is `progress/10`

the rest are all `seeding` with full progress bars.

# Rules

* Leading and trailing newlines allowed.
* Leading and trailing spaces allowed as long as it doesn't change shape of output.
* stdout and functions for output allowed.
* **Shortest code in bytes win**

# Answer
## Charcoal, ~~98~~ ~~85~~ 83 bytes

```
Ｆ³Ｂ⁻³⁴×¹¹ι³Ｍ↘ .exeＭ⁶→×#χ|seeding⸿Ｆ²⁵Ｃ⁰¦²↗Ｆβ↓⁺ι-Ｆ⁹«Ｊ⁷⁺³×⁴ι⁺⁺ι¹0% |#Ｐ⁺× ⁹|leeching×#ι

```

I thought copying a template would save me a lot of code but it all seems to add up somehow, although I managed to save 13 bytes by using a single loop to fix the 9 leeching rows. Explanation:

```
Ｆ³Ｂ⁻³⁴×¹¹ι³             Make the top row of boxes
Ｍ↘ .exeＭ⁶→×#χ|seeding⸿  Print .exe, the 10 #s and seeding
Ｆ²⁵Ｃ⁰¦²                 Make 25 copies of the boxes
↗Ｆβ↓⁺ι-                 Put the letters in at the start
Ｆ⁹«                     For the 9 leeching files
   Ｊ⁷⁺³×⁴ι              Move the cursor to the percentage column
   ⁺⁺ι¹0% |#            Print the percentage and the first # of progress
   Ｐ⁺× ⁹|leeching       Erase the rest of the progress and change the status
   ×#ι                  Print the desired amount of progress

```

(Side note: I seem to have discovered a bug in Charcoal; `|` is an ASCII character, but it's also counted as an arrow for the purposes of `Multiprint`, so you can't `Multiprint` it.)
> 5 votes

# Answer
# Perl 5, 130 bytes

```
print$e=("+"."-"x10)x3 ."+
";printf"|$_.exe%4s |%-10s|%-9s |
$e",$|--&&$@++<9?("$@0%","#"x$@,leeching):("","#"x10,seeding)for a..z

```

Try it online!

I expect that there are a few bytes that can be golfed, but I've ran out of inspiration.

Short explanations:
`$e` contains the separation line (`+----------+----------+----------+`); its construction is straight forward (`("+"."-"x10)x3 ."+\n"`).
Then, I loop over the characters from `a` to `z`:
Every time, print `"|$_.exe%4s |%-10s|%-9s |\n$e`; this is a standard `printf` with placeholders for strings (`%s`) and left-padded strings (`%-9s`).
if `$|--&&$@++<9` is true (`$|` is a special variable that contains either 0 or 1, and decrementing it toggles its value), then the percentage is not 100%, and the three values in the print are `"$@0%","#"x$@,leeching` (`$@0%` is actually just `$@ . "0" . "%"` \- remember that `$@` was incremented earlier), otherwise, the three values are `"","#"x10,seeding`).
> 11 votes

# Answer
# SOGL V0.12, ~~90~~ ~~89~~ 88 bytes

```
ēz{L┌* +3ΟQķ|;o".exe ”oēI»L*"% |”e» #*lLκ@*"┌5%8'Ω⅞█≡θ¹‘++++e'³>e2\+?X"⅓m÷Ko→∆)№(¤^▒«‘}o

```

Try it Here!

Explanation:

```
ē                                 push variable E (default = input, which default is 0) and increase it after (next ē call will result in 1, or next e call - 2)
 z{                               iterate over the lowercase alphabet
   L┌*                            push 10 dashes
       +                          push "+"
        3Ο                        encase 3 copies of the dashes in pluses
          Q                       output in a new line, without popping and without disabling auto-output
           ķ|                     output in a new line "|"
             ;o                   output the current iteration (the alphabet letter)
               ".exe ”o           output ".exe "
                       ē          push E and increase the variable after
                        I         increase it
                         5*       multiply by 5 (every 2 ē calls this gets called)
                           "% |”  push "% |"

e»                                  push (E)/2
   #*                               get that mant "#"s
     l                              get the length of that string
      Lκ                            push 10-length
        @*                          push that many spaces
          "..‘                      push "|leeching  |"
              ++++                  add all those strings on the stack together ((e+1)*5, "% |", "#..#", " .. ", "|leeching |") (done this way to leave the "+-+-+-+" on the stack)
                  e'³>              push e>19
                      e2\           push e divides by 2
                         +          add together (here works like OR)
                          ?         if that then
                           X          remove the added-together string
                            "..‘      push "    |##########|seeding   |"
                                }   END
                                 o  output POP (either the added string or full/seeding version)
implicitly output POP (since none of tTpP were called), which is the separator line

```
> 7 votes

# Answer
# Python 2, 182 177 bytes

Thanks to @officialaimm for shaving off 5 bytes by changing the format of the condition.

```
r=("+"+10*"-")*3+"+"
for i in range(26):z=i/2+1;print r+"\n|"+chr(97+i)+".exe "+["    |"+10*"#"+"|seeding ",`10*z`+"% |"+z*"#"+(10-z)*" "+"|leeching"][i%2and i<19]+"  |"
print r

```

Try it online!
> 5 votes

# Answer
# Javascript, ~~232~~ ~~230~~ ~~228~~ 226 bytes

```
(s='+----------'.repeat(3),p=0)=>[...'abcdefghijklmnopqrstuvwxyz'].map((c,i)=>(b=i%2,p=b?p+10:p,x=b&p<91,`${s}+'
|${c}.exe ${x?p+'%':'   '} |${'#'.repeat(x?p/10:10).padEnd(10)}|${x?'leeching':'seeding '}  |`)).join`
`+`
${s}+`

```
* -2 Bytes thanks to @Stephen S - Using default function parameters
* -2 Bytes thanks to OP - Replacing some spaces
* -2 Bytes thanks to @Shaggy - Destructuring alphabet string

## Demo

```
f=

(s='+----------'.repeat(3),p=0)=>[...'abcdefghijklmnopqrstuvwxyz'].map((c,i)=>(b=i%2,p=b?p+10:p,x=b&p<91,`${s}+'
|${c}.exe ${x?p+'%':'   '} |${'#'.repeat(x?p/10:10).padEnd(10)}|${x?'leeching':'seeding '}  |`)).join`
`+`
${s}+`

console.log(f());
```

```
.as-console-wrapper { max-height: 100% !important; top: 0; }
```
> 3 votes

# Answer
# Braingolf, ~~673~~ 655 bytes

```
9..#+[#-]#+[#-]#+[#-]"+
|"!&@V"a.exe     |"!&@V9[##]"|seeding   |
"!&@v!&@v<1+>!&@V8##[# ]"|leeching  |
"!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<$_##>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<$_##>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<$_##>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<$_##>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<$_##>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<$_##>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<$_##>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<<$_##>>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@vv<<<<<<<<<$_##>>>>>>>>>!&@v!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv!&@v<1+>!&@v!&@vv$_!&@;

```

Try it online!

I've said it before and I'll say it again: Braingolf is bad at ASCII art.

At least this is only 1/3rd of the bytes it would take to actually hardcode the output
> 2 votes

# Answer
# PHP, 179 bytes

without input

```
for($a=a;$x<53;++$x&1?:$a++)printf($x&1?"
|$a.exe%4s |%-10s|%-10s|
":str_pad("",34,"+----------"),($y=$x%4>2&$x<36?++$z:"")?$y."0%":"",str_repeat("#",$y?:10),$y?leeching:seeding);

```

Try it online!

# PHP, 176 bytes

with input

```
for($a=a;$x<53;)printf($x&1?"
|$a.exe%4s |%-10s|%-10s|
":str_pad("",34,"+----------"),($y=strstr($argn,++$x&1?:$a++)[2])?$y."0%":"",str_repeat("#",$y?:10),$y?leeching:seeding);

```

Try it online!
> 2 votes

# Answer
# , 107 bytes

```
¬azÓ./|&.exeò
ddÎAµ |±°#|seeding³ |
ÙÒ-4ñr+11lñddç^/P
jp4G9ñ8|R00%3l10r llRleeching4jñV{10g
çä/WylWl@"r#

```

Try it online!

Hexdump:

```
00000000: ac61 7ad3 2e2f 7c26 2e65 7865 f20a 6464  .az../|&.exe..dd
00000010: ce41 b520 7cb1 b023 7c73 6565 6469 6e67  .A. |..#|seeding
00000020: b320 7c0a d9d2 2d34 f172 2b31 316c f164  . |...-4.r+11l.d
00000030: 64e7 5e2f 500a 6a70 3447 39f1 387c 5230  d.^/P.jp4G9.8|R0
00000040: 3025 1b33 6c31 3072 206c 6c52 6c65 6563  0%.3l10r llRleec
00000050: 6869 6e67 1b34 6af1 567b 3130 6701 0ae7  hing.4j.V{10g...
00000060: e42f 5779 6c57 6c40 2272 23              ./WylWl@"r#

```
> 2 votes

# Answer
# Japt, 121 bytes

```
;'++(-p10 +'+ ³
1
U+R+C£W=Yv ªY>20?10:Y¥1?1:V±1"|{X}.exe {4î hW>9?S:W+"0%"}|{10î h'#pW}|{10î hW<10?`äƒÊA`:`Ð:ˆg`}|"+R+U+R

```

Try it online!
> 2 votes

# Answer
# Ruby, 141 bytes

```
puts s=(?++?-*10)*3+?+,(?a..?z).map{|c|["|#{c}.exe%4s |%-10s|%-9s |"%(c.ord%2>0||($.+=1)>9?["",?#*10,:seeding]:["#$.0%",?#*$.,:leeching]),s]}

```

Try it online!
> 2 votes

# Answer
# Java (OpenJDK 8), ~~244~~ ~~229~~ ~~228~~ ~~227~~ ~~226~~ ~~224~~ ~~222~~ ~~218~~ 217 bytes

```
o->{String x="----------+",z="+"+x+x+x,s=z;for(int c=96,p;++c<123;s+=s.format("%n|%c.exe%4s |%-10s|%-10s|%n"+z,c,p>9?"":p+"0%","##########".substring(0,p),p>9?"seeding":"leeching"))p=(p=c/2-48)>9|c%2>0?10:p;return s;}

```

Try it online!

-2 bytes thanks to @KevinCruijssen!
> 2 votes

# Answer
# Plain TeX, 306 bytes

```
\let\a\advance\def\b{+\r{\r-9-+}3\par}\def\s{\r~5|\r\#9\#|seeding\r~3|}\def\r#1#2{{\i0\loop#1\a\i1
\ifnum\i<#2\repeat}}\newcount\i\i`a\newcount\j\j1\tt\loop\b|\char\i.exe\ifodd\i\s\else\ifnum\i<`s\
\the\j0\%~|\r\#\j{\j-\j \a\j10 \r~\j}\a\j1|leeching\r~2|\else\s\fi\fi\endgraf\a\i1 \ifnum\i<`\{\repeat\b\bye

```

Ungolfed with some explanations:

```
\let\a\advance
\def\b{+\r{\r-9-+}3\par}%           The bar between rows: '+' + 3*(9*'-' + '-' + '+') + '\n'
\def\s{\r~5|\r\#9\#|seeding\r~3|}%  The common part for seeding lines, similar to \b
\def\r#1#2{{%                       Macro for repeating #1 #2 times
% Note the local grouping here which is needed for nested \loops and allows us to reuse the global \i
  \i0%
  \loop
    #1%
    \a\i1 %
    \ifnum\i<#2%
   \repeat%
}}%
\newcount\i \i`a%                   Counter for ASCII values of letters, start with 'a'
\newcount\j \j1%                    Counter for percentages; shorter than modulo tricks
\tt
\loop
  \b|\char\i.exe%
  \ifodd\i
    \s%                             Odd lines are seeding lines
  \else
    \ifnum\i<`s\ %                  Even line up to 'r'
      \the\j0\%~|\r\#\j%            Print percentage and progress bar
      {\j-\j \a\j10 \r~\j}%         10-\j spaces after the progress bar
      \a\j1%
      |leeching\r~2|%
    \else
      \s%                           There's no \ifeven, hence the repetition here
    \fi
  \fi
  \endgraf%                         Print '\n'. \par doesn't work here, because \loop isn't a \long macro
  \a\i1
  \ifnum\i<`\{%                     Repeat until \j <= 'z'
\repeat
\b
\bye

```
> 2 votes

# Answer
# Python 3, 255 bytes

I'm sure this can be golfed, updating soon:

```
e,l='.exe ',('+'+10*'-')*3+"+";print(l)
for i in zip(['|'+chr(z)+e+'    |'+"#"*10+'|seeding   |'if z%2or z>115else'|'+chr(z)+e+str((z-96)//2*10)+'% |'+(z-96)//2*"#"+(10-(z-96)//2)*" "+"|leeching  |"for z in range(97,123)],[l]*26):print(i[0],i[1],sep="\n")

```

Try it online!
> 1 votes

# Answer
# Charcoal, 154 149 143 130 103 bytes

```
Ａ⁵δＦβ«Ｆ³«+χ»+⸿Ａ∨﹪δ²›δ⁹⁵θ|ι.exe⎇θ… ⁵⁺⁺ δ% ⁰|⎇θ…#χ⁺…#∕δχ… ⁻χ∕δχ⎇θ|seeding   |⸿↧|leeching  |⸿Ａ⁺⁵δδ»Ｆ³«+χ»+

```

Try it online! (Link to verbose version.)

* 27 bytes saves thanks to Neil's master Charcoaling techniques.
> 1 votes

# Answer
# Python 2, ~~172~~ ~~170~~ 162 bytes

<sup>-8 bytes thanks to Lynn</sup>

```
for i in range(2,28)+[id]:print('+'+'-'*10)*3+'+';a=i/2;b=i%2*(i<20);print('|'+'%-10s|'*3)%('%c.exe '%(95+i)+'%d0%%'%a*b,'#'*(a*b or 10),'sleeeedcihnign g'[b::2])

```

Try it online!
> 1 votes

# Answer
# Japt, 98 bytes

```
;27Æ4î+ ¬q-pU=10ÃíC¬£'|²¬q[X+".exe {W=Yu ©°T<U©T*U ?W+'%:P}"'#pW/UªU `äÊA Ð:g`¸g!W]m!hUî)q|})c ·

```

Doesn't work in the latest version due to a bug that messes up `4î+`, `q-p10`, and `q|`, but it does work in commit `f619c52`. Test it online!
> 1 votes

# Answer
# T-SQL, 238 bytes

```
DECLARE @ INT=1,@D CHAR(11)='+----------'L:PRINT @D+@D+@D+'+
|'+CHAR(@+96)+'.exe '+IIF(@%2=0AND
@<20,CONCAT(@/2,'0% |',REPLICATE('#',@/2),SPACE(10-@/2),'|leeching  |'),'    |##########|seeding   |')SET @+=1IF @<27GOTO L
PRINT @D+@D+@D+'+'

```

Procedural solution, formatted:

```
DECLARE @ INT=1, @D CHAR(11)='+----------'
L:
    PRINT @D + @D + @D + '+
|' + CHAR(@+96) + '.exe ' +
    IIF(@%2=0 AND @<20,
       CONCAT(@/2,'0% |',REPLICATE('#',@/2),SPACE(10-@/2),'|leeching  |'),
       '    |##########|seeding   |')
   SET @+=1
IF @<27 GOTO L
PRINT @D + @D + @D + '+'

```

Everything in the loop (up until the SET) is part of the same PRINT statement, including a line break inside the first string literal.

I'm working on a set-based solution (create and populate a table, then SELECT from it), but I'm not sure if its going to be smaller or not.
> 1 votes

# Answer
# Java 8, ~~271~~ ~~263~~ 262 bytes

```
o->{String a="+----------",b=a+a+a+"+\n",r=b;for(int c=96,t;++c<123;r+="|"+(char)c+".exe "+(t>0?(c/2-48)+"0%":"   ")+" |##########".substring(0,t>0?c/2-46:12)+"         |".substring(t>0?c/2-49:9)+(t>0?"leeching":"seeding ")+"  |\n"+b)t=c<115&c%2<1?1:0;return r;}

```

All this trouble for nothing.. \>.\> ;)
(Shorter Java answer by *@OliverGrégoire*.)

**Explanation:**

Try it here.

```
o->{                       // Method with unused Object parameter and String return-type
  String a="+----------",b=a+a+a+"+\n",
                           //  Temp String "+----------+----------+----------+\n"
         r=b;              //  Result-String
  for(int c=96,t;++c<123   //  Loop from 'a' to 'z':
      ;                    //    After every iteration:
       r+=                 //     Append the result-String with:
         "|"               //      A literal "|"
         +(char)c          //      + the character
         +".exe "          //      + literal ".exe "
         +(t>0?            //      If the current character is below 's' and even unicode:
           (c/2-48)+"0%"   //       + the percentage
          :                //      Else:
           "   ")          //       + the spaces
         +" |##########"   //      + the progress bar
           .substring(0,   //       By using a substring from 0 to
             t>0?          //        If the current character is below 's' and even unicode:
              c/2-46       //         'b' = 3; 'd' = 4; 'f' = 6; etc.
             :             //        Else:
              12)          //         12 (the entire progress bar)
         +"         |"     //      + spaces after the progress bar
           .substring(     //       By using a substring from
             t>0?          //        If the current character is below 's' and even unicode:
              c/2-49       //         'b' = 0; 'd' = 1; 'f' = 2; etc.
             :             //        Else:
              9)           //         9 (all the spaces)
         +(t>0?            //      If the current character is below 's' and even unicode:
           "leeching"      //       + literal "leeching"
          :                //      Else:
           "seeding ")     //       + literal "seeding "
         +"  |\n"          //      + literal "  |" + new-line
         +b)               //      + `b` ("+----------+----------+----------+\n")
  t=c<115&c%2<1?           //   If the current character is below 's' and even unicode:
     1                     //    `t` = 1
    :                      //   Else:
     0;                    //    `t` = 0
                           //  End of loop
  return r;                //  Return the result-String
}                          // End of method

```
> 1 votes

# Answer
# C (gcc), ~~217~~ 211 bytes

-6 bytes thanks to ceilingcat

```
#define B"+----------"
f(p){for(char*a,*l=" bdfhjlnpr",i=97;puts(B B B"+"),i<'{';printf("|%c.exe %.*d%s |%-10.*s|%s  |\n",i++,!!a,p%10,a?"0%":"   ",p=a?a-l:10,"##########",a?"leeching":"seeding "))a=index(l,i);}

```

Try it online!
> 1 votes

# Answer
# Stax, ~~53~~ ~~68~~ 64 bytes

```
â"{≤╞c~£ÿτδ¬│∙}Dgoô₧»öÖ#9▌ó♂i◘ÿkùâGCå`è╙/♠Gδb,φW0EqΔ┘δth½àJZ¿l╦#

```

Run and debug it

Unpacked and ungolfed it looks like this.

```
'+'-A*+34:mQ
VaF
  '|p
  ".exe "+
  |;i^hA?X
  $.0%+
  xA<Y*+G
  '#x*G
  `Qz/"D?d=T"`jy@G
  zP
  Q
}A(p'|p

```

Note that if you use the "Golf" button to remove whitespace and comments from the expanded solution, it incorrectly doubles the `}`. If you remove the extra character, it continues to work correctly.
> 1 votes

# Answer
# 05AB1E, 120 bytes

```
AS".exe"«'A17×S9L‚ζJJðK€H©T*т%εD0Q_i'%«ëð3×}}‚ζεðýð«}®'#×T®-úí"leeching  seeding   "Tô®TQè)ζ'|ýε'|.ø}õ.ø'-T∍'+«3×'+ì¶.øý

```

Try it online!

---

There's way too much golfing to do here, will post explanation when I'm below 90 bytes.
> 1 votes

# Answer
# ///, 264 bytes

```
/~/\/\///!/---~@/!!!-~$/@+@+@~</+
|~>/|
+~(/###~*/  ~}/|leeching*~[/.exe ~;/0% |~{/[**|(((#|seeding* ~]/>$</+$<a{]b[1;# ****}]c{]d[2;##****}]e{]f[3;( ***}]g{]h[4;(#***}]i{]j[5;(## **}]k{]l[6;((**}]m{]n[7;#((* }]o{]p[8;##((*}]q{]r[9;((( }]s{]t{]u{]v{]w{]x{]y{]z{>$+

```

Try it online!

Works by defining a bunch of replacements and using them to replace more characters than they are.
> 0 votes

# Answer
# Mathematica, 274 bytes

```
a=Alphabet[];n=StringPadRight;o=ToString;Column@Join[Row/@Table[{g="+----------+----------+----------+\n","|"<>o@a[[i]]<>".exe ",If[EvenQ@i&&i<20,s=o[5i]<>"% ";k="|"<>Table["#",i/2];f="leeching";,k="|##########";f="seeding";s="    "];s,n[k,11]<>"|",n[f,10],"|"},{i,26}],{g}]

```
> 0 votes

# Answer
# Bubblegum, 150 bytes

```
00000000: e007 3d00 8c5d 0015 8b71 ec14 6414 8031  ..=..]...q..d..1
00000010: 7fc3 2b24 3568 ca81 7ab5 363e c3b7 f500  ..+$5h..z.6>....
00000020: c926 d3f0 55d9 926f 75a8 f8d0 806f 1f12  .&..U..ou....o..
00000030: d71f b824 7e75 a7f2 544f 0364 ee5e 98be  ...$~u..TO.d.^..
00000040: a327 c36c 2ff1 8e6e df94 858e 82d0 d9da  .'.l/..n........
00000050: 77d6 fac6 5548 64aa 7a29 78fa 6886 3c85  w...UHd.z)x.h.<.
00000060: 0494 905e 74de a209 e927 42c8 418d 8250  ...^t....'B.A..P
00000070: ee39 c16b a4c2 9add 0b17 f8b0 9984 9aa8  .9.k............
00000080: defb 2875 31a9 c136 0ec2 6f28 9f8c 9990  ..(u1..6..o(....
00000090: 10d4 0000 0d0a                           ......

```

Try it online!
> 0 votes

# Answer
## Perl6, ~~225~~ 219

```
my&f={say ("+"~"-"x 10)x 3~"+"};my&g={f;my$b=$^c>9??"   "!!$c*10~"%";say "|$^a.exe $b |{'#'x$c}{' 'x(10-$c)}|$^d  |"};my \s="seeding ";for 1..9 {g chr(95+2*$_),10,s;g chr(96+2*$_),$_,"leeching"};g $_,10,s for "s".."z";f

```
> 0 votes

# Answer
# Lua, 380 bytes

```
s=string.gsub
r=string.rep
function l(i)return".exe "..i.."0% |"..r("#",i)..r(" ",10-i).."|leeching  |\n"end
print((s(s("Z|aY|b"..l(1).."Z|cY|d"..l(2).."Z|eY|f"..l(3).."Z|gY|h"..l(4).."Z|iY|j"..l(5).."Z|kY|l"..l(6).."Z|mY|n"..l(7).."Z|oY|p"..l(8).."Z|qY|r"..l(9).."Z|sY|tY|uY|vY|wY|xY|yY|zY","Y",".exe     |##########|seeding   |\nZ"),"Z","+----------+----------+----------+\n")))

```

Uses `gsub` to create the row dividers and the seeding rows. `l` generates the leeching rows. Renaming `gsub` and `rep` saves more bytes.
> 0 votes

# Answer
# Jstx, 126 bytes

```
►-○EO.♥/(:►+:1►+;+₧D0%4►|22♫♥φézï2♂bdfhjlnpr♀*U!↑)☺:♣<!,♂% |♀:2&₧#=-₧#/')▬►#◙')§► ◙21♫♠~√╫WσΓÇ2◙↓♫♥¿Ç~√₧#/►#:1♫♣~√▐┬╞¿:2◙►|41%

```

Try it online!

Explanation

```
►-          # Push literal -
○           # Push literal 9
E           # Push the second stack value the absolute value of the first stack value times.
O           # Collapse all stack values into a string, then push that string.
.           # Store the first stack value in the d register.
♥           # Push literal 3
/           # Enter an iteration block over the first stack value.
(           # Push the value contained in the d register.
:           # Push the sum of the second and first stack values.
►+          # Push literal +
:           # Push the sum of the second and first stack values.
1           # End an iteration block.
►+          # Push literal +
;           # Push the difference of the second and first stack values.
+           # Store the first stack value in the a register.
₧D          # Push literal abcdefghijklmnopqrstuvwxyz
0           # Enter an iteration block over the first stack value and push the iteration element register at the beginning of each loop.
%           # Push the value contained in the a register.
4           # Print the first stack value, then a newline.
►|          # Push literal |
2           # Print the first stack value.
2           # Print the first stack value.
♫♥φézï      # Push literal .exe
2           # Print the first stack value.
♂bdfhjlnpr♀ # Push literal bdfhjlnpr
*           # Push the value contained in the iteration element register.
U           # Push a true if the second stack value contains the first stack value, else false.
!           # Push a copy of the first stack value.
↑           # Enter a conditional block if first stack value exactly equals true.
)           # Push the value contained in the iteration index register.
☺           # Push literal 1
:           # Push the sum of the second and first stack values.
♣           # Push literal 5
<           # Push the product of the second and first stack values.
!           # Push a copy of the first stack value.
,           # Store the first stack value in the b register.
♂% |♀       # Push literal % |
:           # Push the sum of the second and first stack values.
2           # Print the first stack value.
&           # Push the value contained in the b register.
₧#          # Push literal 10
=           # Push the quotient of the second and first stack values.
-           # Store the first stack value in the c register.
₧#          # Push literal 10
/           # Enter an iteration block over the first stack value.
'           # Push the value contained in the c register.
)           # Push the value contained in the iteration index register.
▬           # Enter a conditional block if the second stack value is less than the top stack value.
►#          # Push literal #
◙           # End a conditional block.
'           # Push the value contained in the c register.
)           # Push the value contained in the iteration index register.
§           # Enter a conditional block if the second stack value is greater than or equal to the top stack value.
►           # Push literal
◙           # End a conditional block.
2           # Print the first stack value.
1           # End an iteration block.
♫♠~√╫WσΓÇ   # Push literal |leeching
2           # Print the first stack value.
◙           # End a conditional block.
↓           # Enter a conditional block if first stack value exactly equals false.
♫♥¿Ç~√      # Push literal     |
₧#          # Push literal 10
/           # Enter an iteration block over the first stack value.
►#          # Push literal #
:           # Push the sum of the second and first stack values.
1           # End an iteration block.
♫♣~√▐┬╞¿    # Push literal |seeding
:           # Push the sum of the second and first stack values.
2           # Print the first stack value.
◙           # End a conditional block.
►|          # Push literal |
4           # Print the first stack value, then a newline.
1           # End an iteration block.
%           # Push the value contained in the a register.
            # Implied println upon termination.

```

I'm sure this can get significantly shorter.
> 0 votes

# Answer
# PowerShell, ~~224~~ ~~210~~ ~~181~~ ~~174~~ ~~169~~ 160 bytes

```
$l=("+"+"-"*10)*3+"+
"
0..25|%{"$l|$([char](97+$_)).exe "+("    |$("#"*10)|seeding ",("$(++$c/2)0% |{0,-10}|leeching"-f("#"*($c/2))))[$_%2-and$_-lt18]+"  |"}
$l

```

Try it online!

Now 64 bytes less terrible

Some Neat tricks: Combining a lot of "$(stuff)" to save on parens. We want only odd numbers which makes $\_%2 = 1 so we don't need an -eq for it. Now uses list indexing instead of an if-else to save 5 bytes. Also gets rid of an \`n for another byte. I couldn't get "$c\`0%" to separate the var and zero so the current route was 1 byte shorter than gluing two strings together. Now with -f formatting.
> 0 votes

# Answer
# ///, 226 bytes

```
/;/ "//:/$$$+//,/0% |//*/###//)/   //(/!
|//'/,*//&/.exe //$/+----------//"/ |leeching  |
:
|//!/&) |***#|seeding)|
:/:
|a(b&1,#)) ;c(d&2,##));e(f&3'))"g(h&4'#) ;i(j&5'##);k(l&6'*)"m(n&7'*# ;o(p&8'*##;q(r&9'**"s(t(u(v(w(x(y(z!

```

Try it online!

A bit more sophisticated approach to defining replacements. Try it interactively here!
> 0 votes

# Answer
# Pascal (FPC), ~~294~~ ~~286~~ ~~266~~ 263 bytes

```
const m='----------+';Q=#10'+'+m+m+m+#10;S='.exe     |##########|seeding   |'+Q;var i:word;begin write(Q);for i:=1to 9do write('|',chr(95+i*2),S,'|',chr(96+i*2),'.exe ',i,'0% |',StringOfChar('#',i),'|leeching  |':22-i,Q);for i:=115to 122do write('|',chr(i),S)end.

```

Try it online!

So... I ended up with both leading and trailing newline :D
> 0 votes

# Answer
# Deadfish~, 5782 bytes

```
{iiii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{ddd}iiic{ddddd}dc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}ddddddc{ddddd}ddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}dddcdc{d}dcdddddc{{i}d}iic{{d}i}icdddccccccccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}dddddc{ddddd}dddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}ddddc{ddddd}ddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}ddcddc{d}dcdddddc{{i}d}iic{{d}i}iccdddcccccccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}dddc{ddddd}dddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}ddc{ddddd}ddddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}dcdddc{d}dcdddddc{{i}d}iic{{d}i}icccdddccccccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}dc{dddddd}iiic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}c{dddddd}iic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}cddddc{d}dcdddddc{{i}d}iic{{d}i}iccccdddcccccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}ic{dddddd}ic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}iic{dddddd}c{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}icdddddc{d}dcdddddc{{i}d}iic{{d}i}icccccdddccccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{dd}iiic{dddddd}dc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}ddddddc{dddddd}ddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}iicddddddc{d}dcdddddc{{i}d}iic{{d}i}iccccccdddcccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}dddddc{dddddd}dddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}ddddc{dddddd}ddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}iiic{d}iiic{d}dcdddddc{{i}d}iic{{d}i}icccccccdddccc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}dddc{dddddd}dddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}ddc{dddddd}ddddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}iiiic{d}iic{d}dcdddddc{{i}d}iic{{d}i}iccccccccdddcc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}dc{{d}iii}iiic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}c{{d}iii}iic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}ic{ii}iiiiic{d}ic{d}dcdddddc{{i}d}iic{{d}i}icccccccccdddc{{i}d}iic{d}ddddddc{d}iiiccddciiiiiciciiiiic{d}iiic{{d}iii}dcc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}ic{{d}iii}ic{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}iic{{d}iii}c{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiic{d}iiic{{d}iii}dc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiicddddddc{{d}iii}ddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiicdddddc{{d}iii}dddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiicddddc{{d}iii}ddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiicdddc{{d}iii}dddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc{ddd}dddc{{i}}{i}iiiicddc{{d}iii}ddddddc{iiiii}iiiiic{ii}dc{dd}ic{{d}iii}iccccc{{i}d}iic{{d}i}i{c}{{i}d}dc{d}ic{d}ddddccdciiiiiciiiiic{d}iiic{{d}iii}dccc{{i}d}iic{{d}}{d}ddddc{iii}iiicii{c}ddcii{c}ddcii{c}ddc

```

Try it online!

If this was ...
> 0 votes

---
Tags: code-golf, string, ascii-art, kolmogorov-complexity
---


# Question
Title: Compress a maximal discrepancy-2 sequence
Output this binary sequence of length 1160:

```
-++-+--++-++-+--+--++-+--+--++-+--++-++-+-++--++-+---+-++-+--+--++++--+--++-+--++-++----++-++-+-++--++-+-+---++-+--++-++-+--++-+--+---+-++-+--++-++-+--+--++-++-+--++-+--+++-+-+----+++-+--+--+++---++-++-+--+--+++--+-+-+--+-+++-++-+--+--++-+--++-++-+--+--++--+++---+++-+---++-+--++--+-+--+-+++-+--++-++-+--++-+--+--++-+--++--+-++-+-+--+-+-++-+--++-+--+--++-+-+-++-+-+-++---+-+--++++--+---++-+-++-+--++-+--+--++-+--++++--+---+-++++--+--++-++-+--++-+--+--++-+--++-++-+--++-+--+--++-++-+----+++-+--++--+++---+-++-+--+-++---+-++-++-+--+--++--++++-+--+--+--++++--+--+++---++-++-+--++--+-+--+--++-++-+--+--+-+++-++-+--+--++--+-++-++-+--+--+--++-++-+--+++---++-+--++-++---+++---++-++----+++--+-++-+--+--++-+--++-++-+-++--++--++----+++-++--++----++-+++--++---+++----+-+-++-++-++-+-+----+++--++-+--++-++-+--+--+--++-+--++-++-+--++--+-+--+-+-+-++++---+-+-++--+--+-+-+-++-+-+++--+-+--+--+-+++--+-+++---++-+--+--++-++--++---++-+-++--++-+---+-++-+--+-++--++-+--++-+--+-+++-+--++--+-+-+++--+-+--++-++-+--+--+-++---+-++-+-++--++-+--+++-+----++--+-++-+-++--++-+--++-+-++--++-+---+-++-+--+++----+-+-++--++-+--++-++-++-+--+--+--++++---++---+-+-++-+-+++--+-++--+-+--+-+-++---+++-++

```

**The sequence**

This finite sequence is tightly structured in a way that I hope lends to unique methods for compression. It arises from the Erdős discrepancy problem, which was featured in a previous challenge.

Treating the terms as +1 and -1, this is a maximal-length sequence of discrepancy 2, which means that:

> For every positive step size `d`, if you take every `d`'th term (starting with the `d`th term), the running sum of the resulting sequence remains between -2 and 2 inclusive.

If you think of each `+` to mean a step right and `-` to mean a step left, this means that the walk of every `d`th instruction never travels more than 2 steps away from the start position.

For example, for `d=3`, taking every 3rd term gives the sequence `+-++--+--+-...`, whose running sums are `[1,0,1,2,1,0,1,0,-1,0,1,...]`, which never hit -3 or 3.

```
-++-+--++-++-+--+--++-+--+--++-+--+...
  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^
  +  -  +  +  -  -  +  -  -  +  -
   1  0  1  2  1  0  1  0 -1  0  -1  ...

```

This sequence was found in 2014 via a computer search. See this paper, where the sequence is reproduced in Appendix B. The search proves that 1160 is the maximum length of a discrepancy-2 sequence, though there is more than one sequence of that length. The Erdős discrepancy problem, proven in 2015, says that any such sequence must have finite length for any maximum discrepancy `c` in place of 2.

**Time requirement**

Your code should finish within *5 seconds*. This is to limit brute-forcing.

**Output format**

You can use any two fixed distinct characters or values for `+` and `-` in any list-like or string-like format. The format should be one where the 1160 bit-values can be directly read off, not for example encoded as a number via its binary representation or a string via character values. For string output, a trailing newline is allowed.

**Leaderboard**

```
var QUESTION_ID=122304,OVERRIDE_USER=20260;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/122304/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```

```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
```

```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```

# Answer
# Jelly, 149 bytes

```
“×GOẈ*m¬¿3d{ẋạ⁻@Ɓ]ZĊỵINBƬḊṿẊ*N¹Ẹ÷ƲẋɼoṬḳ£®⁾ƙŒọ¡[P1&ạ€ẊʠNỌXḢṖėÐß⁹Ụṗ¬⁹E#ụḷḌṁżżR=ƊÑ³ıɲ-ṭỌṾɲẎĿỴ⁶€ḋtɦÐ\ỵƒ⁾ƒụṫṡĊKpƭẏkaṪ,Ẋȧ⁻ḅMɓ%YḷsƲƭl¤æĊbṬ9D6ẎƘẓ^Œ⁷Ɲḷḷ€ḟ1g’B

```

There is some pattern, for example only 81 of the 256 length 8 binary strings are present if one chops the sequence into eights, but I have not (at least yet) noticed any way to utilise any to reduce byte count from this straight forward base 250 compression converted to a binary list.

**Try it online!** (the footer formats the binary list to a string for easier direct comparison).
> 3 votes

# Answer
## JavaScript (ES6), ~~263~~ ~~253~~ 252 bytes

I tried to use as less payload data as possible. Sadly -- but not surprisingly -- this requires quite a lot of decompression code.

Breakdown:

* payload data: 75 bytes, encoded as a 100-character Base64 string
* code: ~~163~~ ~~153~~ 152 bytes

Below is a formatted version without the data. The raw code is in the demo snippet.

```
f = (a = Array(264).fill(n = p = 0)) =>
  n++ < 1160 ?
    '+/-'[
      p += !a.some((v, i) =>
        n % i | v * v - 4 ?
          0
        :
          r = v / 2,
        r = atob`...`.charCodeAt(p / 8) >> p % 8 & 1 || -1
      ),
      r + 1
    ] +
    f(a.map((v, i) => n % i ? v : v - r))
  :
    ''

```

### How?

We keep track of the running sums **a\[i\]** of every **i**-th terms. Each time one these sums hit the lower bound **-2**, we know that the next term must be a **+**. The same logic applies to the upper bound. This is helpful up to **i = 264** and doesn't save any extra byte beyond that.

This leaves us with 599 terms that cannot be guessed. We store them as **⌈599 / 8⌉ = 75** bytes, encoded in a 100-character Base64 string.

### Demo

```
f=(a=Array(264).fill(n=p=0))=>n++<1160?'+/-'[p+=!a.some((v,i)=>n%i|v*v-4?0:r=v/2,r=atob`aaLpW0oUDbs8lXXhj5IqpM3ctZD1Q6qtrJKqXmbBRkoZh3o1zCL1WhUo2Yu9KkU2q0CGI33SUzvb5wW+KgnZrZfUY/UhMtnBdEk8`.charCodeAt(p/8)>>p%8&1||-1),r+1]+f(a.map((v,i)=>n%i?v:v-r)):''

o.innerHTML = f()
```

```
<pre id=o style="white-space:pre-wrap;word-wrap:break-word">
```
> 3 votes

# Answer
# Python 2, ~~269~~ ~~259~~ ~~256~~ ~~247~~ ~~245~~ 243 bytes

```
r=[1]
c=int('bmqnh8j8rdo4mirjos6uxbfthu8t39pjy6up43axryzwbwcu5d528nsakitjwqbo6dnnozy0oybhk6jduaoc53lqkzdb04opj5t50a24w9he5y7qbgd2',36)
while c:t=sum(sum(r[::-k])/3for k in range(1,264)if len(r)%k<1);r[-1:]=cmp(0,t)or c%2*2-1,1;c>>=t==0
print r

```

Try it online!
> 3 votes

# Answer
# Jelly, ~~110~~ ~~109~~ 107 bytes

```
;1mS€:3o/Nȯ®Ṫṭḷ
“ĖṄẋ{Xṛ-İIṗ®6⁼Ḟ2a⁻!Ċẉȥ+¡Ƒ¥mvrẓsṘ×⁴ç&$nỴỤ)M7?ẊẎḅ=ṠƈTṙḌȥụẋXḌ⁵Ḣ⁺ḲL÷æTƥĿv€%ḟ¢®!Ė’BḤ’©ṛ⁽¡ɠÆD€Nç/

```

This takes too long on TIO, but it finishes in under 3 seconds on my desktop computer.

Try it online!
> 3 votes

# Answer
# Jelly, ~~135~~ ~~133~~ ~~130~~ ~~129~~ ~~105~~ 104 bytes

```
42“I=İėZP*ðEḄẈṆ'mBƝėŻƝ6®Ṇɼḥ[bȦėṡV£(6ṘɱX)Ṅẹ6~K7°ȤÄỴ¥ƝÇ5prḳġŻ£ƭṗṄFṾḃ{©@ɼ’ḃÄċL
L+Ø.ÆDm@NÇ¡§§No¥/Ṡo-ṭ
Ç⁽¡ɠ¡Ḋ

```

Based on the previous elements of the sequence, the algorithm makes an educated guess what the next element could be. This works for all but 99 elements, whose indices are hardcoded so the corresponding elements can be swapped.

Try it online!
> 3 votes

# Answer
# MATL, 224 bytes

```
862:o'$Te]BQHoHxkw!-CEjv(j=zGp.8_C{\?wkH{t&%W.:ja#7=+>"/,=0wDJ+"2BREtgh9_2I%1>+99T3kPrknzlJ}&8kUR(S!pX]C]05u{"6MHA7"gg(M6\5Vp.k.18Y(c~m&wroTrN)sf" |>\,Lg80C:nUez|l;<h~m(%]4xx6?`=qGtZ):d"*"@~1M.T}jJ)Bl7>Ns >9$8R1MlkG'F3:qZaY"

```

The ouput is of the form `1 0 0 1 0 ...`, where `1` corresponds to `'-'` and `0` corresponds to `'+'`.

Try it online!

### Explanation

The sequence has been run-length encoded. All 720 runs have lengths 1, 2, 3 or 4, with 3 or 4 being less common. So each 3 has been replaced by 2, 0, 1 (a run of 2, then a run of 0 of the other symbol, then a run of 1 again) and similarly each 4 has been replaced by 2, 0, 2. This gives a ternary array of length 862.

This array is converted to base-94 encoding, and is the long string shown in the code (`'$Te...kG'`). Base 94 encoding uses all 95 printable ASCII chars except for the single quote (which would have to be escaped).

The code converts that string from base 94 to base 3, and uses the result to run-length decode the symbols `[1 0 1 0 ... 0]` (array of length 862).
> 2 votes

# Answer
# Jelly, 95 bytes

```
“qạʂṅs⁽fØʋZ%BÞġı½.m0&u⁺TsƝȧAuỴż⁶3uÞ$+ȷ@4Ṣ’BḤC©µmLÆD$§SṠȯ®ṪNLḟ“⁶ .£µ+£gÐ9Ð¦.ñ×µ¥¤®‘ÄḤ¤ɗ}¡ṭø⁽¡ɠ¡Ḋ

```

A middle point between my two previous approaches.

The code attempts to guess 842 elements of the sequence and hardcodes the remaining 318 ones. 19 of the guesses are incorrect and have to be reverted via a list of hardcoded indices.

Try it online!

### How it works

```
“qạʂṅs⁽fØʋZ%BÞġı½.m0&u⁺TsƝȧAuỴż⁶3uÞ$+ȷ@4Ṣ’

```

This is a bijective base 250 literal that uses Jelly's code page for digits and encodes the integer \\$\scriptsize 380009100940380065412452185545474826295694594854898450166594167299196720639075810827320738450934\\$, which `©` stores in the register.

```
BḤC©

```

`B` converts the integer to binary,  unhalves/doubles the resulting bits, then `C` subtracts the results from \\$1\\$. The result is a list of 318 copies of \\$\pm1\\$.

```
µmLÆD$§SṠȯ®ṪNLḟ“⁶ .£µ+£gÐ9Ð¦.ñ×µ¥¤®‘ÄḤ¤ɗ}¡ṭ

```

This monadic chain takes a prefix of the desired output (with a prepended \\$0\\$) and appends the next element of the output. The chain works as follows:

```
mLÆD$§SṠȯ®ṪNLḟ“⁶ .£µ+£gÐ9Ð¦.ñ×µ¥¤®‘ÄḤ¤ɗ}¡ṭ  Monadic chain. Arument: A (array)

 LÆÐ$                                       Compute all divisors of the length of A.
m                                           For each divisor d, generate the subarray
                                            of each d-th element.
     §                                      Take the sum of each subarray.
      S                                     Take the sum of the sums.
       Ṡ                                    Take the sign of the sum.
        ȯ®                                  If the result is 0, replace it with the
                                            array in the register.
          Ṫ                                 Tail; pop and yield the last element,
                                            modifying the register for a zero sum.
                                            This is a no-op for a non-zero sum.
              “⁶ .£µ+£gÐ9Ð¦.ñ×µ¥¤®‘ÄḤ¤      Yield all indices of incorrect guesses.
           NLḟ                        ɗ¡    If the length of A doesn't appear among
                                            the indices, negate the result.
                                        ṭ   Append the result to A.

```

```
ø⁽¡ɠ¡Ḋ

```

This niladic chain resets the return value to \\$0\\$, calls the monadic link from above 1160 times (`⁽¡ɠ` encodes the integer \\$1160\\$), then removes the first element (\\$0\\$) with .
> 2 votes

# Answer
# Charcoal, 150 bytes

```
”a∧∨~℅¹÷Ｏμ6fＣC⁼∕⁵^;Ÿ‘«·T:∕Ｄ_=v§AＨŒ,—<Ｐr¢E!◨±Ｌ^|.τ"ＮO“šþŽ∧<n`bÞＥ÷β$+Ｚ⟦5⁶⁻.λ‹ζd⧴X>w,⊞?‹⟧⌈⪪-h÷³N“Ｋ⁺L¿>ρ@Ｐ⟲↘3νηKx÷?>™Ž¿•:8Ｖ¦£œεＧ↧x℅7¶	NＲü"m”⟦)&¶bＥ“Ｙv”

```

Try it online!

Makes use of Charcoal's builtin string compression. Uses `.` for `-` and `!` for `+`.
> 1 votes

# Answer
# Python 3, ~~236~~ 232 bytes

Thanks to Mego for saving 4 bytes

```
#coding:437
print(bin(int.from_bytes('ûKe▓╔L║[\rûO%2╣d▓▌,û╔eè±lr[\x1a┤KeÆ┘Ä.Y¡\x16K-ûiZû[*Tδ\r╩Yl░▌\rÆ╦eÆ╦d╝YÄû¥%│\x0bl69,╓╔m\x12┘ñ╢╔cûN9<il▓S3─╧#8⌡$»\x19d╢╦%Ü╒\x0eª╒(╓╤úû╔£ª]-2╦EÜìd╢¥)û/4ªYL║X⌡2╔-░τRì5⌐─'.encode('437'),'big'))[2:])

```

Try it online!

Uses the CP-437 encoding. Thanks to Dennis for pointing out an error.
> 1 votes

# Answer
## CJam, 153 bytes

```
"Ke²ÉLº[
O%2¹d²Ý,Éeñlr[´KeÙ.YK-iZ[*Të
ÊYl°Ý
ËeËd¼Y%³l69,ÖÉmÙ¤¶ÉcN9<il²S3ÄÏ#8õ$¯d¶Ë%Õ¦Õ(ÖÑ£É¦]-2ËEd¶)/4¦YLºXõ2É-°çR5©Ä"256b2b

```

Uses `1` for `-`, and `0` for `+`.

Contains unprintables. Try it online!

This is pretty simple. Converts a long sequence from base 256 to base 2.
> 1 votes

# Answer
# C (gcc), ~~284 275~~ 273 bytes

```
f(i){for(i=1160;i--;)putchar(L"嘻狊᢭퉏촶꜊덅妦탋황䥢犛멥촴ꋒ捙椶⹜휩太⫱䤴윊ボ찻䶬隓웃榱㚜孉㚒팩짆楢꙱魃洴㒚伢ꚓꬔꓕꕩ榖듒勩톦♱驭䮴ꓥ鎍甎㚚퍩䴢䚛榰ꓲ덅䴶뒚i"[i/16]>>i%16&1|48);}

```

Try it online!

Just an array lookup.

Edit: -2 and bugfix thanks to @S.S.Anne
> 1 votes

# Answer
# Python 2, ~~364~~ 250 bytes

Thanks to Jonathan Allan for saving 114 bytes.

```
print bin(int('28x0lphxjx8ze4uuhtdzo0oebr25amtmuxm62cbit0ibdwjm2sf50clh2ejq0a73ndseo5tove8uqca6nf66bo4abbkg867woh2b435at0o3pddvqmsqp29b6as5bd4eo28xgwkkj607gp66icba1q4n9fc13dltp45j340mpzbc56wsrbb3oejnczsbzfgh82xdi8aku8m4wlmwuxkgy4yaew7pu4p1g',36))[2:]

```

Try it online!
> 0 votes

# Answer
## C#, 385 bytes

---

### Data

* **Input** none
* **Output** `String` The pretended result.

---

### Golfed

```
()=>{var s="i´\u009aM6³E¤òi°ÚÍF\u009bM\"Ói6\u009au\u000e\u0093\u008d¤åK´\u009am&qÑ¦Ré´Òi\u0096¥i¤Õ«\u0014ò5¦\u0093O\"òm4\u009am4\u009bC¦qibÚLô\u0093ÉÆÓ)6\u0092í&[I6\u009ci±ÆÃ\u0096\u0093M¬Ì;0ÜÇ\nÛPæ\u009bI4Úe*ñY*×).\\i6cY¢ÒÍ4ºer\u009bIbÖiÐËY¦³E§\nÍ6ÒO\u0018rÊV;";var o="";foreach(var c in s)foreach(var b in Convert.ToString(c,2).PadLeft(8,'0'))o+=(char)(43+(49-(int)b)*2);return o;};

```

---

### Ungolfed

```
() => {
    var s = "i´\u009aM6³E¤òi°ÚÍF\u009bM\"Ói6\u009au\u000e\u0093\u008d¤åK´\u009am&qÑ¦Ré´Òi\u0096¥i¤Õ«\u0014ò5¦\u0093O\"òm4\u009am4\u009bC¦qibÚLô\u0093ÉÆÓ)6\u0092í&[I6\u009ci±ÆÃ\u0096\u0093M¬Ì;0ÜÇ\nÛPæ\u009bI4Úe*ñY*×).\\i6cY¢ÒÍ4ºer\u009bIbÖiÐËY¦³E§\nÍ6ÒO\u0018rÊV;";
    var o = "";

    foreach( var c in s )
        foreach( var b in Convert.ToString( c, 2 ).PadLeft( 8, '0' ) )
            o += (char) ( 43 + ( 49 - (int) b ) * 2 );

    return o;
};

```

---

### Full code

```
using System;

namespace Namespace {
   class Program {
      static void Main( String[] args ) {
        Func<String> f = () => {
            var s = "i´\u009aM6³E¤òi°ÚÍF\u009bM\"Ói6\u009au\u000e\u0093\u008d¤åK´\u009am&qÑ¦Ré´Òi\u0096¥i¤Õ«\u0014ò5¦\u0093O\"òm4\u009am4\u009bC¦qibÚLô\u0093ÉÆÓ)6\u0092í&[I6\u009ci±ÆÃ\u0096\u0093M¬Ì;0ÜÇ\nÛPæ\u009bI4Úe*ñY*×).\\i6cY¢ÒÍ4ºer\u009bIbÖiÐËY¦³E§\nÍ6ÒO\u0018rÊV;";
            var o = "";

            foreach( var c in s )
                foreach( var b in Convert.ToString( c, 2 ).PadLeft( 8, '0' ) )
                    o += (char) ( 43 + ( 49 - (int) b ) * 2 );

            return o;
        };

        Console.WriteLine( $" Input: <none>\nOutput: {f()}\n" );

        Console.ReadLine();
      }
   }
}

```

---

### Releases

* **v1.0** \- `385 bytes` \- Initial solution.

---

### Notes

* None
> 0 votes

# Answer
# 05AB1E, 149 bytes

```
•19GÈRÕŸ
pт6½÷Ü;вVåΔĀÈ₄¤Ü³Aʒм5[¦PŠÅøœ^‚₆è³¦ìóV“LÛ'ßq;αÎΩªî»(2∍©däf×5 V5Ú”gÜ/\^(Ã∊Ƶ!3šÍ3°(§AÎ„ǝ₂È₅ç£6óàÖCsa*zƒÚ¥Î\ªD¹,n∊ðˆ.ëçPαǝƒ.É∍¯ü₂³Λ‘g∍Θþ“‚œΔи‹•b

```

Super boring. Just a compressed number. Uses `1` for `-` and `0` for `+`.

Try it online!
> 0 votes

# Answer
# PHP, 276 Bytes

```
<?=gzinflate(base64_decode("dVJRFgMgCDoQj/tfb2+boqj9VJohQgQI8rv+D1yHuIIytGLsYh6vwAlYIMS62mVCiWMm56vfHiGOuTwjiMHQEC7OVlkNzzK0LZFTN8l0gavGdX4wOfJDsZpXZS0csig0l13wEsoRlvKzhYHMv+F9MnxaCXHWrC2Kx4UqQ8o4qmgNcsjbzA5lZG7LE6LdNMlt2sRKFpNhk/sL59N6DSMKp4No7vP2QcP0c2XWb6nPblqYfJBfHw=="));

```

Try it online!
> 0 votes

# Answer
# Ruby, 245 bytes

```
puts"%b"%"28x0lphxjx8ze4uuhtdzo0oebr25amtmuxm62cbit0ibdwjm2sf50clh2ejq0a73ndseo5tove8uqca6nf66bo4abbkg867woh2b435at0o3pddvqmsqp29b6as5bd4eo28xgwkkj607gp66icba1q4n9fc13dltp45j340mpzbc56wsrbb3oejnczsbzfgh82xdi8aku8m4wlmwuxkgy4yaew7pu4p1g".to_i(36)

```

Output 0 for + and 1 for -.

Try it online!
> 0 votes

# Answer
## Perl, 164 bytes

```
print unpack'b*','-Y²lÍ¢%O
[³bÙ²DËlY®pÉ±%§Ò-Y¶deJ-Ki¥%«Õ(O¬eÉòDO¶,Y¶,ÙÂeF[2/ÉcËlI·dÚl9cÃiÉ²53Ü;ãPÛ
gÙ,[¦TTët:lÆEK³,]¦NÙFkÓeÍ¢åP³lKòµNSjÜ'

```

Hexdump:

```
00000000: 7072 696e 7420 756e 7061 636b 2762 2a27  print unpack'b*'
00000010: 2c27 962d 59b2 6ccd a225 4f96 0d5b b362  ,'.-Y.l..%O..[.b
00000020: d9b2 44cb 966c 59ae 70c9 b125 a7d2 2d59  ..D..lY.p..%..-Y
00000030: b664 8e8b 654a 972d 4b96 69a5 9625 abd5  .d..eJ.-K.i..%..
00000040: 284f ac65 c9f2 444f b62c 59b6 2cd9 c265  (O.e..DO.,Y.,..e
00000050: 8e96 465b 322f c993 63cb 946c 49b7 64da  ..F[2/..c..lI.d.
00000060: 926c 3996 8d63 c369 c9b2 3533 dc0c 3be3  .l9..c.i..53..;.
00000070: 50db 0a67 d992 2c5b a654 8f9a 54eb 9474  P..g..,[.T..T..t
00000080: 3a96 6cc6 9a45 4bb3 2c5d a64e d992 466b  :.l..EK.,].N..Fk
00000090: 960b d39a 65cd a2e5 50b3 6c4b f218 b54e  ....e...P.lK...N
000000a0: 536a dc27                                Sj.'

```

The obvious, boring solution: just put all the bits in a binary string, 8 bits per byte. Uses 0 for - and 1 for +. I’ll try to golf this some more.
> 0 votes

# Answer
# Retina, 333 bytes

```

ADG-RMCGHQFDLEM+-FAG-CADGPAKBBLHBCH-EGHJBORGEH-HB-FJOBPRCA+JAG-A+A+NJHQLIB-R+Q-OQPRAGP-HBEH-CGNCDGEH+BCCHQH-PDJCEGOGECDGCPK-FNH-EDLHCRIEELHDELEKE-HLJDDA+LHFGCFADJJBK+-JDCJBI+JCOOLGEDELMCGNAGKBEJKJEGCNCIF+BLECMMCAKLJDFDGCH+-E-JIQDJJNHD¶
R
GF
Q
+C
P
EA
O
CK
N
D-
M
I-A
L
--
K
D+
J
CB
I
A++
H
E+
G
AB
F
-AD
E
C+
D
B+
C
-B
B
-+
A
-++-+-

```

Try it online!
> 0 votes

# Answer
# C (gcc), 416 bytes

```
f(i){for(i=1160;i--;)putchar(L"\x72ca563b\xd24f18ad\xa70acd36\x59a6b345\xd669d0cb\x729b4962\xcd34ba65\x6359a2d2\x2e5c6936\x592ad729\xda652af1\xe69b4934\xc70adb50\xcc3b30dc\x96934dac\x69b1c6c3\x5b49369c\x3692ed26\xc9c6d329\xda4cf493\xa6716962\x6d349b43\xf26d349a\xa6934f22\xab14f235\xa569a4d5\xb4d26996\xd1a652e9\x9a6d2671\xa4e54bb4\x750e938d\xd369369a\x469b4d22\x69b0dacd\xb345a4f2\xb49a4d36i"[i/32]>>i%32&1?43:45);}

```

Try it online!
> 0 votes

# Answer
# Deadfish~, 2609 bytes

```
{iiii}iiiiicddcciicddciiccddcciicddcciicddciiccddciiccddcciicddciiccddciiccddcciicddciiccddcciicddcciicddciicddcciiccddcciicddciicccddciicddcciicddciiccddciiccddcccciiccddciiccddcciicddciiccddcciicddcciiccccddcciicddcciicddciicddcciiccddcciicddciicddciicccddcciicddciiccddcciicddcciicddciiccddcciicddciiccddciicccddciicddcciicddciiccddcciicddcciicddciiccddciiccddcciicddcciicddciiccddcciicddciiccddccciicddciicddciiccccddccciicddciiccddciiccddccciicccddcciicddcciicddciiccddciiccddccciiccddciicddciicddciiccddciicddccciicddcciicddciiccddciiccddcciicddciiccddcciicddcciicddciiccddciiccddcciiccddccciicccddccciicddciicccddcciicddciiccddcciiccddciicddciiccddciicddccciicddciiccddcciicddcciicddciiccddcciicddciiccddciiccddcciicddciiccddcciiccddciicddcciicddciicddciiccddciicddciicddcciicddciiccddcciicddciiccddciiccddcciicddciicddciicddcciicddciicddciicddcciicccddciicddciiccddcccciiccddciicccddcciicddciicddcciicddciiccddcciicddciiccddciiccddcciicddciiccddcccciiccddciicccddciicddcccciiccddciiccddcciicddcciicddciiccddcciicddciiccddciiccddcciicddciiccddcciicddcciicddciiccddcciicddciiccddciiccddcciicddcciicddciiccccddccciicddciiccddcciiccddccciicccddciicddcciicddciiccddciicddcciicccddciicddcciicddcciicddciiccddciiccddcciiccddcccciicddciiccddciiccddciiccddcccciiccddciiccddccciicccddcciicddcciicddciiccddcciiccddciicddciiccddciiccddcciicddcciicddciiccddciiccddciicddccciicddcciicddciiccddciiccddcciiccddciicddcciicddcciicddciiccddciiccddciiccddcciicddcciicddciiccddccciicccddcciicddciiccddcciicddcciicccddccciicccddcciicddcciiccccddccciiccddciicddcciicddciiccddciiccddcciicddciiccddcciicddcciicddciicddcciiccddcciiccddcciiccccddccciicddcciiccddcciiccccddcciicddccciiccddcciicccddccciiccccddciicddciicddcciicddcciicddcciicddciicddciiccccddccciiccddcciicddciiccddcciicddcciicddciiccddciiccddciiccddcciicddciiccddcciicddcciicddciiccddcciiccddciicddciiccddciicddciicddciicddcccciicccddciicddciicddcciiccddciiccddciicddciicddciicddcciicddciicddccciiccddciicddciiccddciiccddciicddccciiccddciicddccciicccddcciicddciiccddciiccddcciicddcciiccddcciicccddcciicddciicddcciiccddcciicddciicccddciicddcciicddciiccddciicddcciiccddcciicddciiccddcciicddciiccddciicddccciicddciiccddcciiccddciicddciicddccciiccddciicddciiccddcciicddcciicddciiccddciiccddciicddcciicccddciicddcciicddciicddcciiccddcciicddciiccddccciicddciiccccddcciiccddciicddcciicddciicddcciiccddcciicddciiccddcciicddciicddcciiccddcciicddciicccddciicddcciicddciiccddccciiccccddciicddciicddcciiccddcciicddciiccddcciicddcciicddcciicddciiccddciiccddciiccddcccciicccddcciicccddciicddciicddcciicddciicddccciiccddciicddcciiccddciicddciiccddciicddciicddcciicccddccciicddcc

```

Try it online!

Do I care that there's a sensible way to do this? No.
> 0 votes

---
Tags: code-golf, kolmogorov-complexity, sequence, combinatorics
---


title: "99 bottles of fizz"

text:
# Question
Title: "99 bottles of fizz"
# Challenge

Write a program that outputs the lyrics to 99 Bottles of Beer, ***but*** instead of "beer", output "fizz" if the number of bottles on the wall is a multiple of 3, "buzz" if it is a multiple of 5, and "fizzbuzz" if it is a multiple of 3 and a multiple of 5. If the number of bottles on the wall is not a multiple of 3 or 5, just output "beer" as usual.

## Lyrics

```
99 bottles of fizz on the wall, 99 bottles of fizz.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.

97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of fizz on the wall.

96 bottles of fizz on the wall, 96 bottles of fizz.
Take one down and pass it around, 95 bottles of buzz on the wall.

95 bottles of buzz on the wall, 95 bottles of buzz.
Take one down and pass it around, 94 bottles of beer on the wall.

....

3 bottles of fizz on the wall, 3 bottles of fizz.
Take one down and pass it around, 2 bottles of beer on the wall.

2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of fizz on the wall.

```

This is , so the shortest submission in each language wins.

# Answer
> 14 votes
# Python 2, ~~263~~ ~~253~~ 245 bytes

```
i=99
x=''
while i:x+=', %s on the wall.\n\n%s on the wall, %s.\n'%(('%d bottle%s of %s'%(i,'s'*(i>1),(i%3<1)*'fizz'+(i%5<1)*'buzz'or'beer'),)*3)+'GToa kteo  otnhee  dsotwonr ea nadn dp absusy  isto maer omuonrde'[i>1::2];i-=1
print x[35:]+x[:33]

```

Try it online!

# Answer
> 7 votes
# C (GCC), ~~276~~ 274 bytes

*Thanks to Neil for saving two bytes!*

```
#define w" on the wall"
#define c(i)printf("%d bottle%s of %s",i,"s"+!~-i,i%3?i%5?"beer":"buzz":i%5?"fizz":"fizzbuzz"),printf(
i;f(){for(i=99;i;c((i?:99))w".\n\n"))c(i)w", "),c(i)".\n"),printf(--i?"Take one down and pass it around, ":"Go to the store and buy some more, ");}

```

Who doesn't love unmatched parentheses in macro expansions ?

### Ungolfed:

```
#define c(i)                               \
    printf(                                \
        "%d bottle%s of %s",               \
        i,                   /* Number  */ \
        i-1 ? "s" : "",      /* Plural  */ \
        i % 3                /* FizzBuzz*/ \
            ? i % 5                        \
                ? "beer"                   \
                : "buzz"                   \
            : i % 5                        \
                ? "fizz"                   \
                : "fizzbuzz"               \
    )

i;
f() {
    for(i = 99; i; ) {
        c(i); printf(" on the wall, ");
        c(i); printf(".\n");
        printf(
            --i
                ? "Take one down and pass it around, "
                : "Go to the store and buy some more, "
        );

        // This has been stuffed into the for increment
        c((i?:99)); printf(" on the wall.\n\n");
    }
}

```

See it live on Coliru!

# Alternate version (276 bytes)

```
#define c(i)printf("%d bottle%s of %s",i,i-1?"s":"",i%3?i%5?"beer":"buzz":i%5?"fizz":"fizzbuzz"),printf(
i,*w=" on the wall";f(){for(i=99;i;c((i?:99))"%s.\n\n",w))c(i)"%s, ",w),c(i)".\n"),printf(--i?"Take one down and pass it around, ":"Go to the store and buy some more, ");}

```

# Answer
> 6 votes
# Röda, 273 bytes

```
f{a=`bottle`f=` on the wall`g=`99 ${a}s of fizz`;[`$g$f, $g.
`];seq 98,1|{|b|d=`s`d=``if[b=1];c=``c=`fizz`if[b%3=0];c.=`buzz`if[b%5=0];c=`beer`if[c=``];e=`$b $a$d of $c`;[`Take one down and pass it around, $e$f.

$e$f, $e.
`]}_;[`Go to the store and buy some more, $g$f.`]}

```

Try it online!

Will golf further in the morning.

# Answer
> 6 votes
# PHP, 242 Bytes

```
function f($k){return"$k bottle".(s[$k<2])." of ".([fizz][$k%3].[buzz][$k%5]?:beer);}$w=" on the wall";for($b=f($c=99);$c;)echo"$b$w, $b.
",--$c?"Take one down and pass it around":"Go to the store and buy some more",", ",$b=f($c?:99),"$w.

";

```

Try it online!

# PHP, 244 Bytes

```
for($e=s,$b=fizz,$c=99;$c;)echo strtr("301245, 30124.
6, 708295.

",[" bottle",$e," of ",$c,$b," on the wall",--$c?"Take one down and pass it around":"Go to the store and buy some more",$k=$c?:99,$e=s[2>$k],$b=[fizz][$k%3].[buzz][$k%5]?:beer]);

```

Try it online!

use function strtr

# PHP, 245 Bytes

```
$f=function($k)use(&$b){$b="$k bottle".(s[$k<2])." of ".([fizz][$k%3].[buzz][$k%5]?:beer);};for($w=" on the wall",$f($c=99);$c;)echo"$b$w, $b.
",--$c?"Take one down and pass it around":"Go to the store and buy some more",", {$f($c?:99)}$b$w.

";

```

Try it online!

use an Anonymous function in the string to get a sustring depending of the integer

Expanded

```
$f=function($k)use(&$b){$b="$k bottle".(s[$k<2])." of ".([fizz][$k%3].[buzz][$k%5]?:beer);};
for($w=" on the wall",$f($c=99);$c;)
echo"$b$w, $b.
",--$c?"Take one down and pass it around":"Go to the store and buy some more"
,", {$f($c?:99)}$b$w.

";

```

# Answer
> 5 votes
# 05AB1E, ~~151~~ ~~146~~ 143 bytes

```
99LRv'¬ž“fizzÒÖ“#y35SÖÏJ‚˜1(è©y“ƒ¶€µ„‹€ƒîå€•…¡, ÿÏê€‚ ÿ€‰€€íÒ.“ªõ®y“ÿÏê€‚ ÿ€‰€€íÒ, “D#4£ðýs…ÿÿ.}‚‚˜'Ïê'±¥:`)¦¦¬#7£ðý¨“‚œ€„€€ƒï€ƒ‚¥€ä€£, ÿ.“ª)˜»

```

Try it online!

# Answer
> 4 votes
# SOGL, ~~136~~ ~~135~~ ~~134~~ ~~133~~ 131 bytes

```
Ƨ, o▓k
"πFT+╔¡‘oW
³³q"'bμ⁸‘oH? so}5\;3\«+"ΞQv↑χāσκN⌡κYT¡‘_,S─‘oθwoX▓
MH∫}¹±{▓WkƧ.¶oH¡"sΗ─χpēGķ¶¾3Ζ^9f.⅟▒E┌Fρ_╬a→‘KΘw⁽oXH‽M}HkW">⁸‘p

```

First of all, the 3rd function:

```
                                    ▓  name this "▓" (example input: 15)                          [15]
³³                                     Create 4 extra copies of the top thing (number of things)  [15, 15, 15, 15, 15]
  q                                    output without popping one of them                         [15, 15, 15, 15, 15]
   "...‘o                              output " bottle"                                           [15, 15, 15, 15, 15]
         H?   }                        if pop-1 [isn't 0]                                         [15, 15, 15, 15]
            so                           output "s"                                               [15, 15, 15, 15]
               5\                      push if POP divides by 5                                   [15, 15, 15, 1]
                 ;                     swap [if divides & another number copy]                    [15, 15, 1, 15]
                  3\«                  push if POP divides by 3, multiplied by 2                  [15, 15, 1, 2]
                     +                 add those together                                         [15, 15, 3]
                      "...‘            push "buzz fizz fizzbuzz beer"                             [15, 15, 3, "buzz fizz fizzbuzz beer"]
                           ...‘o       output " of " (done over here to save a byte for a quote)  [15, 15, 3, "buzz fizz fizzbuzz beer"]
                                θ      split ["buzz fizz fizzbuzz beer"] on spaces                [15, 15, 3, ["buzz","fizz","fizzbuzz","beer"]]
                                 w     get the index (1-indexed, wrapping)                        [15, 15, ["buzz","fizz","fizzbuzz","beer"], "fizzbuzz"]
                                  o    output that string                                         [15, 15, ["buzz","fizz","fizzbuzz","beer"]]
                                   X   pop the array off of the stack                             [15, 15]

```

The first function:

```
Ƨ, o▓k
     k  name this "function" "k"
Ƨ, o    output ", "
    ▓   execute the "bottleify" function

```

The second function:

```
"πFT+╔¡‘oW
         W  call this "W"
"πFT+╔¡‘    push " on the wall"
        o   output it

```

And the main part:

```
MH∫}                                     repeat 99 times, each time pushing index
    ¹                                    wrap in an array
     ±                                   reverse it
      {                                  iterate over it
       ▓                                 execute that function
        W                                execute that function
         k                               execute that function
          Ƨ.¶o                           output ".\n"
              H¡                         push if POP-1 isn't 0 (aka 1 if pop <> 1, 0 if pop == 1)
                "...‘                    push "Stake one down and pass it aroundSgo to the store and buy some more"
                     K                   push the first letter of that string
                      Θ                  split ["take one down and pass it aroundSgo to the store and buy some more" with "S"]
                       w                 gets the xth (1-indexed, wrapping) item of that array
                        ⁽o               uppercase the 1st letter and output
                          X              pop the array off
                           H‽            if pop-1 [isn't 0]
                             M           push 100
                              }          ENDIF
                               H         decrease POP
                                k        execute that function
                                 W       execute that function
                                  ">⁸‘p  output ".\n\n"

```

Lost a couple bytes because of a bug that `O` puts a newline before and after it (And somehow this goes back to V0.9 (this is V0.11 code))

# Answer
> 4 votes
# JavaScript (ES6), ~~316~~ 309 bytes

This is a full program rather than a function. Nothing very creative, it's just the naive approach (hence the bytecount!). I am using `console.log()` instead of `alert()` because many browsers have limit on the number of chars that can be displayed using `alert()`. Note that all the whitespaces and newlines are necessary.

```
a="";for(i=99;i>0;i--){b=j=>"bottle"+(j>1?"s":"");d=a=>(a%3?"":"fizz")+(a%5?"":"buzz")||"beer");w=" on the wall";o=" of ";a+=`${i+" "+b(i)+o+d(i)+w+", "+i+" "+b(i)+o+d(i)}.
${i>1?"Take one down and pass it around, ":"Go to the store and buy some more, "}${(y=i-1?i-1:99)+" "+b(y)+o+d(y)+w}.

`;}console.log(a)

```

Ungolfed :

```
let accumulator = "";
for(let i = 99; i>0; i--){
    let bottleString = j => "bottle"+(j>1?"s":""),
    drink = a =>(a%3?"":"fizz")+(a%5?"":"buzz")||"beer",
    wallString = " on the wall",
    of=" of ";
    accumulator += `${i+" "+bottleString(i)+of+drink(i)+wallString+", "+i+" "+bottleString(i)+of+drink(i)}.
${i>1?"Take one down and pass it around, ":"Go to the store and buy some more, "}${(y=i-1?i-1:99)+" "+bottleString(y)+of+drink(y)+wallString}.

`;
}

console.log(accumulator);

```

Here's the Snippet :

```
a="";for(i=99;i>0;i--){b=j=>"bottle"+(j>1?"s":"");d=a=>(a%3?"":"fizz")+(a%5?"":"buzz")||"beer";w=" on the wall";o=" of ";a+=`${i+" "+b(i)+o+d(i)+w+", "+i+" "+b(i)+o+d(i)}.
${i>1?"Take one down and pass it around, ":"Go to the store and buy some more, "}${(y=i-1?i-1:99)+" "+b(y)+o+d(y)+w}.

`;}console.log(a)
```

BTW, with this answer, I have earned the bronze badge in ! Never thought I will accomplish this ever (not that it's a big achievement, though.)!

# Answer
> 4 votes
# Java, ~~344~~ ~~340~~ 339 bytes

(-4 bytes after golfing fizzbuzz; -1 byte removing stray whitespace)

```
interface X{static void main(String[]a){for(int i=99;i>0;System.out.printf("%s on the wall, %s.%n%s, %s on the wall.%n%n",b(i),b(i--),i<1?"Go to the store and buy some more":"Take one down and pass it around",b(i<1?99:i)));}static String b(int i){return i+" bottle"+(i>1?"s":"")+" of "+(i%3<1?"fizz":"")+(i%5<1?"buzz":i%3<1?"":"beer");}}

```

Slightly ungolfed (using 1-space indentation to eliminate horizontal scrolling):

```
interface X {
 static void main(String[]a){
  for(int i=99;i>0;System.out.printf("%s on the wall, %s.%n%s, %s on the wall.%n%n",
   b(i),b(i--),
   i<1?"Go to the store and buy some more":"Take one down and pass it around",
   b(i<1?99:i)));
 }
 static String b(int i){
  return i+" bottle"+(i>1?"s":"")+" of "+(i%3<1?"fizz":"")+(i%5<1?"buzz":i%3<1?"":"beer");
 }
}

```

# Answer
> 3 votes
# Retina, 230 bytes

```

99$*_
_\B
Take one down and pass it around, $.'#.¶¶$.'#, $.'.¶
^
99#, 99.¶
_
Go to the store and buy some more, 99#.
#
 on the wall
1\b|(\d+)
$& bottle$#1$*s of $&$*_
\b(_{15})+\b
fizzbuzz
\b(_{5})+\b
buzz
\b(___)+\b
fizz
_+
beer

```

Try it online! Explanation:

```

99$*_

```

Inserts 99 `_`s.

```
_\B
Take one down and pass it around, $.'#.¶¶$.'#, $.'.¶

```

Changes all but the last `_` to the string `Take one down and pass it around, $.'#.¶¶$.'#, $.'.¶`, where  is a newline and `$.'` is the count of remaining underscores. This effectively counts back from 98 to 1.

```
^
99#, 99.¶

```

Adds the first line of the first verse in "compact" format.

```
_
Go to the store and buy some more, 99#.

```

Adds the second line of the last verse. Why I need jump through hoops to use the `_` I don't know, but `$` seems to match twice, so I can't use that. Go figure.

```
#
 on the wall

```

Substitutes a string which appears several times in the verse.

```
1\b|(\d+)
$& bottle$#1$*s of $&$*_

```

This matches the integers in the verses, and suffixes the appropriate bottle(s) of, and expands back to unary again, in preparation to choose the beverage. (I save 1 byte on on the `99`s this way.)

```
\b(_{15})+\b
fizzbuzz
\b(_{5})+\b
buzz
\b(___)+\b
fizz
_+
beer

```

Replace exact multiples with the appropriate beverage.

# Answer
> 2 votes
# sed, ~~468~~ ~~459~~ 456 bytes

```
s:^:99 bottles of fizz on the wall, 99 bottles of fizz.:
p
s:99:I8:g
s:fizz:XYYZ:g
x
s:^:Take one down and pass it around, I8 bottles of XYYZ on the wall.\n:
G
x
:
g
s:XXX:fizz:g
s:Y{5}:buzz:g
s:\bX*Y*Z:beer:g
s:[XYZ]::g
y:ABCDEFGHI:123456789:
s:\b0::g
/ 1 /bq
p
x
s:^::
tc
:c
s:(\S)0:\1@:g
Td
y:ABCDEFGHI:0ABCDEFGH:
:d
y:123456789@:0123456789:
s:(XXX)*(Y{5})*(Y*Z):XY\3:g
x
b
:q
s:es:e:g
aGo to the store and buy some more, 99 bottles of fizz on the wall.

```

Try it online!

Requires `-r` flag.

## Explanation

Hold space holds the pattern of two repeating lines, with numbers represented as `[A-I][0-9]` (separate digits for tens and ones) and the kind of beverage represented as `X*Y*Z`, where `X` keeps track of `-N mod 3`, and `Y` of `-N mod 5`.

On each subsequent iteration, the numbers get decremented and the `X`s and `Y`s get updated. Then hold space gets copied to the pattern space, turned into lines of the song, and printed.

# Answer
> 2 votes
# Javascript (ES6), 236 234 233 232 bytes

```
for(i=99;i;console.log(z()+`, ${z(_)}.
${--i?'Take one down and pass it around':'Go to the store and buy some more'}, ${z()}.

`))z=(o=' on the wall',j=i||99)=>j+` bottle${j>1?'s':_} of `+((j%3?_:'fizz')+(j%5?_='':'buzz')||'beer')+o

```

**Demo**

```
// replace console.log to avoid 50-log limit in snippets:
console.log=_=>document.write(`<pre>${_}</pre>`)

for(i=99;i;console.log(z()+`, ${z(_)}.
${--i?'Take one down and pass it around':'Go to the store and buy some more'}, ${z()}.

`))z=(o=' on the wall',j=i||99)=>j+` bottle${j>1?'s':_} of `+((j%3?_:'fizz')+(j%5?_='':'buzz')||'beer')+o
```

**Ungolfed**

```
i = 99  // start counter at 99

z = (   // define function z which takes arguments with defaults:
   o = ' on the wall', // o = defaults to ' on the wall'
   j = i || 99         // j = defaults to value of counter i - or 99 when i == 0
) =>
    j +                 // our current j counter
    ' bottle' +
    (j > 1 ? 's' : _) + // choose 's' when we have more than 1 bottle, or blank _
    (
        (j % 3 ? _ : 'fizz') +      // if j % 3 is 0, add 'fizz', otherwise blank _
        (j % 5 ? _ = '' : 'buzz')   // if j % 5 is 0, add 'buzz', otherwise blank _
                                    // _ gets defined here since it's the first place it's used
            ||                      // if no fizz or buzz, result is a falsey empty string
        'beer'                      // replace falsey value with 'beer'
    ) +
    o                               // append o

while (i) {         // while counter is non-zero
    console.log(    // output string:
        z() +       // call z without o argument
        ', ' +
        z(_) +      // call z with blank _ for o to block ' on the wall' here
        '.\n' +
        ( --i       // decrement i, if still non-zero:
            ? 'Take one down and pass it around'
                    // otherwise:
            : 'Go to the store and buy some more'
        ) +
        ', ' +
        z() +       // another call to z without o
        '.\n\n'
    )
}

```

# Answer
> 2 votes
# C, ~~349~~ ~~345~~ 344 bytes

```
#define b(x)x^1?" bottles":" bottle"
#define g i-1?"Take one down and pass it around":"Go to the store and buy some more"
*w=" on the wall";*s(x){return x?x%15?x%5?x%3?"beer":"fizz":"buzz":"fizzbuzz":"fizz";}i=100;main(){while(--i){printf("%d%s of %s%s, %d%s of %s.\n%s, %d%s of %s%s.\n",i,b(i),s(i),w,i,b(i),s(i),g,i-1?i-1:99,b(i-1),s(i-1),w);}}

```

Well, there you go. That took an hour.

Try it online!

# Answer
> 1 votes
# shortC, ~~314~~ 312 bytes

```
Db(x)x^1?" bottles":" bottle"
Dg i-1?"Take one down and pass it around":"Go to the store and buy some more"
*w=" on the wall";*s(x){Tx?x%15?x%5?x%3?"beer":"fizz":"buzz":"fizzbuzz":"fizz";}i=100;AW--i){R"%d%s of %s%s, %d%s of %s.\n%s, %d%s of %s%s.\n",i,b(i),s(i),w,i,b(i),s(i),g,i-1?i-1:99,b(i-1),s(i-1),w

```

Sorry there's no explanation, but I completely forgot how this works.

# Answer
> 1 votes
# Ruby, 261 bytes

```
99.downto(1){|i|w=' on the wall'
f=->x{a='';x%3<1&&a+='fizz';x%5<1&&a+='buzz';a<?a&&a='beer';"%d bottle%s of %s"%[x,x<2?'':?s,a]}
puts [f[i]+w,f[i]+?.+$/+(i<2?'Take one down and pass it around':'Go to the store and buy some more'),f[i<2?99:i-1]+w+?.+$/*2]*', '}

```

Try it online!

# Answer
> 1 votes
# tcl, 298

```
proc B i {set x " bottle[expr $i>1?"s":""] of [expr $i%3?$i%5?"beer":"":"fizz"][expr $i%5?"":"buzz"]"}
set i 99
time {puts "$i[B $i][set w " on the wall"], $i[B $i].
Take one down and pass it around, [incr i -1][B $i]$w."} 98
puts "1[B $i]$w, 1[B $i].
Go to the store and buy some more, 99[B 9]$w."

```

# demo

# Answer
> 1 votes
# Charcoal, 307 297 bytes

```
Ａ”｜‽2?{:×G↗”¦αＡ“6«eMηOU¶¿”¦ζＡ“9“e▷·gqε-g}”¦βＡ“9Ｂ{⦃⁺Ｂφ=；λO”¦ωＡfizz¦φＡbuzz¦γＡbeer¦ηＡ”↶C▶▶d℅d¬r·ＵS\λＴθＮevＴ◧→GM⁸ωβ”¦τＡ“M↧k↓⁺*f÷,ψＺ¢▶\¿｜Ｐ“№κ×υpξＸoＷ”¦σＡ.¶πＦ⮌…¹¦¹⁰⁰«Ａ⎇⁻ι¹αζθ¿∧¬﹪ι³¬﹪ι⁵Ａ⁺φγε¿¬﹪ι³Ａφε¿¬﹪ι⁵ＡγεＡηε⁺⁺⁺⁺⁺⁺⁺ＩιθεβＩιθεπ¿⁻ι¹Ａ⁻ι¹λＡ⁹⁹λＡ⎇⁻λ¹αζθ¿∧¬﹪λ³¬﹪λ⁵Ａ⁺φγε¿¬﹪λ³Ａφε¿¬﹪λ⁵ＡγεＡηε¿⁻ι¹ＡτδＡσδ⁺⁺⁺⁺δλθεω

```

Try it online!

YES, WE CAN! Link to the verbose version, this can be golfed a lot, I'm sure.

# Answer
> 0 votes
# Deadfish~, 88919 bytes

Try it online

Code is too long for answer.

---
Tags: code-golf, string, kolmogorov-complexity
---