गणित समस्या हल करें
समीकरणों, व्युत्पन्न, फ़ैक्टर, त्रिकोण, प्राइम्स, सांख्यिकी — या एक शब्द समस्या को अंश में विभाजित करता है.
चरण द्वारा कदम
- 7^{222} \bmod 11
Never compute the huge power. Reduce after every multiplication (repeated squaring).
- 7 \equiv 7 \pmod{11}
Reduce the base first.
- 222 = 11011110_2
Write the exponent in binary: 8 squarings at most.
- 7^2 \equiv 5 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 5 \equiv 5 \pmod{11}
This bit is 1: multiply the result by the current power.
- 5^2 \equiv 3 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 3 \equiv 4 \pmod{11}
This bit is 1: multiply the result by the current power.
- 3^2 \equiv 9 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 9 \equiv 3 \pmod{11}
This bit is 1: multiply the result by the current power.
- 9^2 \equiv 4 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 4 \equiv 1 \pmod{11}
This bit is 1: multiply the result by the current power.
- 4^2 \equiv 5 \pmod{11}
Square the running power.
- 5^2 \equiv 3 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 3 \equiv 3 \pmod{11}
This bit is 1: multiply the result by the current power.
- 3^2 \equiv 9 \pmod{11}
Square the running power.
- r \leftarrow r \cdot 9 \equiv 5 \pmod{11}
This bit is 1: multiply the result by the current power.
- 7^{222} \equiv 5 \pmod{11}
Done.