by@henkma
AC
1094ms
main(w,h,i){scanf("%d%d",&h,&w);for(i=++w*h;i--;)putchar(~i%w/3&~(i/w)%h/2?32:i%w?42:10);}
47 36
************************************ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ************************************
/tmp/code.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int] main(w,h,i){scanf("%d%d",&h,&w);for(i=++w*h;i--;)putchar(~i%w/3&~(i/w)%h/2?32:i%w?42:10);} ^~~~ /tmp/code.c: In function 'main': /tmp/code.c:1:1: warning: type of 'w' defaults to 'int' [-Wimplicit-int] /tmp/code.c:1:1: warning: type of 'h' defaults to 'int' [-Wimplicit-int] /tmp/code.c:1:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] /tmp/code.c:1:13: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] main(w,h,i){scanf("%d%d",&h,&w);for(i=++w*h;i--;)putchar(~i%w/3&~(i/w)%h/2?32:i%w?42:10);} ^~~~~ /tmp/code.c:1:13: warning: incompatible implicit declaration of built-in function 'scanf' /tmp/code.c:1:13: note: include '<stdio.h>' or provide a declaration of 'scanf' +#include <stdio.h> main(w,h,i){scanf("%d%d",&h,&w);for(i=++w*h;i--;)putchar(~i%w/3&~(i/w)%h/2?32:i%w?42:10);} ^~~~~ /tmp/code.c:1:50: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] main(w,h,i){scanf("%d%d",&h,&w);for(i=++w*h;i--;)putchar(~i%w/3&~(i/w)%h/2?32:i%w?42:10);} ^~~~~~~