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 2
ngn
  • 15.6k
  • 2
  • 45
  • 90

APL (Dyalog Classic), 23 bytes

{∧/1=1↓(⊃∨⊢)1⌈4⌽,⍵}⌺3 3

Try it online!

doesn't support matrices smaller than 3x3 due to a bug in the interpreter

ngn
  • 15.6k
  • 2
  • 45
  • 90

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