The positive integer $m$ is a multiple of 111, and the positive integer $n$ is a multiple of 31. Their sum is 2017. Find $n - m$.
1. Let \( m = 111x \) and \( n = 31y \), where \( x \) and \( y \) are positive integers.
2. Given that \( m + n = 2017 \), we substitute \( m \) and \( n \) into the equation:
   \[
   111x + 31y = 2017
   \]
3. We need to find integer solutions for \( x \) and \( y \). To do this, we can use the method of solving Diophantine equations. First, we solve for \( y \) in terms of \( x \):
   \[
   31y = 2017 - 111x
   \]
   \[
   y = \frac{2017 - 111x}{31}
   \]
4. For \( y \) to be an integer, \( 2017 - 111x \) must be divisible by 31. We check the divisibility:
   \[
   2017 \equiv 111x \pmod{31}
   \]
   Simplifying \( 111 \mod 31 \):
   \[
   111 \div 31 = 3 \quad \text{remainder} \quad 18 \quad \Rightarrow \quad 111 \equiv 18 \pmod{31}
   \]
   Thus, the equation becomes:
   \[
   2017 \equiv 18x \pmod{31}
   \]
5. Next, we simplify \( 2017 \mod 31 \):
   \[
   2017 \div 31 = 65 \quad \text{remainder} \quad 2 \quad \Rightarrow \quad 2017 \equiv 2 \pmod{31}
   \]
   So, we have:
   \[
   2 \equiv 18x \pmod{31}
   \]
6. To solve for \( x \), we need the multiplicative inverse of 18 modulo 31. We use the Extended Euclidean Algorithm:
   \[
   31 = 1 \cdot 18 + 13
   \]
   \[
   18 = 1 \cdot 13 + 5
   \]
   \[
   13 = 2 \cdot 5 + 3
   \]
   \[
   5 = 1 \cdot 3 + 2
   \]
   \[
   3 = 1 \cdot 2 + 1
   \]
   \[
   2 = 2 \cdot 1 + 0
   \]
   Back-substituting to find the inverse:
   \[
   1 = 3 - 1 \cdot 2
   \]
   \[
   1 = 3 - 1 \cdot (5 - 1 \cdot 3) = 2 \cdot 3 - 1 \cdot 5
   \]
   \[
   1 = 2 \cdot (13 - 2 \cdot 5) - 1 \cdot 5 = 2 \cdot 13 - 5 \cdot 5
   \]
   \[
   1 = 2 \cdot 13 - 5 \cdot (18 - 1 \cdot 13) = 7 \cdot 13 - 5 \cdot 18
   \]
   \[
   1 = 7 \cdot (31 - 1 \cdot 18) - 5 \cdot 18 = 7 \cdot 31 - 12 \cdot 18
   \]
   Thus, the inverse of 18 modulo 31 is \(-12 \equiv 19 \pmod{31}\).
7. Using the inverse, we solve for \( x \):
   \[
   2 \cdot 19 \equiv 18x \cdot 19 \pmod{31}
   \]
   \[
   38 \equiv x \pmod{31}
   \]
   \[
   x \equiv 7 \pmod{31}
   \]
   So, \( x = 7 \) is a solution.
8. Substituting \( x = 7 \) back into the equations for \( m \) and \( n \):
   \[
   m = 111 \cdot 7 = 777
   \]
   \[
   n = 2017 - 777 = 1240
   \]
9. Finally, we find \( n - m \):
   \[
   n - m = 1240 - 777 = 463
   \]

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