Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 9 characters in body
Source Link

C (gcc), (削除) 105 (削除ここまで)(削除) 103 (削除ここまで) 9695 bytes

i,j,k;f(int o[6][5][6]o[][5][6]){for(i=6;i;)for(o[--i][4][5]=j=k=-1;j<60;)++j&1<<i?o[i][++k%5][k/5]=j:0;}

Try it online! Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Saved 2 bytes thanks to Kevin Cruijssen.

Saved 7(削除) 7 (削除ここまで) 8 bytes thanks to Arnauld.

C (gcc), (削除) 105 (削除ここまで)(削除) 103 (削除ここまで) 96 bytes

i,j,k;f(int o[6][5][6]){for(i=6;i;)for(o[--i][4][5]=j=k=-1;j<60;)++j&1<<i?o[i][++k%5][k/5]=j:0;}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Saved 2 bytes thanks to Kevin Cruijssen.

Saved 7 bytes thanks to Arnauld.

C (gcc), 95 bytes

i,j,k;f(int o[][5][6]){for(i=6;i;)for(o[--i][4][5]=j=k=-1;j<60;)++j&1<<i?o[i][++k%5][k/5]=j:0;}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Saved 2 bytes thanks to Kevin Cruijssen.

Saved (削除) 7 (削除ここまで) 8 bytes thanks to Arnauld.

Saved 7 bytes thanks to Arnauld.
Source Link

C (gcc), (削除) 105 (削除ここまで) 103(削除) 103 (削除ここまで) 96 bytes

fi,j,k;f(int o[6][5][6]){for(int i=0,j,k;i<6;++ii=6;i;)for(o[i][4][5]=o[-1,j=k=0;j<60;-i][4][5]=j=k=-1;j<60;)++j&1<<i?o[i][k%5][k++o[i][++k%5][k/5]=j:0;}

Try it online! Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Saved 2 bytes thanks to Kevin Cruijssen.

Saved 7 bytes thanks to Arnauld.

C (gcc), (削除) 105 (削除ここまで) 103 bytes

f(int o[6][5][6]){for(int i=0,j,k;i<6;++i)for(o[i][4][5]=-1,j=k=0;j<60;)++j&1<<i?o[i][k%5][k++/5]=j:0;}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

C (gcc), (削除) 105 (削除ここまで) (削除) 103 (削除ここまで) 96 bytes

i,j,k;f(int o[6][5][6]){for(i=6;i;)for(o[--i][4][5]=j=k=-1;j<60;)++j&1<<i?o[i][++k%5][k/5]=j:0;}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Saved 2 bytes thanks to Kevin Cruijssen.

Saved 7 bytes thanks to Arnauld.

Saved 2 bytes thanks to Kevin Cruijssen.
Source Link

C (gcc), 105(削除) 105 (削除ここまで) 103 bytes

f(int o[6][5][6]){for(int i=0,j,k;i<6;++i){for(o[i][4][5]=-1;for(1,j=k=0;j<60;)++j&1<<i?o[i][k%5][k++/5]=j:0;}}

Try it online! Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

C (gcc), 105 bytes

f(int o[6][5][6]){for(int i=0,j,k;i<6;++i){o[i][4][5]=-1;for(j=k=0;j<60;)++j&1<<i?o[i][k%5][k++/5]=j:0;}}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

C (gcc), (削除) 105 (削除ここまで) 103 bytes

f(int o[6][5][6]){for(int i=0,j,k;i<6;++i)for(o[i][4][5]=-1,j=k=0;j<60;)++j&1<<i?o[i][k%5][k++/5]=j:0;}

Try it online!

Returns the matrices as a 3D int array in o.

The last 4 matrices have -1 as their last value.

Source Link
Loading

AltStyle によって変換されたページ (->オリジナル) /