用字母汤装满碗


24

我们似乎从来没有得到疲倦的字母相关的挑战...


食谱

给定

  • 一串字母S,和
  • 两个正整数MN

产生的字母表汤中的字母S占据的随机位置矩形碗尺寸的M× N框架由一个非字母,非空格字符来表示碗的边缘。

字母未使用的位置应显示为空格。请参阅下面示例

附加规则

  • 尺寸M× N指的是内部的碗。包括轮辋在内的尺寸为M+2× N+2
  • 每个字符S应在碗中一次出现在不同的位置;也就是说,一个字符不能覆盖另一个字符。
  • S 可能包含重复项。例如,如果S是字符串'abcc',汤必须包含一个a,一个b,两个c(都在不同的位置)。
  • 输入将满足限制 M >= 1N >= 11 <= length(S) <= M*N
  • 碗的边缘可以是任何非字母,非空格字符,在程序运行和输入值之间保持一致。
  • 碗中的字母位置是随机的,因此每次使用相同的输入运行程序时,结果可能会有所不同。
  • 给定输入,每个可能的字母位置集应具有非零概率。由于无法从程序的一些实现中进行检查,因此请说明您的代码如何实现此目的。
  • 允许在边框周围使用前导或尾随空格
  • S包含大写字母。如果愿意,您可以选择仅采用小写字母。
  • 输入和输出像往常一样灵活。例如,输出可以是带有换行符的字符串,2D字符数组或行列表。
  • 允许使用任何编程语言编写程序或功能。禁止出现标准漏洞
  • 以字节为单位的最短代码获胜。

例子

输入显示为S, [M N],其中M是行N数和列数。该字符#用于边框。

'O', [1 1]:

###
#O#
###

'HEY', [1 3]:

#####
#YHE#
#####


'HELLO', [4 11]:

#############
#  O        #
#         H #
#    LE     #
#   L       #
#############


'ADVNJSGHETILMVXERTYIOJKCVNCSF', [8 12]:

##############
#K  V  L   S #
# A   V  X H #
#T    M C    #
# I       O N#
#  YC        #
# G  I   R SE#
#   J      F #
#JT  D  V EN #
##############


'OOOOOOOOOOXXXXX', [13 31]:

#################################
#    X                          #
#                O              #
#                               #
#                  X            #
#                        O      #
#             X           O     #
#      O                        #
#         X                     #
#                        O      #
#       X                       #
#                    O          #
#  O      O      O              #
#                             O #
#################################


'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ', [11 41]

###########################################
#                                       JU#
#     Q         C M    G     R T U Y  H   #
#  KI          E   H    M   YO            #
#      V BW        I    JC                #
#     SV           D     P   B          U #
#           A     F    RF   J  KP E       #
#            E   N      TH        Z       #
#    N  BM  O     Q   I        AS N  WX   #
#   S     O  K       G L       P       Q  #
#Z     L T         R   L       A      F DD#
#      V   Y           WX   C       G XZ  #
###########################################


“碗中的字母位置是随机的,[...]” <-您是说可以是随机的,还是必须是随机的?并且所有行是否可以始终具有相同数量的字符?
伊斯梅尔·米格尔

@IsmaelMiguel Must。并且每个配置都必须具有非零的发生概率(在挑战中说明)。这样就排除了总是相同的方法
Luis Mendo

边缘在程序运行和输入值之间是否可以保持一致,但可以使用多个非字母,例如使用绘制ASCII艺术边框|+-
阿达姆

@AdámHm我要说不,那是一个很大的变化
Luis Mendo

Answers:


13

05AB1E20 18 16 15 14 字节

*j.rS²ô2Føε8.ø

按顺序接受三个输入:高度,宽度,字符串。输出为2D字符列表。
用途8为边界,但可以是任何数字。

-1个字节感谢@Grimy

在线尝试验证所有测试用例。(TIO }}J»在页脚中包含漂亮的打印结果;可随时将其删除以查看实际输出的2D字符列表。)

说明:

*               # Multiply the (implicit) width and height inputs
 j              # Pad the (implicit) input-string with up to that amount of leading spaces,
                # so the total string-length is equal to that value
  .r            # Shuffle the characters in the string
    S           # Convert the string to a list of characters
                # (edge-case for the zip below with strings of size 1 with 1x1 dimensions)
     ²          # Push the width input again
      ô         # Split the list of characters into parts of that size
       2F       # Loop 2 times:
         ø      #  Zip/transpose the 2D list; swapping rows/columns
          ε     #  Inner map over each line:
           8.ø  #   And surround this line-list with a leading/trailing "8"
                # (after the loop, the result is output implicitly)

