11
\$\begingroup\$

This is a cigarette.

 _
 //
 //
//
°

This is two (2) cigarettes.

 __
 ///
 ///
///
°°

This is three (3) cigarettes. The third is stacked upon the other two.

 _
 //
 ///
 ///
/°/
°°

Write a function to print 500 cigarettes, stacked according to the following rules:

  1. There must be a single pile of cigarettes. (You're not allowed to print 500 individual cigarettes in a line, or 250 pairs of cigarettes, etc. etc.: you must stack them in accordance with the above diagrams.)
  2. The pile need not come to a point (the highest layer (apex) may contain more than 1 cigarette).
  3. All layers (excluding the apex and base) must be as wide as possible; if the base of your pile is a layer of 20 cigarettes, the next layer must be 19 cigarettes long, unless it is the apex.
  4. The apex must be aligned to the left of the pile.
  5. The pile must be as tall as possible.

Shortest program wins. Good luck!

EDIT: For reference for other players, this is the target output.

 ________
 /////////
 //////////
 ///////////
 /°°°°°°°°///
 /°°°°°°°°°///
 /°°°°°°°°°°///
 /°°°°°°°°°°°///
 /°°°°°°°°°°°°///
 /°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°//
/°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

Many thanks to Themoonisacheese for her contribution here!

asked Sep 26, 2024 at 13:24
\$\endgroup\$
9
  • 1
    \$\begingroup\$ May be helpful: the closest triangular number to 500 is 496, so the highest pile probably looks like a triangle 31 layers tall with 4 extra cigarettes off to the side. \$\endgroup\$ Commented Sep 26, 2024 at 14:05
  • 2
    \$\begingroup\$ @bigyihsuan: according to the spec, it's more correct to use a 32-size truncated triangle, because the spec requires there to be only one pile. \$\endgroup\$ Commented Sep 26, 2024 at 14:32
  • \$\begingroup\$ @bigyihsuan I sadly can't provide one at the moment; in the office rn then away from a machine for a while. Once someone's got a solve I'll paste it into the question though. :) \$\endgroup\$ Commented Sep 26, 2024 at 14:34
  • \$\begingroup\$ @ConnieMnemonic: i've just done the maths and it seems a truncated triangle with a base 32 is the minimum. 31 gives you an extra 4 that can't meet the spec, 32 gives you the base of a triangle exactly 29 complete layers tall, with the remaining 7 layers removed. the apex layer will be 8 cigarettes wide, exactly enough to complete that layer. \$\endgroup\$ Commented Sep 26, 2024 at 14:44
  • 1
    \$\begingroup\$ Yeah, in all honesty, I didn't expect the maths would shake out so that you'd end on a finished layer. So the point is largely moot. \$\endgroup\$ Commented Sep 26, 2024 at 21:52

13 Answers 13

7
\$\begingroup\$

Bubblegum, 129 bytes

not printable, xxd dump:

00000000: 5d00 0000 04ff ffff ffff ffff ff00 106e ]..............n
00000010: 0c5f d4dd 54e5 a78d 4c84 ac22 2022 8f09 ._..T...L.." "..
00000020: ed2d 6f9d c21f 5eb6 38a3 fcb2 09f3 6a61 .-o...^.8.....ja
00000030: 1eed 10e8 8559 e94c 903a dffc cd80 03c5 .....Y.L.:......
00000040: 2921 d152 7ee6 7884 9c92 2599 c1c9 cd30 )!.R~.x...%....0
00000050: e519 a58d d27e 62b0 741b 8bed a643 155e .....~b.t....C.^
00000060: 7ff8 fc42 d35c 970b 3b5c e4d6 f2ad 22f9 ...B.\..;\....".
00000070: b2ec f8ac ccac eec0 1c13 3f77 fffd ee00 ..........?w....
00000080: 00 .

outputs:

 ________
 /////////
 //////////
 ///////////
 /°°°°°°°°///
 /°°°°°°°°°///
 /°°°°°°°°°°///
 /°°°°°°°°°°°///
 /°°°°°°°°°°°°///
 /°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°°///
 /°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°//
/°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

This is a valid lzma2 stream encoded with the extreme 9 preset, which bubblegum will simply decode and output when it detects that this is the case. Yes, this is largely cheating (even though bubblegum is technically an allowed language, the joke is now old), but i wanted to get any answer out there so that other participants had a correct template to copy. Bubblegum is also exactly why such challenges generally require participants to implement variable output, such as "n cigarettes" ;)

