Result

AC

Duration

998ms

Code [DL]

with x(v,j,k)as(select v,substr(v,3)-2 j,1 k from i union select v,j,k+1 from x where v-k)select printf('*%.'||j||'c*',case when(k in(1,v+0))then'*'else' 'end)from x

stdin

12
82

stdout

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

stderr