For a large integer $m$, we obtain asymptotic formulae for the number of solutions of certain congruences modulo $m$ with several variables, where the variables belong to special sets of residue classes modulo $m$. In particular, we obtain new information on the exceptional set of the multiplication table problem in the residue ring modulo $m$.