Minimum number of cells after, before, above and below NxN squares: Difference between revisions

Add BQN
(Add APL)
(Add BQN)
Line 204:
└───┴─────┴─────────────────┴───────────────────┘</pre>
 
=={{header|BQN}}==
<lang bqn>NByN ← (⌽⌊⌽⎉1)∘(⌊⌜˜ ∘↕)
NByN¨ 2‿3‿9‿10</lang>
{{out}}
<pre>┌─
· ┌─ ┌─ ┌─ ┌─
╵ 0 0 ╵ 0 0 0 ╵ 0 0 0 0 0 0 0 0 0 ╵ 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0
┘ 0 0 0 0 1 2 2 2 2 2 1 0 0 1 2 2 2 2 2 2 1 0
┘ 0 1 2 3 3 3 2 1 0 0 1 2 3 3 3 3 2 1 0
0 1 2 3 4 3 2 1 0 0 1 2 3 4 4 3 2 1 0
0 1 2 3 3 3 2 1 0 0 1 2 3 4 4 3 2 1 0
0 1 2 2 2 2 2 1 0 0 1 2 3 3 3 3 2 1 0
0 1 1 1 1 1 1 1 0 0 1 2 2 2 2 2 2 1 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0
┘ 0 0 0 0 0 0 0 0 0 0
┘</pre>
=={{header|C}}==
{{trans|FreeBASIC}}
2,114

edits