Runic Enchantments, 19 bytes
qA,r\;>i:l͍'
$ka$L
Outputs with a trailing newline because its cheaper to loop and wait for stack underflow to cause program termination than to figure out if anything's left on the stack to print. As such the required terminator ; goes unexecuted.
Inputs that are not capable of being square are output as tall rectangles, as computation required to coerce a square through trailing spaces aren't necessary due to challenge spec regarding inputs.
Draco18s no longer trusts SE
- 3.4k
- 15
- 26