Status: IN
The `while n: n //= k` loop terminates in O(log_k(n)) iterations for k >= 2 because integer division by k >= 2 strictly decreases a positive n toward zero.
Source: entries/2026/06/06/sum-of-digits-in-base-k-solution.md
JSON