Skip to main content
2 of 2
added 8 characters in body
MickyT
  • 12.2k
  • 2
  • 26
  • 48

R, 87 88 bytes

Wall blocks represented by an 8, because, well lots of eights.

write(ifelse((I=sapply(scan(),intToBits))[(M=max(which(I>0,T)[,1])):1,],8,' '),1,M,,'')

Try it online!

Input integer list is converted to array of bits which are trimmed of trailing 0 bits and reversed.

The reduced array is then output using write and a column width which was determined when the array was trimmed.

ifelse() is the only IF option that works on vectors unfortunately.

MickyT
  • 12.2k
  • 2
  • 26
  • 48