triangular-number-correctness

Status: IN

A run of `n` identical characters contributes exactly `n*(n+1)/2` single-character substrings, and the integer division is always exact because one of `n` or `n+1` is even

Source: entries/2026/06/06/count-substrings-with-only-one-distinct-letter-solution.md

JSON