Result

WA

Duration

1011ms

Code [DL]

w,h=int(input()),int(input())-2
print("*"*w+f'\n*{" "*(w-2)}*\n'*h+"*"*w)

stdin

45
39

stdout

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

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

*                                           *

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

stderr