answered Sep 26, 2024 at 15:02
\$\endgroup\$
6
  • \$\begingroup\$ I also wanted to include a template for a pile in the shape of the original meme, but a) it doesn't meet the spec as the cigarettes are not piled triangularly, and b) there's not even 500 cigarettes in said image, there's even less than 400. \$\endgroup\$ Commented Sep 26, 2024 at 15:08
  • \$\begingroup\$ I'm impressed how far you took this. Never seen Bubblegum before, that's absolute class. Great answer. \$\endgroup\$ Commented Sep 26, 2024 at 15:10
  • 10
    \$\begingroup\$ @ConnieMnemonic bubblegum is widely regarded as cheating or at best "not a very good joke" here. the hard part was figuring out the shape using excel and hiding the ascii art while i was making it at work. \$\endgroup\$ Commented Sep 26, 2024 at 15:12
  • \$\begingroup\$ Excel's a good shout for ASCII art, never thought to do that, hah. \$\endgroup\$ Commented Sep 26, 2024 at 15:14
  • \$\begingroup\$ I tried to run this with this reference implementation (after using xxd -r to convert your hexdump to raw binary), and it didn't work. It just outputted random ASCII: (ffNCUJ ^youKDgR... \$\endgroup\$ Commented Sep 27, 2024 at 21:12
7
\$\begingroup\$

Jelly, (削除) 43 42 (削除ここまで) 39 bytes

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y

A full program that takes no arguments and prints the pile to stdout.

Try it online!

How?

Makes a single cigarette using integers rather than characters in printing precedence order so that we can merge canvases of cigarettes and other spaces (zeros) by taking maximums:

 _ 0001
 // 0022
 // 022
// 22
° 3

Then builds the pile, translates to characters, and prints.

25ðṬṖ;"@ɦ(1⁄2¤‘b4UŻ31ドルСḊ€Ḋ$ƬḣẎ»/ị"_/° "Y - Main Link: no arguments
25 - set the left argument to 25
 ð - start a new dyadic chain - f(L=25, R=25)
 Ṭ - {L} untruth -> [0,0,...,0,1] (24 zeros & 1)
 Ṗ - pop -> [0,0,...,0] (24 zeros)
 "@ɦ(1⁄2¤‘ - code-page indices -> [64,160,40,10,3]
 ; - concatenate -> [0,0,...,0,64,160,40,10,3]
 b4 - to base four -> [[0],[0],...,[0],[1,0,0,0],[2,2,0,0],[2,2,0],[2,2],[3]]
 U - reverse each -> [[0],[0],...,[0],[0,0,0,1],[0,0,2,2],[0,2,2],[2,2],[3]]
 (full-height canvas with the bottom-left cigarette)
 31С - collect, repeating this 31 times:
 ݀ - prefix each with a zero
 (a full-height canvas with the next leftmost cigarette of the bottom row)
 Ƭ - collect while distinct applying:
 $ - last two links as a monad - f(Canvases):
 Ḋ€ - dequeue each (remove the top line from each canvas)
 Ḋ - dequeue (discard Canvas of leftmost cigarette)
 ḣ - head to index {R} (first 25 of these lists of canvases)
 Ẏ - tighten (to a list of 500 canvases)
 »/ - reduce by maximum (merge the canvases)
 ị"_/° " - index into "_/° " (1-based and modular)
 Y - join with newline characters
 - implicit print
answered Sep 26, 2024 at 20:34
\$\endgroup\$
5
\$\begingroup\$

Vyxal 3 -Mj, 51 bytes

×ばつ]JƛL31<['/p31«'/31nL-3g×ばつ+]'_×ばつ34«p

Vyxal It Online!

probably golfable

answered Sep 26, 2024 at 16:47
\$\endgroup\$
3
\$\begingroup\$

Charcoal, 30 bytes

×ばつ_8↓G→9↓25↙3←33/↓G↗25→8↓25°

Attempt This Online! Link is to verbose version of code. Explanation:

×ばつ_8

Draw the top line of _s, leaving the cursor to the left of the first _.

Move down to the top line of /s.

G→9↓25↙3←33/

Draw the irregular pentagon of /s (considering the area under the °s to be part of the pentagon) leaving the cursor at the bottom left.

