The K-th Cube Number — Solution & Editorial
Apply the sequence's closed form (or index a precomputed list for Fibonacci / powers).
Complexity: O(1)
Watch out: The result approaches 1018 — 64-bit arithmetic.
Apply the sequence's closed form (or index a precomputed list for Fibonacci / powers).
Complexity: O(1)
Watch out: The result approaches 1018 — 64-bit arithmetic.