Result

AC

Duration

1265ms

Code [DL]

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

stdin

26
75

stdout

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

stderr