Skip to main content
2 of 4
reduced by 3 bytes
BradC
  • 6.8k
  • 1
  • 14
  • 34

#T-SQL, 341 338 bytes

DECLARE @ CHAR(2000)=REPLACE(REPLACE(REPLACE(
'PRINT SPACE(14*6&$6*15&$4*5$4*10&$2*4$7*7$1*4&$1*3$8*4$1*3$3*3&*3$9*4$1*3$4*3&*3$8*4$2*3$4*3&*3$8*4$2*3$4*3&*3$7*4$3*3$4*3&*3$7*4$3*3$4*3&*3$6*11$4*3&*3$6*11$4*3&*3$5*4$5*3$4*3&*3$5*3$6*3$4*3&$1*4$2*4$11*4&$2*8$9*6&$6*17&$6*3)'
,'*',')+REPLICATE(''#'','),'$',')+SPACE('),'&',')+(''
''')EXEC(@)

The first two line breaks are for readability only, the final line break is part of a string literal.

Similar to my Adam West tribute, I've manually encoded a long string, and made the following replacements:

  • *7 gets replaced by +REPLICATE('#',7)
  • $4 gets replaced by +SPACE(4)
  • & gets replaced by a line break inside quotes

This results in a massive SQL command string:

PRINT SPACE(14)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',15)+('
')+SPACE(4)+REPLICATE('#',5)+SPACE(4)+REPLICATE('#',10)+('
')+SPACE(2)+REPLICATE('#',4)+SPACE(7)+REPLICATE('#',7)+SPACE(1)+REPLICATE('#',4)+('
')+SPACE(1)+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(3)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(9)+REPLICATE('#',4)+SPACE(1)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(8)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(7)+REPLICATE('#',4)+SPACE(3)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',11)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',4)+SPACE(5)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+REPLICATE('#',3)+SPACE(5)+REPLICATE('#',3)+SPACE(6)+REPLICATE('#',3)+SPACE(4)+REPLICATE('#',3)+('
')+SPACE(1)+REPLICATE('#',4)+SPACE(2)+REPLICATE('#',4)+SPACE(11)+REPLICATE('#',4)+('
')+SPACE(2)+REPLICATE('#',8)+SPACE(9)+REPLICATE('#',6)+('
')+SPACE(6)+REPLICATE('#',17)+('
')+SPACE(6)+REPLICATE('#',3)

Which, when run, produces the necessary output.

Long, but still better than my best set-based solution (463 bytes):

SELECT SPACE(a)+REPLICATE('#',b)+SPACE(c)+REPLICATE('#',d)
      +SPACE(e)+REPLICATE('#',f)+SPACE(g)+REPLICATE('#',h)
FROM(VALUES(7,0,7,6,0,0,0,0),(6,8,0,7,0,0,0,0),(4,5,4,5,0,5,0,0),(2,4,7,7,1,4,0,0),
           (1,3,8,4,1,3,3,3),(0,3,9,4,1,3,4,3),(0,3,8,4,2,3,4,3),(0,3,8,4,2,3,4,3),
           (0,3,7,4,3,3,4,3),(0,3,7,4,3,3,4,3),(0,3,6,6,0,5,4,3),(0,3,6,6,0,5,4,3),
           (0,3,5,4,5,3,4,3),(0,3,5,3,6,3,4,3),(1,4,2,4,5,0,6,4),(2,8,9,6,0,0,0,0),
           (6,9,0,8,0,0,0,0),(6,3,0,0,0,0,0,0))t(a,b,c,d,e,f,g,h)
BradC
  • 6.8k
  • 1
  • 14
  • 34