1
@LuisMendo我实际上只是在3分钟前说了挑战。;)这是一个非常简单的实现。将尝试从这里开始打高尔夫球。
凯文·克鲁伊森

1
很好,我没想到*j!这里是13(对于旧版),或者丑陋的14(对于现代版)(输出2D字符数组)。
Grimmy

1
@Grimy 13字节的输入似乎失败了1,1,"O",所以我认为它也必须是14字节的旧版。感谢-1。
凯文·克鲁伊森

7

APL(Dyalog Unicode),25 字节SBCS

'#',∘⌽∘⍉⍣4{⍵⍴⊃¨↓∘⍺¨?⍨×/⍵}

在线尝试!

-22感谢@ ngn,-7感谢@ngn和@Adám

说明:

'#',∘⌽∘⍉⍣4{⍵⍴⊃¨↓∘⍺¨?⍨×/⍵}
          {            ⍵}  Function that generates the content
                            argument:  (width and height),  (string)
                     ×/    get the product
                   ?⍨      For each randomized elements
               ↓∘⍺¨        take the character in 
           ⍵⍴⊃¨            turn it back into a matrix of shape 
      4                 Then, 4 times, do these 3 things:
'#',                       - prepend a # to the axis
                          - reverse the columns
                          - swap columns and lines

APL(Dyalog扩展),21 字节SBCS

轮圈的角度是不同的特征

{⌂disp⊂⍵⍴⊃¨↓∘⍺¨?⍨×/⍵}

在线尝试!

使用dfn显示框。


29:'#',∘⌽∘⍉⍣4⊢⍴∘(?⍨∘≢⊃¨⊂)↑⍨∘(×/) 在线尝试!
阿达姆

28 :({'#',∘⌽∘⍉⍣4⊢⍵⍴⍺\⍨(≢⍺)>?⍨×/⍵}代替>if ⎕io=1
ngn

其实27:'#',∘⌽∘⍉⍣4{⍵⍴⍺\⍨(≢⍺)>?⍨×/⍵}
ngn

3
25:'#',∘⌽∘⍉⍣4{⍵⍴⊃¨↓∘⍺¨?⍨×/⍵}
ngn


6

Python 3,110个字节

lambda s,m,n,r=['#']:[r+(n*r+[i for i,j in{*zip(s+m*n*' ',range(m*n))}]+n*r)[k*n:-~k*n]+r for k in range(m+2)]

在线尝试!

通过使用set理解随机化并返回2D字符数组。


很好地使用集合理解来随机化。+1。但是您的代码依赖于函数的名称“ f”。因此,我认为lambda解决方案无效……
agtoever

1
@agtoever谢谢!该函数不是递归的,因此可以是匿名的。您是指f'{s:{m*n}}'零件吗?因为这是格式化字符串的语法,巧合的是它也恰巧以。开头f
吉特

3
此代码似乎在几种方面违反了PEP 8。
Christofer Ohlsson

1
绝对是@ Christofer-Ohlsson!
吉特

2
@ChristoferOhlsson欢迎来到代码高尔夫世界,哈哈。;)没有任何评论/文档;单字符变量/方法,没有任何(不必要的)空格/换行符;我们可能忽略了潜在的数百个编译器警告;将性能从O(log(N))提高到O(N ^ N);等等。如果它甚至可以保存一个字节,那一切都很好,对于代码查询来说完全值得。;)
Kevin Cruijssen

5

Bash + coreutils,139125个字符

r=`printf %$3s@@|tr \  @`
echo $r
printf %$[$2*$3]s $1|fold -1|shuf|tr -d \\n|fold -$3|paste -d@ <(:) - <(:)|head -$2
echo $r

样品运行:

bash-5.0$ bash soup.sh HELLO 4 11
@@@@@@@@@@@@@
@  H        @
@      OE   @
@    L      @
@          L@
@@@@@@@@@@@@@

在线尝试!

Bash + coreutils + box,97个字符

