Result

AC

Duration

1910ms

Code [DL]

h,w=`dd`.split.map &.to_i;puts q="*"*w,"*#{" "*(w-2)}*
"*(h-2),q

stdin

18
49

stdout

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

stderr

0+1 records in
0+1 records out
6 bytes copied, 4.7e-05 s, 128 kB/s