The fraction $\tfrac1{2015}$ has a unique "(restricted) partial fraction decomposition'' of the form \[\dfrac1{2015}=\dfrac a5+\dfrac b{13}+\dfrac c{31},\] where $a$, $b$, and $c$ are integers with $0\leq a<5$ and $0\leq b<13$.  Find $a+b$.
1. We start with the given equation:
   \[
   \frac{1}{2015} = \frac{a}{5} + \frac{b}{13} + \frac{c}{31}
   \]
   To combine the fractions on the right-hand side, we need a common denominator, which is \(2015\) (since \(2015 = 5 \times 13 \times 31\)).

2. Rewrite the right-hand side with the common denominator:
   \[
   \frac{a}{5} + \frac{b}{13} + \frac{c}{31} = \frac{a \cdot 403 + b \cdot 155 + c \cdot 65}{2015}
   \]
   Therefore, we have:
   \[
   \frac{1}{2015} = \frac{403a + 155b + 65c}{2015}
   \]
   This implies:
   \[
   403a + 155b + 65c = 1
   \]

3. To find \(b\), we take the equation modulo \(13\):
   \[
   403a + 155b + 65c \equiv 1 \pmod{13}
   \]
   Since \(403 \equiv 0 \pmod{13}\), \(155 \equiv 12 \pmod{13}\), and \(65 \equiv 0 \pmod{13}\), the equation simplifies to:
   \[
   12b \equiv 1 \pmod{13}
   \]
   We need to find the multiplicative inverse of \(12\) modulo \(13\). The inverse of \(12\) modulo \(13\) is \(12\) because:
   \[
   12 \times 12 \equiv 144 \equiv 1 \pmod{13}
   \]
   Therefore:
   \[
   b \equiv 12 \pmod{13}
   \]
   Given the restriction \(0 \leq b < 13\), we have:
   \[
   b = 12
   \]

4. Next, we find \(a\) by taking the original equation modulo \(5\):
   \[
   403a + 155b + 65c \equiv 1 \pmod{5}
   \]
   Since \(403 \equiv 3 \pmod{5}\), \(155 \equiv 0 \pmod{5}\), and \(65 \equiv 0 \pmod{5}\), the equation simplifies to:
   \[
   3a \equiv 1 \pmod{5}
   \]
   We need to find the multiplicative inverse of \(3\) modulo \(5\). The inverse of \(3\) modulo \(5\) is \(2\) because:
   \[
   3 \times 2 \equiv 6 \equiv 1 \pmod{5}
   \]
   Therefore:
   \[
   a \equiv 2 \pmod{5}
   \]
   Given the restriction \(0 \leq a < 5\), we have:
   \[
   a = 2
   \]

5. Finally, we substitute \(a = 2\) and \(b = 12\) back into the original equation to solve for \(c\):
   \[
   403(2) + 155(12) + 65c = 1
   \]
   Simplifying, we get:
   \[
   806 + 1860 + 65c = 1
   \]
   \[
   2666 + 65c = 1
   \]
   \[
   65c = 1 - 2666
   \]
   \[
   65c = -2665
   \]
   \[
   c = -41
   \]

6. The values of \(a\), \(b\), and \(c\) are \(2\), \(12\), and \(-41\) respectively. We are asked to find \(a + b\):
   \[
   a + b = 2 + 12 = 14
   \]

The final answer is \(\boxed{14}\).