← All problems

Average Pairwise Difference in a Set

Combinatorics · 25th PMO Qualifying Stage 1500
Let $S=\{1,2,\ldots,2023\}$. Suppose that for every two-element subset of $S$, we get the positive difference between the two elements. The average of all of these differences can be expressed as a fraction $\frac{a}{b}$, where $a$ and $b$ are relatively prime integers. Find the sum of the digits of $a+b$.