Answers:
由于使用了insert_name_here,因此巧妙地欺骗了-2个字节
VE*`Y
说明:
VE*`Y
V      # Loop
 E     # <input> number of times
   `Y  # String representation of empty list (used to be "[]", but insert_name_here pointed out this shorter alternative)
  *    # repeat string implicit input number of times
       # implicit print
`Y(空列表的字符串表示形式)代替来保存2个字节"[]"。
                    f(w,h){for(h*=w;h--;)printf(h%w?"[]":"[]\n");}
要么
f(w,h){for(h*=w;h--;)printf("[]%c",h%w?0:10);}
我第一次尝试打高尔夫球,是否错过任何明显的事情?
f(w,h){h*=w;while(h--)printf("\n[]"+!(h%w));}
                    for循环会不会进一步缩短代码?
                    >;;;;;;~++++++++:>~;;;;:>~*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-::<-::::>-::(;)::>-::*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-:<~<;;;;;-+>-:<-:-(-:::~<-:::(~<#<-;;-#~;)-:<#-::<;>-:-)
在线尝试!每个输入数字后需要一个零字节。
我有点不知道这是怎么回事。我可以告诉您的是这部分代码:
 *(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-::<-::::>-::(;)::>-::*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)
正在解析输入数字。
+++++++++[>++++++++++<-]>+[>+>+<<-]>>++>,>+++++++++[<----->-]<--->>>,>+++++++++[<----->-]<--->++++++++++<[<<<[>+>+<<-]>[<<<.>.>>-]>[<<+>>-]>>.<-]
我第一次打高尔夫球!好极了!
输入为ascii + 48,所以要执行50、50,必须输入b,b(98的ascii字母)
+++++++++[>++++++++++<-]>+ Get the opening square bracket into first position
[>+>+<<-] Get it into the second and third position
>>++ Get the third position to be the closing bracket
>
,>+++++++++[<----->-]<--- Get first number into fourth cell
>>>
,>+++++++++[<----->-]<--- Get second number into seventh cell
>++++++++++ get newline into 8th position
<
[ Start our height loop
<<<[>+>+<<-] Get the width into the fifth and sixth positions
>[ Start our width loop at the fifth position
<<<.>. Print the second and third positions
>>-] Decrement the fifth position
>
[<<+>>-] copy the sixth position into the fourth position
>>. print newline
<-]
ẋ⁾[]ẋ$Y
二元链接返回一个字符列表(或打印结果的完整程序)。
ẋ⁾[]ẋ$Y - Main link: number w, number h          e.g. 2, 3
ẋ       - repeat w h times                            [2,2,2]
     $  - last two links as a monad:
 ⁾[]    -   literal ['[',']'],                        "[]"
    ẋ   -   repeat list (vectorises)                  ["[][]","[][]","[][]"]
      Y - join with newlines                          "[][]\n[][]\n[][]"
        - if a full program, implicit print
Ài[]<esc>ÀÄ
哪里<esc>是0x1b。
Ài[]<esc>                    " arg1 times insert []
         ÀÄ                  " arg2 times duplicate this line
param($w,$h),("[]"*$w)*$h
-3感谢Mathias!
param($w,$h),("[]"*$w)*$h
                    EN×[]Iη
在线尝试!链接是详细版本的代码。以高度,宽度顺序输入。木炭的绘画图元不适合此操作,因此这只是简单的方法,可以[]适当地重复字符串。说明:
 N      First input as a number
E       Map over implcit range
      η Second input
     I  Cast to number
   []   Literal string
  ×     Repeat
        Implicitly print on separate lines
6个字节的代码,-R标志+1 。
VÆç"[]
由于存在bug ç,因此无法在最新版本中使用,但在commit中可以使用f619c52。在线测试!
VÆ   ç"[]
VoX{Uç"[]"}  // Ungolfed
             // Implicit: U, V = input integers
VoX{      }  // Create the range [0...V) and replace each item X with
    Uç"[]"   //   U copies of the string "[]".
-R           // Join the result with newlines.
             // Implicit: output result of last expression
seq $(($1*$2))|sed s/.*/[]/|tr -d "
"|fold -w $(($1*2))在线尝试!因为我运行Windows,所以使用bash的TIO风格。
根据注释,现在允许在尾随换行符。
w=>h=>("[]".repeat(w)+`
`).repeat(h)
f=
w=>h=>("[]".repeat(w)+`
`).repeat(h)
oninput=_=>o.innerText=f(+i.value)(+j.value);o.innerText=f(i.value=2)(j.value=2)*{font-family:sans-serif;}
input{margin:0 5px 0 0;width:50px;}<label for=i>w: </label><input id=i type=number><label for=j>h: </label><input id=j type=number><pre id=o>