Result

AC

Duration

1077ms

Code [DL]

using static System.Console;class A{static int r()=>int.Parse(ReadLine());static void Main(){for(int h=r(),w=r()-2,y=h--;y-->0;)Write($"*{new string(y%h>0?' ':'*',w)}*
");}}

stdin

71
35

stdout

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

stderr