Skip to main content
deleted 1 character in body
Source Link
xsot
  • 5.6k
  • 1
  • 17
  • 24

C, (126125 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b++i>a+b?i=! ++j,"\n":"%*d",strlen(s)*2,(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to twice length of the input string.

C, (126 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s)*2,(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to twice length of the input string.

C, (125 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(++i>a+b?i=!++j,"\n":"%*d",strlen(s)*2,(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to twice length of the input string.

added 4 characters in body
Source Link
xsot
  • 5.6k
  • 1
  • 17
  • 24

C, (124126 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s)*2,(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to thetwice length of the input string.

C, (124 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s),(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to the length of the input string.

C, (126 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s)*2,(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to twice length of the input string.

added 63 characters in body
Source Link
xsot
  • 5.6k
  • 1
  • 17
  • 24

C, (126124 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;i=++i<a+b?i:puts("")>++j;j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s),(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to the length of the input string.

C, (126 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;i=++i<a+b?i:puts("")>++j)printf("%*d",strlen(s),(i<a?a:b)*(j<b?b:a));} 

Each cell is padded with spaces to the length of the input string.

C, (124 - 3) bytes

i,j,a;main(b,s){for(sscanf(gets(s),"%d %d",&a,&b);j<a+b;)printf(i++>=a+b?i=! ++j,"\n":"%*d",strlen(s),(i<a?a:b)*(j<b?b:a));} 

Input is taken as two space-separated integers on the same line. Each cell is padded with spaces to the length of the input string.

Source Link
xsot
  • 5.6k
  • 1
  • 17
  • 24
Loading