printf %$[$2*$3]s $1|fold -1|shuf|tr -d \\n|fold -$3|boxes -dsimple -s$[$3+2]x$[$2+2] -pa0 -itext

样品运行:

bash-5.0$ set -- HELLO 4 11

bash-5.0$ printf %$[$2*$3]s $1|fold -1|shuf|tr -d \\n|fold -$3|boxes -dsimple -s$[$3+2]x$[$2+2] -pa0 -itext
*************
* O   L  E  *
*      H    *
*           *
*     L     *
*************

在线尝试!(部分原因boxes是未在TIO上安装。)



5

PowerShell中163个 111 93字节

param($w,$h,$s)'#'*$w+-join($s|% *ht($w*$h)|% t*y|sort{Random})+'#'*$w-replace".{$w}",'#$0#
'

在线尝试!

将输入作为$w第三$h个,$s tring。

构造一个#具有适当$widd的字符串,将其与某些计算进行字符串连接,然后#再次将该同一字符串连接。与以输入计算开始$s特林,并做了.padRig ht$w由IDþ $h8个长度(即,使串足够长的时间来完全占用的矩形空间。然后,我们转换该字符串toCharArra y,和sortRandom光年。这给了最后,我们将-replace其分成相等的$width,并用#s 包围这些块。

-52感谢AZTECCO的启发
-18字节感谢mazzy


您有2 x随机数(12),而JS有1,他添加了空格以填充M * N大小并进行排序,不幸的是,您仍然需要为$支付21美元
AZTECCO

1
@AZTECCO感谢您的灵感!
AdmBorkBork

谢谢@mazzy-非常聪明,-replace而不是分裂和加入。
AdmBorkBork

4

JavaScript(ES7),125个字节

返回一个字符串。使用0作为帧的字符。

(s,h,w)=>(a=[...s.padEnd(w++*h++)].sort(_=>Math.random()-.5),g=x=>y+~h?(x%w&&y%h&&a.pop())+[`
`[x-w]]+g(x<w?x+1:!++y):a)(y=0)

在线尝试!

已评论

(s, h, w) => (               // s = string; h = height; w = width
  a =                        // build an array a[] consisting of:
    [...s.padEnd(w++ * h++)] //   all original characters in s padded with spaces for a
    .sort(_ =>               //   total length of w * h, in a random order
      Math.random() - .5     //   (this is not guaranteed to be uniform, but it is not
    ),                       //   required to be)
  g = x =>                   // g is a recursive function taking x:
    y + ~h ?                 //   if we haven't reached the end of the grid:
      ( x % w &&             //     if we're not located on a vertical border
        y % h &&             //     nor on a horizontal border,
        a.pop()              //     extract the last character from a[]
      ) +                    //     (otherwise, append '0')
      [`\n`[x - w]] +        //     if we've reached the end of the row, append a linefeed
      g(                     //     append the result of a recursive call:
        x < w ? x + 1 : !++y //       using either (x+1, y) or (0, y+1)
      )                      //     end of recursive call
    :                        //   else (end of grid):
      a                      //     a[] is now empty and can be used as an empty string
)(y = 0)                     // initial call to g with x = y = 0

4

APL(Dyalog扩展),23 字节SBCS

匿名默认隐式函数。注意到[M,N]左参数,S作为右边的参数。

'#',∘⌽∘⍉⍣4⊣⍴×/⍛(?⍨⍤⊣⊇↑)

在线尝试!

×/⍛() 在参数之间应用以下函数,将左参数替换为其乘积:

 取M×个N字符S,在右侧填充空格

 将其重新排序为以下顺序:

