Skip to main content
Saving more stuff
Source Link
Veskah
  • 4.1k
  • 13
  • 29

PowerShell,   93 91 9090 89 bytes

-2 Thanks to ASCII-only for pointing out extra parens
-1 Thanks to Mazzy for tweaking swap logic

param($n)0..--$n|%{"|("[!($x=$n-eq$_$x=($n-or!$_)*$_)]+($y=" "*($n-$_+1))+"/"+"  "*$_+"\$y"+"|)"[$x]"[!$x]}

Try it online!Try it online!

Trying to tweak thatTrying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes. There is a better $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytesbut it isn't much cheaper.

PowerShell, 93 91 90 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+"  "*$_+"\$y"+"|)"[$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

PowerShell,   93 91 90 89 bytes

-2 Thanks to ASCII-only for pointing out extra parens
-1 Thanks to Mazzy for tweaking swap logic

param($n)0..--$n|%{"|("[!($x=($n-$_)*$_)]+($y=" "*($n-$_+1))+"/"+"  "*$_+"\$y"+"|)"[!$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes. There is a better $x= but it isn't much cheaper.

Two spaces is the same as one space twice
Source Link
Veskah
  • 4.1k
  • 13
  • 29

PowerShell, 93 9191 90 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+" "*$_*2+"\$y"+"| "*$_+"\$y"+"|)"[$x]}

Try it online!Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

PowerShell, 93 91 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+" "*$_*2+"\$y"+"|)"[$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

PowerShell, 93 91 90 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+"  "*$_+"\$y"+"|)"[$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

Saving stuff
Source Link
Veskah
  • 4.1k
  • 13
  • 29

PowerShell, 9393 91 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+" "*($_*2)+"\$y"+"|"*$_*2+"\$y"+"|)"[$x]}

Try it online!Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

PowerShell, 93 bytes

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+" "*($_*2)+"\$y"+"|)"[$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

PowerShell, 93 91 bytes

-2 Thanks to ASCII-only for pointing out extra parens

param($n)0..--$n|%{"|("[($x=$n-eq$_-or!$_)]+($y=" "*($n-$_+1))+"/"+" "*$_*2+"\$y"+"|)"[$x]}

Try it online!

Trying to tweak that $x= bit. There's probably a smarter way to get the 1st and last line out in a few less bytes.

Source Link
Veskah
  • 4.1k
  • 13
  • 29
Loading