Let d(k) be the number of positive divisors of k. Return d(1) + d(2) + ... + d(n).
For n = 5 the answer is 10 (1 + 2 + 2 + 3 + 2).
The starter code does one step for each number up to n. It is correct but too slow for large n.
Example 1
Input:
sum_divisor_counts(5)
Output:
10
Example 2
Input:
sum_divisor_counts(0)
Output:
0
0 <= n <= 10**12No results yet
Run your code to check it against the examples, or submit to run every test.