Result

AC

Duration

1120ms

Code [DL]

[a,b]=(0+require('fs').readFileSync(i=0)).split`
`
for(;i<a;)console.log(`*${'* '[i++&&i<a&1].repeat(b-2)}*`)

stdin

23
83

stdout

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

stderr