Result

WA

Duration

1633ms

Code [DL]

import std.stdio,std.conv,std.string;void main(){for(int w=readln.chomp.to!int,h=readln.chomp.to!int,i=++w*h;i--;){write((-~i%w>2)&(i>w)&(i<w*h-w)?' ':i%w?'*':'\n');}}

stdin

36
67

stdout

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

stderr