Weighted sum of two dice such that the result is a random integer between $0$ and $35$ 
The numbers shown by 2 dice are labelled $d$ and $e$. $A, B$ and $C$ are constants, giving a score $S=Ad + Be + C$. Find $A, B$ and $C$ such that the range of possible values for $S$ covers all integers from $0$ to $35$, with an equal probability of each score. [Oxford PAT exam, 2011]

I have tried to find equations in terms of $A, B, C$ for different values of $S$.

The maximum value of $S$ (assuming $A,B\geqslant0$) is $6(A+B)+C$, and the minimum value $A+B+C$. This gives us the system of equations
\begin{align}
6A+6B+C &= 35\\
A+B+C &= 0.
\end{align}
Gaussian elimination yields $C=-7$, and therefore $A+B=7$. So $(A,B,C)=(6,1,-7)$ and $(1,6,-7)$. Taking $(A,B,C)=(6,1,-7)$ yields
$$S = 6d + e -7, $$
so that for any $j\in\{0,1,\ldots,35\}$, $$j= 6d_j+e_j-7 $$ where \begin{align}
d_j &= 1 +\left\lfloor \frac {j}6\right\rfloor\\
e_j &= j+7 -6d_j.
\end{align}
