LC 50
Pow(x, n)
Medium · LC 1–100
Candidate solution routes
Primary
FreeModular arithmetic and fast power
Invariant: During binary power, result*base^exp remains congruent to the original target; each step consumes one bit.
candidate confidence: 0.565 · metadata_only
How to use this page
Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.