?⍨⍤ 改组后的索引1到…
 左参数(M× N

ř ESHAPE在于以下形状:

 左参数(即M行和N列)

'#'⍣4 四次应用以下函数,每次使用哈希字符作为左参数:
∘⍉ 转置右参数
∘⌽ 镜像右参数
,将一列哈希值连接到该参数的左侧


4

PHP 7.4,107 99 94个字符

fn($s,$r,$c)=>_.chunk_split(($b=str_pad(_,$c,_)).str_shuffle(str_pad($s,$r*$c)),$c,"_
_").$b._

谢谢:

  • Ismael Miguel提醒我有关PHP 7.4的箭头功能(-10个字符)
  • Night2可有效逆转串联和join()(-8个字符)
  • Night2,用于显示如何使用chunk_split()$end参数(-5个字符)

在线尝试!

PHP 7.3,117个 112 108字符

function s($s,$r,$c){echo _.chunk_split(($b=str_pad(_,$c,_)).str_shuffle(str_pad($s,$r*$c)),$c,"_
_").$b._;}

谢谢:

  • Night2用于有效地逆转串联和join()(-5个字符)
  • Night2用于显示如何使用chunk_split()$end参数(-4个字符)

样品运行:

php > function s($s,$r,$c){echo _.chunk_split(($b=str_pad(_,$c,_)).str_shuffle(str_pad($s,$r*$c)),$c,"_
php " _").$b._;}
php > s('HELLO', 4, 11);
_____________
_  L        _
_        L  _
_E          _
_    OH     _
_____________

在线尝试!


1
我认为fn($s,$r,$c)=>($b=str_repeat(9,$c+2))."\n9".join("9\n9".str_split(str_shuffle(str_pad($s,$r*$c)),$c))."9\n$b";应该可以在PHP 7.4(wiki.php.net/rfc/arrow_functions_v2)中工作,并且已经发布了候选版本(wiki.php.net/todo/php74),因此,它是一个可用的“编译器”在挑战之前,任何人都可以使用它。
Ismael Miguel

1
Doh, you are right. Read about, but forgot. (Note to myself: next time not just read Night2's tip. Upvote it too, maybe helps remembering.)
manatwork


1
Thank you, @Night2. I can't imagine what I messed yesterday, as I tried moving more stuff inside the join(), but failed to reduce the size. ☹
manatwork

1
Got even a shorter one using chunk_split: 94 bytes I also removed the last semicolon as I believe it is not needed, you have written a function, so the code which is going to assign it to a variable shouldn't count.
Night2

3

MATL, 22 19 bytes

tZ"ibpyn&Z@(TT35&Ya

Try it online!

Thanks @LuisMendo for saving 3 bytes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z"                  % Create n x m matrix of spaces
           (         % Index into this matrix:
   i                 %  The alphabet vermicelli (explicit input)
        &Z@          %  at a random locations (randperm), which are
      yn             %   length(S) numbers, ranging
t   bp               %   from 1 to n*m
            TT35&Ya  % And finally add a border

You can change Z}&O by Z", and that also allows you to remove the final c
Luis Mendo

@LuisMendo Oh that helps a lot! Come to think of it, I should've at least done 1$O.
Sanchises

3

Ruby, 121 bytes

Creates the bowl, queries the indices of all spaces within the bowl, samples a number of spaces equal to the size of the string, and fills them in. sample does not return a sorted list, so there is no need to shuffle. Searching indices up to 9*m*n (which almost certainly goes out of range) will still get all spaces and is 1 byte shorter than r.size.

->s,m,n{r=[t=?@*(n+2),*["@#{' '*n}@"]*m,t]*$/;i=-1;(0..9*m*n).select{|j|r[j]==' '}.sample(s.size).map{|j|r[j]=s[i+=1]};r}

Try it online!


3

Red, 120 116 114 112 bytes

-2 bytes thanks to @Kevin Cruijssen!

func[s m n][random pad s m * n insert/dup t: copy"00"0 n
print t loop m[print rejoin[0 take/part s n 0]]print t]

Try it online!


2
-2 bytes by getting rid of the + 1 and using to"""00"0 n instead.
Kevin Cruijssen

1
@KevinCruijssen Thanks! I replaced it with copy, for the same byte count.
Galen Ivanov

1
That indeed looks a bit cleaner! I don't know Red except for the answers I've seen from you, so I was just fiddling around a bit. ;) Would putting the t line as leading/trailing item before looping to save on the two loose print t be shorter? I doubt it, but since I don't know how to add items to a list I'm not sure.
Kevin Cruijssen

3

Perl 6, 74 67 bytes

-5 bytes thanks to Jo King

{0 X~0 x$^n,|comb($n,[~] $^s.comb[pick *,^$^m*$n]X//' '),0 x$n X~0}

Try it online!

Explanation

{                                                                 }
                                         ^$^m*$n  # Range 0 .. M*N-1
                                  pick *,  # Shuffle
                         $^s.comb  # Split S into chars
                                 [              ]  # Pick shuffled elements
                                                 X//' '  # undef to space
                     [~]  # Join
             # Split into n-character strings
             comb($n,                                  )
            |  # Flatten
     # Add top and bottom of bowl
     0 x$^n,                                            ,0 x$n
 # Add left and right of bowl
 0 X~                                                          X~0


3

Perl 5 -lF, 99 97 bytes

-2 bytes courtesy of @NahuelFouilleul

%k=map{$_=>$F[$_]||$"}0..($m=<>)*($n=<>)-1;say+($p='#'x($n+1)),map"#
#"x!($i++%$n).$_,values%k,$p

Try it online!


($i++%$n==0) could be changed by !($i++%$n)
Nahuel Fouilleul

3

k4, 32 28 bytes

{4{|+x,'"#"}/y#a?(a:-*/y)$x}

edit: -4 thanks to Galen Ivanov!

called like

f["hey";3 3]

explanation:

                 (a:-*/y)    / neg product of y and assign to a 
                         $x  / left pad x so we have char vector the length of the inner area
               a?            / take `a` random drawings. if a is negative, draw with no duplicates/replacements
             y#              / reshape to y's dimensions
 4{        }/                / do {} 4 times 
   |+x,'"#"                  / append "#" along right-side of x then transpose (+) and reverse (|)

1
I think you can save some bytes if you only append # at the end of each line and transpose/reverse 4 times, something like this.
Galen Ivanov

1
@GalenIvanov nice, updated!
scrawl

3

Java (JDK), 180 178 bytes

Not a single extra import:

(y,m,n)->{for(m*=n;y.length()<m;y+=" ");var s="";for(;m-->0;y=s)for(var c:y.split(s=""))s=Math.random()<.5?s+c:c+s;s="#".repeat(n);return(s+y+s).replaceAll(".{"+n+"}","\n#$0#");}

Try it online!

It was quite the struggle to get this golfed down. In particular, the imports involved with Collections.shuffle()/Arrays methods were too much to accept, so I had to create my own String shuffling algorithm (probably neither efficient nor uniformly distributed). Massive thanks to Steven for proving any set of positions can be generated from the algorithm.

Formatted (with explanation):

(y, m, n) ->                                                   // y = yummies in the soup,
{                                                              // m = height, n = width
    for (m *= n; y.length() < m; y += " ")                     // set m to m*n and
        ;                                                      // add spaces to y to fill up
    var s = "";                                                // the rest of the soup
    for (; m-- > 0; y = s)                                     // for m*n iterations, scramble y
        for (var c : y.split(s = ""))                          // with random appends
            s = Math.random() < .5 ? s + c : c + s;
    s = "#".repeat(n);                                         // create the top/bottom of the rim
    return (s + y + s).replaceAll(".{" + n + "}", "\n#$0#"); // add all sides of the rim
};

Nice answer! +1 from me. One small thing to golf: .replaceAll("(.{"+n+"})","\n#$1#") can become .replaceAll(".{"+n+"}","\n#$0#")
Kevin Cruijssen

@KevinCruijssen Thanks for the improvement :)
Avi

2

Charcoal, 27 bytes

NθNη↖B⁺²θ⁺²η#FS«W℅KKJ‽θ‽ηPι

Try it online! Link is to verbose version of code. Takes input in the order width, height, string. Explanation:

NθNη

Input the width and height.

↖B⁺²θ⁺²η#

Frame the bowl.

FS«

Loop over the characters in the string.

W℅KKJ‽θ‽η

Jump to a random position in the bowl until an empty spot is found.

Pι

Print the current character without moving the cursor.


Is that Move(:UpLeft) necessary? It works fine without it, but maybe you've added it for a reason I don't think about?
Kevin Cruijssen

1
@KevinCruijssen Without it I would never be able to write letters into the bottom row or rightmost column.
Neil

Ah, so that was it. That explains it, thanks!
Kevin Cruijssen

2

Japt -R, 21 18 bytes

úV*W ö¬òW ²Ô²û2W+2

Try it

úV*W ö¬òW ²Ô²û2W+2     :Implicit input of string U=S and integers V=M & W=N
úV*W                   :Right pad U with spaces to length V*W
     ö¬                :Random permutation
       òW              :Split to array of strings of length W
          ²            :Push 2
           Ô           :Reverse
            ²          :Push 2
             û2W+2     :Centre pad each element with "2" to length W+2
                       :Implicit output, joined with newlines

2

MATL, 29 27 19 bytes

pZ@iy~hw)1GeTT35&Ya

Try it online!

Thanks @LuisMendo for -8 bytes!

Explanation: p computes the number of soup-pixels. Then Z@ produces a random permutation of size of number of soup pixels. We will use this as indices to iy~h which is the input string with enough spaces added. w) swaps the two and indexes one with the other. We then reshape 1Ge the shape into the desired rectangle and #-pad it using TT35&Ya.


2
Clever! My attempt was 22 bytes
Sanchises

2
@Sanchises Go post it anyway!
flawr

2

T-SQL 2017, 232 bytes

Testing this online is an older version of sql-server costing another character. I posted the shorter version.

Golfed:

DECLARE @ varchar(max)=''SELECT top 999 @+=substring(@i,number+1,1)FROM spt_values
WHERE type='P'and number<@a*@b
ORDER BY newid()WHILE-@b<1SELECT @=stuff(@+' ',@b*@a+1,0,'#
#'),@b-=1PRINT stuff(replicate('#',2+2*@a),2+@a,0,trim(@))

Try it online

Ungolfed:

DECLARE @ varchar(max)=''

SELECT top 999 @+=substring(@i,number+1,1)
FROM spt_values
WHERE type='P'and number<@a*@b
ORDER BY newid()

WHILE-@b<1
SELECT @=stuff(@+' ',@b*@a+1,0,'#
#'),@b-=1
PRINT stuff(replicate('#',2+2*@a),2+@a,0,trim(@))

2

C (clang), 169 164 162 160 bytes

i,b;f(n,m,s)char*s;{char*a,o[b=i=-~++n*(m+=3)];for(srand(time(a=o));--i;)*a++=i%m?-~i%m<3|i<m|i>m*n?35:32:10;for(*a=0;*s;*a=*a-32?*a:*s++)a=o+rand()%b;puts(o);}

Try it online!

-2 putting a=o in time() call // for(srand(time(a=o));...

Saved 7 @ceilingcat suggestion to use -~variable and auto storage for string o plus many improvements.

Degolf :

char*a,// pointer for set operations 
*o=malloc(b=i=(m+=3)*(n+=2));  => o[b=i=(m+=3)*-~++n]
// before allocating for the whole bowl as a char array
// increments m by 3 (2 for rims and 1 for '\n') and n by one but allocates for 2(rims)
// and assigns bowl size to i and b.
srand(time(0));// seeds rand function 
for(// loop to make empty bowl 
a=o;// using pointer as iterator
 --i ;)//  i decremented as a counter

 *a=// sets every char to..
 i%m?// if(not) over right side of bowl (m+3)
   -~i%m<3|i<m|i>m*n-m?35// if on rim '#'//-~i == (i+1)
   :32 // else ' ' 
  :10;// i%m==0

for(*a=0;// before loop terminates bowl with \0
 *s;// for every letters(exit on '\n')
 *a=*a-32?*a:*s++)
 // puts letter if bowl at a is a space and
 // go to next letter

 a=o+rand()%b; 
 // sets a to o offsetted by random

puts(o);// prints bowl 

Suggest *a=--i;)*a++=i%m?-~i%m<3|i<m|i>m*n?35:32:10;for(; instead of --i;)*a++=i%m?-~i%m<3|i<m|i>m*n?35:32:10;for(*a=0;
ceilingcat

@ceilingcat it should work but for some reason it gives wrong output on the last 2 test cases
AZTECCO


1

Jelly, 16 bytes

P⁶ẋaẊs⁸ṪṾ€«”~ZƊ⁺

A dyadic Link accepting a list of integers, [M, N], on the left and a list of characters, S, on the right which yields a list of lists of characters, the lines. Uses the tilde character, ~, as the border.

Try it online!

All possible outputs have a non-zero chance of being yielded since we shuffle () a list of the characters of S along with the appropriate number of spaces.

The code Ṿ€«”~ZƊ⁺ saves the byte which I imagine would be required to join with newlines that full programs using an integer such as zero would need to employ (e.g. P⁶ẋaẊs⁸Ṫ;€0ZUƊ4¡Y or P⁶ẋaẊs⁸Ṫj@€Ø0Z$⁺Y). Maybe there's a way to save more...?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.