6. Let's call the distance between numbers the absolute value of their difference. It is known that the sum of the distances from thirty-three consecutive natural numbers to some number $a$ is 3168, and the sum of the distances from these same thirty-three numbers to some number $b$ is 924. Find all possible values of $a$, given that $a+b=120$.
Answer: $a=26, a=-2, a=122$.

Solution. Let the given sequence of consecutive natural numbers be denoted as $k, k+1, \ldots, k+32$. Note that if some number lies on the interval $[k ; k+32]$, then the sum of the distances from it to these thirty-three numbers does not exceed $\frac{33}{2} \cdot 32=528$ (the sum of the distances to the two extreme numbers is exactly 32, the sum of the distances to $k+1$ and $k+31$ does not exceed 32, the sum of the distances to $k+2$ and $k+30$ also does not exceed 32, and so on; the distance to $k+16$ does not exceed half the length of the interval between the extreme numbers, i.e., 16). Therefore, the numbers $a$ and $b$ lie outside the interval $[k ; k+32]$. Then the sum of the distances from the number $a$ to each of the given consecutive numbers is expressed by the formula $|33 a-k-(k+1)-\ldots-(k+32)|=33|a-k-16|$. Similarly, the sum of the distances from the number $b$ to each of the given numbers is $33|b-k-16|$. We obtain the system of equations

$$
\left\{\begin{array} { l } 
{ 3 3 | a - k - 1 6 | = 3 1 6 8 , } \\
{ 3 3 | b - k - 1 6 | = 9 2 4 , } \\
{ a + b = 1 2 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
|a-k-16|=96 \\
|b-k-16|=28 \\
a+b=120
\end{array}\right.\right.
$$

Consider four cases for the removal of the modulus.

1) Both numbers $a$ and $b$ lie to the right of the interval $[k ; k+32]$. Then

$$
\left\{\begin{array} { l } 
{ a - k - 1 6 = 9 6 , } \\
{ b - k - 1 6 = 2 8 , } \\
{ a + b = 1 2 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=94 \\
b=26 \\
k=-18
\end{array}\right.\right.
$$

Since $k$ must be a natural number, this case does not fit.

2) Both numbers $a$ and $b$ lie to the left of the interval $[k ; k+32]$. Then

$$
\left\{\begin{array} { l } 
{ - a + k + 1 6 = 9 6 , } \\
{ - b + k + 1 6 = 2 8 , } \\
{ a + b = 1 2 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=26 \\
b=94 \\
k=106
\end{array}\right.\right.
$$

3) The number $a$ lies to the right, and $b$ to the left of the interval $[k ; k+32]$. Then

$$
\left\{\begin{array} { l } 
{ a - k - 1 6 = 9 6 , } \\
{ - b + k + 1 6 = 2 8 , } \\
{ a + b = 1 2 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=122 \\
b=-2 \\
k=10
\end{array}\right.\right.
$$

4) The number $b$ lies to the right, and $a$ to the left of the interval $[k ; k+32]$. Then

$$
\left\{\begin{array} { l } 
{ - a + k + 1 6 = 9 6 , } \\
{ b - k - 1 6 = 2 8 , } \\
{ a + b = 1 2 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=-2 \\
b=122 \\
k=78
\end{array}\right.\right.
$$

Thus, there are three possible cases: $a=26, a=122, a=-2$.