Result

AC

Duration

1088ms

Code [DL]

process.stdin.on('data',s=>a=s.toString().split('\n')).on('end',()=>{for(i=0;i<+a[0];i++)console.log('*'+(i==0||i==a[0]-1?'*':' ').repeat(a[1]-2)+'*')})

stdin

55
25

stdout

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

stderr