  The symbol-pair code is a new coding framework proposed to guard against
pair-errors in symbol-pair read channels. Especially, a symbol-pair code with
the parameters achieving the Singleton-type bound is called an MDS symbol-pair
code. In this paper, inspiring by the classical construction for Reed-Solomon
codes, for any $3\le k<m\le q-2$ and
$m_1=\Big\lfloor{\tiny\frac{m}{\lfloor\frac{k-1}{2}\rfloor}}\Big\rfloor$, we
construct a class of $q$-ary MDS symbol-pair codes with dimension $k$ and
length $n$ $(n=m+m_1, m+m_1-1)$, where $q$ is a prime power. Furthermore, for
$k\in\{3,4\}$, the symbol-pair weight distributions for these codes are
determined by enumerating the number of polynomials with given roots.
