Result

WA

Duration

1679ms

Code [DL]

class A{
  public static void main(String[]a){
    var s=new java.util.Scanner(System.in);
    int h=s.nextInt();
    int w=s.nextInt();
    System.out.println("#".repeat(w));
    for(int y=0;y<h-2;y++)System.out.println("#"+" ".repeat(w-2)+"#");
    System.out.println("#".repeat(w));
  }
}

stdin

15
92

stdout

############################################################################################
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
#                                                                                          #
############################################################################################

stderr