Let S be a set of integers such that:
$$S = \left \{\min(\mathbf{C}, a + b - 1) | a \in \left [ \mathbf{A} \right ], b \in \left [ \mathbf{B} \right ] \right \}$$
Note that $\mathbf{A}$, $\mathbf{B}$ and $\mathbf{C}$ are positive integers and we know $\mathbf{A} \leq \mathbf{B} \leq \mathbf{C}$
Also $\left [ x \right ]$ stands for $\left \{ 1, 2, 3, \cdots , x \right \}$
Can you figure out sum of all S elements using $\mathbf{A}$, $\mathbf{B}$ and $\mathbf{C}$ as parameters?
First of all, note that $1\in[\mathbf{A}],[\mathbf{B}]$, thus $\text{min}(\mathbf{C},1+1-1)=1\in S$. Now we only need to now $\text{max}(S)$, because every value in between is also in $S$, i.e. $S=[\text{max}(S)]$.
Obviously, $\text{max}(S)\leq \mathbf{C}$. However, if $\mathbf{A}+\mathbf{B}-1<\mathbf{C}\implies\text{max}(S)=\mathbf{A}+\mathbf{B}-1$.
Putting all of this together, seperating the two cases, we get $$ S = \begin{cases} [\mathbf{C}], & \text{if }\mathbf{A}+\mathbf{B}-1\geq\mathbf{C}, \\ [\mathbf{A}+\mathbf{B}-1], & \text{if }\mathbf{A}+\mathbf{B}-1<\mathbf{C}. \end{cases} $$
The sum over these elements is then given by $$ \sum S = \frac{1}{2}\;\text{max}(S)\cdot(\text{max}(S)+1). $$