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