New answers tagged

1

APL (Dyalog Extended), 11 bytes {⍵ ⍵⍴1,⍵/0} Try it online! Just for fun dfn submission ⍵/0 replicate ⍵ zeros 1, prepend a 1 ⍵ ⍵⍴ mold to ⍵×⍵ square So like for left argument 4 it will construct 1 0 0 0 0 And molding cycles from the beginning so, it will generate 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 the 4×4 identity matrix.


1

CSASM v2.5.0.2, 306 bytes func a: dup dup ldelem 0 pop $3 ldelem 1 pop $4 ldelem 2 pop $5 dup dup ldelem 0 pop $a ldelem 1 pop $1 ldelem 2 pop $2 push $1 push $5 mul push $2 push $4 mul sub push $2 push $3 mul push $a push $5 mul sub push $a push $4 mul push $1 push $3 mul sub push 3 newarr f32 pop $a push $a swap stelem 2 push $a swap stelem 1 push $a swap ...


1

TI-BASIC, 75 73 71 bytes -4 bytes thanks to @MarcMush Not 71 characters -- TI-BASIC is tokenized. :Prompt A,B :Disp {ʟA(2)ʟB(3)-ʟA(3)ʟB(2),ʟA(3)ʟB(1)-ʟA(1)ʟB(3),ʟA(1)ʟB(2)-ʟA(2)ʟB(1 There's a decent chance I could make this smaller; this is just a minified version of something I keep on my graphing calculator. Usage example: pgrmX A=?{1,2,3} B=?{0,1,0} ...


Top 50 recent answers are included