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 Revisions

2 of 2
Commonmark migration

Husk, 6 bytes

mΣ∂m↔T

Try it online.

Explanation:

 T # Transpose the (implicit) argument; swapping rows/columns
 m↔ # Reverse each row
 ∂ # Take the anti-diagonals of this matrix
mΣ # And sum each inner anti-diagonal list
 # (after which the result is output implicitly)
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

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