To solve matrix equation ΣA i XB i =C by the Smith normal form