DoctorSolver

Modular exponentiation

Raise an integer to a power under a modulus.

Open in Flow
Input
0 characters
Output
0 characters

How it works

Repeated squaring and reduction modulo m avoid constructing the full power.

Usage example

3

Maximum input 4,096 bytes · Timeout 5 s

Related tools