Result

AC

Duration

1089ms

Code [DL]

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

stdin

55
58

stdout

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

stderr