Skip to main content
added 229 characters in body
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!

------

I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Verification for side length 2.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!

------

I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!

------

I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Verification for side length 2.

deleted 9 characters in body
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!Try it online!


 

------

Sorry, I forgot the "and the sum" part..I made a terrible mistake. Fixed now at +3 bytesNo idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


 

Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

³‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!

------

I made a terrible mistake. No idea why no-one noticed that.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

The `⁸` was for the nilad.
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Jelly, 16 bytes

⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺

Try it online!


Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.

Full program. Prints the array and the sum.

Not uniform, of course. Return all-zero most of the time.

Rollback to Revision 2
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70
Loading
added 47 characters in body
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70
Loading
added 131 characters in body
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70
Loading
Source Link
user202729
  • 17.4k
  • 2
  • 37
  • 70
Loading