Skip to main content
added 1 character in body
Source Link
Jonah
  • 33.8k
  • 4
  • 40
  • 94

J, 38 34 bytes

3 3(1 e.+/,4&{)@,;._3^:31*/~0=i:62

Try it online!

-3 bytes thanks to ngn

-1 byte thanks to Bubbler

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubesSubArrays, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 34 bytes

3 3(1 e.+/,4&{)@,;._3^:31*/~0=i:62

Try it online!

-3 bytes thanks to ngn

-1 byte thanks to Bubbler

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 34 bytes

3 3(1 e.+/,4&{)@,;._3^:31*/~0=i:62

Try it online!

-3 bytes thanks to ngn

-1 byte thanks to Bubbler

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has SubArrays, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

added 284 characters in body
Source Link
Jonah
  • 33.8k
  • 4
  • 40
  • 94

J, 38 3534 bytes

3 3(1 e.+/,4&{)@,;._3^:31]*31*/~0=i:62

Try it online!

-3 bytes thanks to ngn

-1 byte thanks to Bubbler

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 35 bytes

3 3(1 e.+/,4&{)@,;._3^:31]*/~0=i:62

-3 bytes thanks to ngn

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 34 bytes

3 3(1 e.+/,4&{)@,;._3^:31*/~0=i:62

Try it online!

-3 bytes thanks to ngn

-1 byte thanks to Bubbler

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

added 35 characters in body
Source Link
Jonah
  • 33.8k
  • 4
  • 40
  • 94

J, 3838 35 bytes

3 3(1 e.+/,4&{)@,;._3^:31]7812=i.,~12531]*/~0=i:62

Try it online!-3 bytes thanks to ngn

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 bytes

3 3(1 e.+/,4&{)@,;._3^:31]7812=i.,~125

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

J, 38 35 bytes

3 3(1 e.+/,4&{)@,;._3^:31]*/~0=i:62

-3 bytes thanks to ngn

Try it online!

Core ideas taken from Bubbler's elegant APL answer -- be sure to upvote him.

This was an experiment to see how close I could get using J, which lack's APL diamond operator and so is at a disadvantage.

Instead, J has MaxCubes, which requires you to manually add the padding of zeros. I opted here to add all the padding at once, up front: a 125 x 125 matix of zeros with a 1 in the center.

After each iteration, we'll lose 2 from our dimension, so after 31 iterations we'll be down to 63 x 63, which is what we need.

Source Link
Jonah
  • 33.8k
  • 4
  • 40
  • 94
Loading