Result

AC

Duration

1114ms

Code [DL]

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

stdin

71
86

stdout

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

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);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
 ^
/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);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
   ^
/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);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
     ^
/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);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
         ^
/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);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
           ^~~~
/tmp/code.c: In function 'main':
/tmp/code.c:2:91: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
 w,h,y=0,x;main(){scanf("%d\n%d",&h,&w);for(;y++<h;){printf("*");for(x=0;x<w-2;x++)printf(y>1&y<h?" ":"*");printf("*\n");}}
                                                                                          ~^~