Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
³‘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.
⁸‘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.
⁸‘X’¤þ`ṂƤ€Z$⁺ṄS⁺
Sorry, I forgot the "and the sum" part... Fixed now at +3 bytes.