This problem is used in private contest:模运算、递推