6. Let's call the distance between numbers the absolute value of their difference. It is known that the sum of the distances from twelve consecutive natural numbers to some number $a$ is 358, and the sum of the distances from these same twelve numbers to some number $b$ is 212. Find all possible values of $a$, given that $a+b=114.5$.
Answer: $a=\frac{190}{3}$.

Solution. Let the given consecutive natural numbers be denoted as $k, k+1, \ldots, k+11$. Notice that if some number lies on the segment $[k ; k+11]$, then the sum of distances from it to the given twelve numbers does not exceed $11 \cdot 6=66$ (the sum of distances to the two extreme numbers is exactly 11, the sum of distances to $k+1$ and $k+10$ does not exceed 11, the sum of distances to $k+2$ and $k+9$ also does not exceed 11, and so on). Therefore, the numbers $a$ and $b$ lie outside the segment $[k ; k+11]$. Then the sum of distances from the number $a$ to each of the given consecutive numbers is expressed by the formula $|12 a-k-(k+1)-\ldots-(k+11)|=12|a-k-5.5|$. Similarly, the sum of distances from the number $b$ to each of the given numbers is $12|b-k-5.5|$. We obtain the system of equations

$$
\left\{\begin{array} { l } 
{ 1 2 | a - k - 5 , 5 | = 3 5 8 , } \\
{ 1 2 | b - k - 5 , 5 | = 2 1 2 , } \\
{ a + b = 1 1 4 , 5 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
|a-k-5,5|=29 \frac{5}{6} \\
|b-k-5,5|=17 \frac{2}{3} \\
a+b=114,5
\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 segment $[k ; k+11]$. Then

$$
\left\{\begin{array} { l } 
{ a - k - 5 , 5 = 2 9 \frac { 5 } { 6 } } \\
{ b - k - 5 , 5 = 1 7 \frac { 2 } { 3 } , } \\
{ a + b = 1 1 4 , 5 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=63 \frac{1}{3} \\
b=51 \frac{1}{6} \\
k=28
\end{array}\right.\right.
$$

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

$$
\left\{\begin{array} { l } 
{ - a + k + 5 , 5 = 2 9 \frac { 5 } { 6 } , } \\
{ - b + k + 5 , 5 = 1 7 \frac { 2 } { 3 } , } \\
{ a + b = 1 1 4 , 5 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=51 \frac{1}{6} \\
b=63 \frac{1}{3} \\
k=75,5
\end{array}\right.\right.
$$

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

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

$$
\left\{\begin{array} { l } 
{ a - k - 5 , 5 = 2 9 \frac { 5 } { 6 } } \\
{ - b + k + 5 , 5 = 1 7 \frac { 2 } { 3 } , } \\
{ a + b = 1 1 4 , 5 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=81 \\
b=33,5 \\
k=45 \frac{2}{3}
\end{array}\right.\right.
$$

This case also does not fit.

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

$$
\left\{\begin{array} { l } 
{ - a + k + 5 , 5 = 2 9 \frac { 5 } { 6 } } \\
{ b - k - 5 , 5 = 1 7 \frac { 2 } { 3 } , } \\
{ a + b = 1 1 4 , 5 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
a=33,5 \\
b=81 \\
k=57 \frac{5}{6}
\end{array}\right.\right.
$$

This case also does not fit.

Thus, it is possible only that $a=63 \frac{1}{3}=\frac{190}{3}$.