Result

AC

Duration

939ms

Code [DL]

with x(i,j)as(select substr(v,0,instr(v,'
'))+0 as i,substr(v,instr(v,'
')+1)as j from i),c(k)as(values(1)union select k+1 from c limit(select i from x))select case when(k=1 or k=i)then printf('%.'||j||'c','*')else printf('*%.'||(j-2)||'c*',' ')end from x,c

stdin

89
65

stdout

*****************************************************************
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*                                                               *
*****************************************************************

stderr