Result

AC

Duration

2018ms

Code [DL]

interface A{static void main(String[]a){var s=new java.util.Scanner(System.in);for(int p=s.nextInt(),q=s.nextInt(),i=0;i<p;)System.out.print("*"+(++i%p>1?" ":"*").repeat(q-2)+"*\n");}}

stdin

72
38

stdout

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

stderr