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 Answer

Commonmark migration
Source Link

##QBIC, 44 bytes

QBIC, 44 bytes

::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X

Explanation

::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.

##QBIC, 44 bytes

::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X

Explanation

::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.

QBIC, 44 bytes

::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X

Explanation

::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.
Source Link
steenbergh
  • 8.2k
  • 1
  • 27
  • 43

##QBIC, 44 bytes

::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X

Explanation

::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.

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