by@paradigm_9
WA
1138ms
JS{{{ process.stdin.on('data',s=>{ var hw=(''+s).split("\n") for(var y=+hw[0];y-->0;)console.log("*"+(y>0&y<+hw[0]?" ":"*").repeat(hw[1]-2)+"*") }) }}}
44 39
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ***************************************