HDU2879 HeHe 题解 (思路过程讲解+代码)
思路过程:
∵x2≡x ( mod n)\because x^2 \equiv x \ (\bmod \ n)∵x2≡x (mod n)
∴x2−x≡0 ( mod n)\therefore x^2 - x \equiv 0 \ (\bmod \ n)∴x2−x≡0 (mod n)
∴x(x−1)≡0 ( mod n)\therefore x \times (x - 1) \equiv 0 \ (\bmod \ n)∴x(x−1)…
2026/7/30 17:16:27