power-of-three-magic-constant

Status: IN

The constant 1162261467 equals 3^19, the largest power of 3 below 2^31, and is load-bearing for correctness — if the input domain expanded beyond 32-bit signed integers, this constant would need to change.

Source: entries/2026/06/06/power-of-three-solution.md

JSON