by@paradigm_9
WA
1633ms
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');}}
36 67
************************************ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ************************************