Sum of Distinct Floor Divisions

Asked at Amazon · Coding Questions · Difficulty: Medium

For a positive integer `n`, item `n` depends on day `x` if there exists a positive integer `k` with `floor(n / k) = x`. Return the sum of all the distinct day numbers `x` that `n` depends on.

Loading the problem…