Skip to main content
added 422 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

CJam, 46 bytes

li:A:B;{A)S*"/ "BA-*'_2A*Bs,+*NA(:A}g"\\/"B*SB

Try it online!

Port of my Python answer

Explanation:

li            take input as integer
:A:B;         assign that to the variables A and B
{             start of while A loop
A)S*          push A-1 spaces
"/ "BA-*      push B-A strings of "/ "
'_2A*Bs,+*    push 2A + the number of digits _
N             push a newline
A(:A          decrement A
}g            end of while loop
"\\/"B*       push B \/
SB            push B after a space

CJam, 46 bytes

li:A:B;{A)S*"/ "BA-*'_2A*Bs,+*NA(:A}g"\\/"B*SB

Try it online!

Port of my Python answer

CJam, 46 bytes

li:A:B;{A)S*"/ "BA-*'_2A*Bs,+*NA(:A}g"\\/"B*SB

Try it online!

Port of my Python answer

Explanation:

li            take input as integer
:A:B;         assign that to the variables A and B
{             start of while A loop
A)S*          push A-1 spaces
"/ "BA-*      push B-A strings of "/ "
'_2A*Bs,+*    push 2A + the number of digits _
N             push a newline
A(:A          decrement A
}g            end of while loop
"\\/"B*       push B \/
SB            push B after a space
Source Link
Dion
  • 4k
  • 12
  • 42

CJam, 46 bytes

li:A:B;{A)S*"/ "BA-*'_2A*Bs,+*NA(:A}g"\\/"B*SB

Try it online!

Port of my Python answer