Solve any maths problem
Equations, derivatives, integrals, matrices, triangles, primes, statistics — or a word problem the tutor breaks into parts.
Step by step
- 7^{2} \bmod 12
Never compute the huge power. Reduce after every multiplication (repeated squaring).
- 7 \equiv 7 \pmod{12}
Reduce the base first.
- 2 = 10_2
Write the exponent in binary: 2 squarings at most.
- 7^2 \equiv 1 \pmod{12}
Square the running power.
- r \leftarrow r \cdot 1 \equiv 1 \pmod{12}
This bit is 1: multiply the result by the current power.
- 7^{2} \equiv 1 \pmod{12}
Done.
Reveal the answer
7^{2} \bmod 12 = 1