Result

WA

Duration

992ms

Code [DL]

h,w=io.read(2,3)for y=1,h do print("*"..(1==y%-~h and"*"or" "):rep(w-2).."*")end

stdin

26
48

stdout

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

stderr