Result

AC

Duration

1094ms

Code [DL]

JS{{{process.stdin.on('data',s=>{let[h,w]=(''+s).split(`
`)
for(s=h;s;)console.log(`*${(s--<h&s>0?" ":"*").repeat(w-2)}*`)})}}}

stdin

40
59

stdout

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

stderr