Move down to where the bottom left of the °s should be.

G↗25→8↓25°

Draw the trapezium (US: trapezoid) of °s. (Note that ° costs 3 bytes in Charcoal.)

answered Sep 26, 2024 at 21:25
\$\endgroup\$
1
  • \$\begingroup\$ @emanresuA If you change the arguments to -vx you'll see that it's encoded as FF 80 30. \$\endgroup\$ Commented Sep 26, 2024 at 22:05
3
\$\begingroup\$

JavaScript (ES6), 86 bytes

f=(y=-1,x,n=9+y-x--)=>29-y?` /_°
`[x?n<0?0:n&&x>3&y>3?3:n<33^3*!y:4]+f(y+!x,x||36):""

Try it online!

Commented

f = ( // f is a recursive function taking:
 y = -1, // y = row, starting at -1
 x, // x = column, initially undefined
 n = 9 + y - x-- // n is negative on the left side,
 // 0 on the diagonal,
 // greater than 0 on the right side
) => //
29 - y ? // if y is not equal to 29:
 ` /_°\n`[ // lookup string
 x ? // if x is not zero:
 n < 0 ? // if this is the left side:
 0 // append a space
 : // else:
 n && // if this is not the diagonal
 x > 3 & // and we're not too far on the right
 y > 3 ? // and this is not the upper part:
 3 // append '°'
 : // else:
 n < 33 ^ // append either '/' or ' ' on the
 // bottom right corner,
 3 * !y // or '_' on the first row
 : // else (end of row):
 4 // append a line feed
 ] + // end of lookup
 f( // recursive call:
 y + !x, // increment y if x = 0
 x || 36 // reset x to 36 if x = 0
 ) // end of recursive call
: // else:
 "" // stop
answered Sep 26, 2024 at 20:46
\$\endgroup\$
3
\$\begingroup\$

Neovim Macro, 108 bytes

28oEsc5GC-v23jI3/Esc23jVkgC-xG0C-v24kI7°EscgvgC-aGk0C-vggI1/EscC-v3j6C-agvgC-aC-v26jI28 EscgvlgC-x$r_:%s/\v(\d+)(.)/1円A2円C-vEsc/gEnterqq^D@"kq28@q

Unprintable characters have been replaced with the keypresses they represent. Below is the raw hexdump:

00000000 32 38 6f 1b 35 47 16 32 33 6a 49 33 2f 1b 32 33 |28o.5G.23jI3/.23|
00000010 6a 56 6b 67 18 47 30 16 32 34 6b 49 37 c2 b0 1b |jVkg.G0.24kI7...|
00000020 67 76 67 01 47 6b 30 16 67 67 49 31 2f 1b 16 33 |gvg.Gk0.ggI1/..3|
00000030 6a 36 01 67 76 67 01 16 32 36 6a 49 32 38 20 1b |j6.gvg..26jI28 .|
00000040 67 76 6c 67 18 24 72 5f 3a 25 73 2f 5c 76 28 5c |gvlg.$r_:%s/\v(\|
00000050 64 2b 29 28 2e 29 2f 5c 31 41 5c 32 16 1b 2f 67 |d+)(.)/1円A2円../g|
00000060 0d 71 71 5e 44 40 22 6b 71 32 38 40 71 0a |.qq^D@"kq28@q.|

Here's a command you can use to test it. It's the same code as above, but in mapping format rather than macro format. Run this and then press F5 in an empty buffer:

:map <F5> 28o<Esc>5G<C-V>23jI3/<Esc>23jVkg<C-X>G0<C-V>24kI7°<Esc>gvg<C-A>Gk0<C-V>ggI1/<Esc><C-V>3j6<C-A>gvg<C-A><C-V>26jI28<Space><Esc>gvlg<C-X>$r_:%s/\v(\d+)(.)/1円A2円<C-V><Esc>/g<CR>qq^D@"kq28@q

Explanation

Stage 1: RLE decoding

28oEsc5GC-v23jI3/Esc23jVkgC-xG0C-v24kI7°EscgvgC-aGk0C-vggI1/EscC-v3j6C-agvgC-aC-v26jI28 EscgvlgC-x$r_

The first part of the program is simply my best attempt to encode the RLE version of the final string:

