Modular arithmetic problems. CF: 687B, GYM100825A.