Problem 1781 · Medium

Sum of Beauty of All Substrings

Sum the difference between highest and lowest positive character frequencies over all substrings.

Open the interactive visualisation