27 8_
26 9/
25 10/
24 11/
23 1/8°3/
22 1/9°3/
21 1/10°3/
20 1/11°3/
19 1/12°3/
18 1/13°3/
17 1/14°3/
16 1/15°3/
15 1/16°3/
14 1/17°3/
13 1/18°3/
12 1/19°3/
11 1/20°3/
10 1/21°3/
9 1/22°3/
8 1/23°3/
7 1/24°3/
6 1/25°3/
5 1/26°3/
4 1/27°3/
3 1/28°3/
2 1/29°3/
1 1/30°2/
1/31°1/
32°

For example, the first line is 27 spaces followed by 8 underscores.

This was done by hand, there's not really any special tricks here. The best way to see what's going on here is to just execute the code by hand and watch it construct the string, it's mostly just going back to front (for alignment reasons) and using gC-A and gC-X along with block selections.

Stage 2: Macro conversion

:%s/\v(\d+)(.)/1円A2円C-vEsc/gEnter

This executes a pattern that matches an RLE "packet" and transforms it into a macro that inserts that packet. The buffer now looks like this:

27A ^[8A_^[
26A ^[9A/^[
25A ^[10A/^[
24A ^[11A/^[
23A ^[1A/^[8A°^[3A/^[
22A ^[1A/^[9A°^[3A/^[
21A ^[1A/^[10A°^[3A/^[
20A ^[1A/^[11A°^[3A/^[
19A ^[1A/^[12A°^[3A/^[
18A ^[1A/^[13A°^[3A/^[
17A ^[1A/^[14A°^[3A/^[
16A ^[1A/^[15A°^[3A/^[
15A ^[1A/^[16A°^[3A/^[
14A ^[1A/^[17A°^[3A/^[
13A ^[1A/^[18A°^[3A/^[
12A ^[1A/^[19A°^[3A/^[
11A ^[1A/^[20A°^[3A/^[
10A ^[1A/^[21A°^[3A/^[
9A ^[1A/^[22A°^[3A/^[
8A ^[1A/^[23A°^[3A/^[
7A ^[1A/^[24A°^[3A/^[
6A ^[1A/^[25A°^[3A/^[
5A ^[1A/^[26A°^[3A/^[
4A ^[1A/^[27A°^[3A/^[
3A ^[1A/^[28A°^[3A/^[
2A ^[1A/^[29A°^[3A/^[
1A ^[1A/^[30A°^[2A/^[
1A/^[31A°^[1A/^[
32A°^[

Stage 3: Macro Execution

qq^D@"kq28@q

Finally, record a macro into @q that takes the contents of a line, executes them as a macro, and moves up a line. Executing this for every line gives us the final result.

answered Sep 28, 2024 at 1:09
\$\endgroup\$
3
\$\begingroup\$

Perl 5, 122 bytes

say$_=$"x27 .'_'x8;y|_|/|;s| /|//|,say while$i++<3;s|/{8}|/ooooooo|g;s| /|/o|,$j>22&&chop,say while$j++<24;chop;s|/|o|;say

Try it online!

answered Oct 20 at 21:43
\$\endgroup\$
2
\$\begingroup\$

Bash + brotli, 133 bytes

Kind of cheating but here goes:

echo HwEGwByp4z4Rt81aWOEFZMDWyxf//HsD2thmeRh5zL/jyX1d4EQQh9t6rW3jgi936M+HpQGCAoMDhASFBYYGh0eAAgkaRKiQoUOG57ob8wY=|base64 -d|brotli -d

117 bytes if output in UTF-8 is not required. In the old de facto standard Latin1/ISO-8859-1:

echo Hw0E+I+UrMW5EuQFtmFfvhQiDA+onBpYGGBAMf+FwAyPxGuTleazVpsBWCwWi8VisVgsFovFYrFYLBaLRdJfzNvcAA==|base64 -d|brotli -d
answered Sep 27, 2024 at 11:20
\$\endgroup\$
2
\$\begingroup\$

Haskell, (削除) 100 (削除ここまで), (削除) 91 (削除ここまで), (削除) 89 (削除ここまで), 90 bytes

g<$>[0..28]<*>[-27..8]
g y x|x>7='\n'|x+y>32||x+y<0=' '|y<1='_'|x+y>0,x<5,y>3='°'|0<1='/'

-11 bytes thanks to xnor!

+1 byte because I didn't notice non-ascii °

Try it online!

answered Sep 27, 2024 at 1:28
\$\endgroup\$
3
  • 1
    \$\begingroup\$ 91 bytes reindexing and putting the _ case second \$\endgroup\$ Commented Sep 27, 2024 at 5:59
  • 2
    \$\begingroup\$ 89 bytes with a newline column \$\endgroup\$ Commented Sep 27, 2024 at 6:17
  • 2
    \$\begingroup\$ OP says the non-ascii ° is compulsory, alas. \$\endgroup\$ Commented Sep 27, 2024 at 13:04
2
\$\begingroup\$

Canvas, 31 bytes

 ×ばつ}⌐)/1{7+ ̅Ic×ばつ]/14╋_×ばつ ̅-0╋

Try it here!

Explanation:

 ×ばつ}⌐)/1{7+ ̅Ic×ばつ]/14╋_×ばつ ̅-0╋ | Code (some characters replaced for nice formatting)
--------------------------------+-------------------------------------------------------------
 ̅9 | 25
 { } | From 1 to ToS (25):
 8+ | Add 8
 ×ばつ | Repeat / that number of times horizontally
 ⌐ | Duplicate ToS twice
 ) | Collect into an array (effectively stack lines vertically)
 / | Anti-diagonalize
 1 | 25 (from previous loop)
 { ] | Map from 1 to ToS (25), collecting results in an array:
 7+ | Add 7
 ̅Ic×ばつ | Repeat ° that number of times horizontally
 / | Anti-diagonalize
 14╋ | Overlap ToS (° trapezoid) over SoS (/ pentagon) 4 lines down
 _×ばつ | ________
 ̅-0╋ | Overlap ToS (_ line) over SoS 28 chars right, one line up
answered Oct 15 at 5:41
\$\endgroup\$
1
\$\begingroup\$

05AB1E, 43 bytes

'_×ばつìÀN21-F¤ð.;]` ̈) ̃.Bí»

Try it online.

×ばつìÀN21-F¤ð.;] could alternatively be ×ばつ3jì'/«}R for the same byte-count:
Try it online.

Explanation:

'_×ばつ '# Push a string consisting of 8 "_"s
'/ '# Push "/"
 9DÌŸ # Push list [9,10,11]
 ×ばつ # Map those values to strings consisting of that many "/"s×ばつ '# Do the same for "°" and a list in the range [8,32]
 ε # Map over this list:
 ×ばつì '# Prepend 4 "/"
 À # Then rotate it once so one "/" is trailing
 N21- # Push the 0-based loop-index and subtract 21
 F # If it's a positive integer, loop that many times:
 ¤ð.; # Replace the first "/" with a " "
 ] # Close both the inner loop and outer map
 ` # Pop and push these mapped strings to the stack
 ̈ # Remove the last character of the top string
 ) # Wrap everything on the stack into a list
 ̃ # Flatten it
 .B # Box it; add trailing spaces to make all lines the same length
 í # Then reverse each inner string
 » # Join by newlines
 # (after which the result is output implicitly)
R # Reverse the list of "°"-strings to range [32,8]
 ε # Map over this list:
 N3‚ # Pair 3 with the 0-based loop index
 ß # Pop and leave the minimum
 ×ばつ '# Pop and have a string consisting of that many "/"
 3j # Prepend spaces to make it length 3
 ì # Prepend it in front of the "°"-string
 '/« '# And also append a "/"
 }R # After the map: Reverse the list back
answered Sep 27, 2024 at 7:55
\$\endgroup\$
1
\$\begingroup\$

Vyxal 3, 193 bytes

"iX,≛∻WÞ⌊ξ^ʁL·ᴥ⩔?ᐵ⏚›⇄さんかくS8_C∧? Ϣ£⌊‰]ƛhʎ1⁄\≠}∪-Cƛ1⁄ᐐ-⌈⁜ƶ↸‰∧}O⎶s☷⇧∺¶O⎘⊣2ġ!⊖↝g1円¶(ṪM.⊖L·ʀ∥}ᛞ⎘ʁλn⇄Ƶ%%Cμ(4)⌊ʁb Ͼꜝ ̈Ϣx∥ ̈1⁄ƛ↺⤺(⤻M(注記)⦰ƓPh␣◌Ł4⌊λSΠδɾ3⎄Þ;ꜝ⊞ꜝ~>^C@Ġꜝ
z⨪'f¬¤N@NcKt⎄⍰↺b[␣ɦhɠ(1)␣∑øṬM(2)^ɾʀ⎀»"'t176Orka19⊖(nsƵj

Vyxal It Online!

"cci________
ccr mmlcmm/likmm//li /nli/ner /blr/sjlkhlkpehapta/gqihfqipoqrhjqrpnqr/gfqkhbqkpsjqhnsqpnfq/gbdkhnjdkpgdhgtdpnb//
/gnj/
ggjtik qdrp /nbftnssm///lqri jotirkh pgnnfsatldm
crrbsoate"'t176Orka19⊖(nsƵj­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣⁤‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏⁠‎⁡⁠⁤⁣‏⁠‎⁡⁠⁤⁤‏⁠‎⁡⁠⁢⁡⁡‏‏​⁡⁠⁡‌⁢⁢​‎⁠⁠‎⁡⁠⁤⁣‏⁠‎⁡⁠⁤⁤‏⁠‎⁡⁠⁢⁡⁡‏‏​⁡⁠⁡‌⁢⁣​‎‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏‏​⁡⁠⁡‌⁢⁤​‎‎⁡⁠⁢⁡⁢‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏⁠‎⁡⁠⁢⁢⁡‏⁠‎⁡⁠⁢⁢⁢‏‏​⁡⁠⁡‌⁣⁡​‎‎⁡⁠⁢⁡⁢‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏‏​⁡⁠⁡‌⁣⁢​‎‎⁡⁠⁢⁢⁡‏⁠‎⁡⁠⁢⁢⁢‏‏​⁡⁠⁡‌­
"..." # ‎⁡regpack compressed target string, with '°' replaced with 't'
 r # ‎⁢replace...
 't # ‎⁣'t' with...
 176O # ‎⁤unicode value 176 ('°')
 ka19⊖ # ‎⁢⁡build regpack decompression key:
 19⊖ # ‎⁢⁢first 19 chars of...
 ka # ‎⁢⁣lowercase alphabet
 (nsƵj # ‎⁢⁤regpack decompression routine:
 (ns # ‎⁣⁡split main string by each char in key
 Ƶj # ‎⁣⁢join by last element
💎

Created with the help of Luminespire.

The vyxal single-byte character set does not include the character °, so i instead build it from its unicode value otherwise, including it in the source would make the bytes count in UTF-8. this has the nice side effect of making the main string compressible, which saves more bytes than i use to construct the character.

<script type="vyxal3">
"iX,≛∻WÞ⌊ξ^ʁL·ᴥ⩔?ᐵ⏚›⇄さんかくS8_C∧? Ϣ£⌊‰]ƛhʎ1⁄\≠}∪-Cƛ1⁄ᐐ-⌈⁜ƶ↸‰∧}O⎶s☷⇧∺¶O⎘⊣2ġ!⊖↝g1円¶(ṪM.⊖L·ʀ∥}ᛞ⎘ʁλn⇄Ƶ%%Cμ(4)⌊ʁb Ͼꜝ ̈Ϣx∥ ̈1⁄ƛ↺⤺(⤻M(注記)⦰ƓPh␣◌Ł4⌊λSΠδɾ3⎄Þ;ꜝ⊞ꜝ~>^C@Ġꜝ
z⨪'f¬¤N@NcKt⎄⍰↺b[␣ɦhɠ(1)␣∑øṬM(2)^ɾʀ⎀»"'t176Orka19⊖(nsƵj
</script>
<script>
 args=[]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

answered Mar 31 at 11:55
\$\endgroup\$
1
\$\begingroup\$

Python, 119 bytes

The "straightforward" way. I first had hopes of getting a f"{...:>35}" right alignment to pay for the syntax cost, but ' '*(27-k) just is simpler and gets the end right for free.

Submission:

for k in range(29):print(' '*(27-k)+(k>3)*('/'*(k<28)+'°'*((29>k>3)*(k+4)))+'/'*((0<k<4)*8+min(3,k,28-k))+'_'*8*(1-k))

Slightly expanded for clarity:

for k in range(29):
 print(
 ' '*(27-k)+
 (k>3)*(
 '/'*(k<28)+
 '°'*((29>k>3)*(k+4))
 )+
 '/'*((0<k<4)*8+min(3,k,28-k))+
 '_'*8*(1-k)
 )

Attempt This Online!

answered Oct 16 at 12:36
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.