  Quantum maximal-distance-separable (MDS) codes form an important class of
quantum codes. It is very hard to construct quantum MDS codes with relatively
large minimum distance. In this paper, based on classical constacyclic codes,
we construct two classes of quantum MDS codes with parameters
$$[[\lambda(q-1),\lambda(q-1)-2d+2,d]]_q$$ where $2\leq d\leq
(q+1)/2+\lambda-1$, and $q+1=\lambda r$ with $r$ even, and
$$[[\lambda(q-1),\lambda(q-1)-2d+2,d]]_q$$ where $2\leq d\leq
(q+1)/2+\lambda/2-1$, and $q+1=\lambda r$ with $r$ odd. The quantum MDS codes
exhibited here have parameters better than the ones available in the
literature.
