  Suppose $n\geq 2$ and $\mathcal{A}_{i}\subset \{0,1,\cdots ,(n-1)\}$ for $
i=1,\cdots ,l,$ let $K_{i}=\bigcup\nolimits_{a\in
\mathcal{A}_{i}}n^{-1}(K_{i}+a)$ be self-similar sets contained in $[0,1].$
Given $ m_{1},\cdots ,m_{l}\in \mathbb{Z}$ with $\prod\nolimits_{i}m_{i}\neq
0,$ we let \begin{equation*} S_{x}=\left\{ \mathbf{(}y_{1},\cdots
,y_{l}\mathbf{)}:m_{1}y_{1}+\cdots +m_{l}y_{l}=x\text{ with }y_{i}\in
K_{i}\text{ }\forall i\right\} . \end{equation*} In this paper, we analyze the
Hausdorff dimension and Hausdorff measure of the following set
\begin{equation*} U_{r}=\{x:\mathbf{Card}(S_{x})=r\}, \end{equation*} where
$\mathbf{Card}(S_{x})$ denotes the cardinality of $S_{x}$, and $r\in
\mathbb{N}^{+}$. We prove under the so-called covering condition that the
Hausdorff dimension of $U_{1}$ can be calculated in terms of some matrix.
Moreover, if $r\geq 2$, we also give some sufficient conditions such that the
Hausdorff dimension of $U_{r}$ takes only finite values, and these values can
be calculated explicitly. Furthermore, we come up with some sufficient
conditions such that the dimensional Hausdorff measure of $U_{r}$ is infinity.
Various examples are provided. Our results can be viewed as the exceptional
results for the classical slicing problem in geometric measure theory.
