Result

AC

Duration

1226ms

Code [DL]

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

stdin

14
46

stdout

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

stderr