Result

AC

Duration

1184ms

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)}*\n");}}

stdin

46
61

stdout

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

stderr