Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

1 of 4

APL (Dyalog), 29 bytes 1 byte header and footer

{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}

Try it on TryAPL.org!

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.

AltStyle によって変換されたページ (->オリジナル) /