Result

WA

Duration

1040ms

Code [DL]

#include<stdio.h>
w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}

stdin

80
63

stdout

**************************************************************U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
*                                                             U*
**************************************************************U*

stderr

/tmp/code.c:2:1: warning: data definition has no type or storage class
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
 ^
/tmp/code.c:2:1: warning: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
/tmp/code.c:2:3: warning: type defaults to 'int' in declaration of 'h' [-Wimplicit-int]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
   ^
/tmp/code.c:2:5: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
     ^
/tmp/code.c:2:9: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
         ^
/tmp/code.c:2:11: warning: return type defaults to 'int' [-Wimplicit-int]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
           ^~~~
/tmp/code.c: In function 'main':
/tmp/code.c:2:68: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
                                                                    ^~~~~~
/tmp/code.c:2:68: warning: incompatible implicit declaration of built-in function 'memset'
/tmp/code.c:2:68: note: include '<string.h>' or provide a declaration of 'memset'
+#include <string.h>
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
                                                                    ^~~~~~
/tmp/code.c:2:78: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);char b[w];w-=2;for(;y++<h;){memset(b,y>1&y<h?' ':'*',w);printf("*%s*\n",b);}}
                                                                             ~^~