APL (Dyalog), 2919 (削除) 29 (削除ここまで) bytes (削除) 1 Bytebyte (削除ここまで) No header (削除) and (削除ここまで) or footer
⊃{⍬≡⍵:,0⋄1=⍴⍵:1,0⋄1⋄(+/2↑⍵),⍵}⍬
Try it on TryAPL.org! Try it on TryAPL.org!
Thanks to Bubbler for pointing out that the header and footer could be incorporated into the function
With a header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 29 bytes (削除) 1 Byte (削除ここまで) No header (削除) and (削除ここまで) or footer
⊃{⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
Thanks to Bubbler for pointing out that the header and footer could be incorporated into the function
With a header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 19 (削除) 29 (削除ここまで) bytes (削除) 1 byte (削除ここまで) No header (削除) and (削除ここまで) or footer
⊃{⍬≡⍵:1⋄(+/2↑⍵),⍵}⍬
Thanks to Bubbler for pointing out that the header and footer could be incorporated into the function
With a header/footer, the body could be significantly shorter, but that's counter to the metric of success.
- 121
- 3
APL (Dyalog), 29 bytes 1 byte(削除) 1 Byte (削除ここまで) No header and(削除) and (削除ここまで) or footer
⊃{t←⍬≡⍵⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
Try it on TryAPL.org! Try it on TryAPL.org!
WithThanks to Bubbler for pointing out that the header ⍬ (an empty vector) and footer ⊃ (right),could be incorporated into the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.function
With a longer header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 29 bytes 1 byte header and footer
{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}
With the header ⍬ (an empty vector) and footer ⊃ (right), the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.
With a longer header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 29 bytes (削除) 1 Byte (削除ここまで) No header (削除) and (削除ここまで) or footer
⊃{⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
Thanks to Bubbler for pointing out that the header and footer could be incorporated into the function
With a header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 29 bytes 1 byte header and footer
{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}
With the header ⍬ (an empty vector) and footer ⊃ (right), the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.
With a longer header/footer, the body could be significantly shorter, but that's counter to the metric of success.
APL (Dyalog), 29 bytes 1 byte header and footer
{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}
With the header ⍬ (an empty vector) and footer ⊃ (right), the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.
APL (Dyalog), 29 bytes 1 byte header and footer
{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}
With the header ⍬ (an empty vector) and footer ⊃ (right), the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.
With a longer header/footer, the body could be significantly shorter, but that's counter to the metric of success.