Problem 3128 · Medium

Right Triangles

Count right triangles by summing, for each 1, the other 1s in its row times the other 1s in its column.

Open the interactive visualisation