The summation of number of divisors of the divisors of factorial n

Правка en1, от Sukarna_Paul, 2019-02-15 15:40:14

This problem is from ACM ICPC Dhaka Regional 2018 (Contest Link)

How can I approach for this problem?

Problem Satement:

The function d(n) denotes the number of positive divisors of an integer n. For example d(24) = 8, because there are 8 divisors of 24 and they are 1, 2, 3, 4, 6, 8, 12 and 24. The function sndd(n) is a new function defined for this problem. This denotes “The summation of number of divisors of the divisors” of an integer n. For example,

sndd(24) = d(1) + d(2) + d(3) + d(4) + d(6) + d(8) + d(12) + d(24) = 1 + 2 + 2 + 3 + 4 + 4 + 6 + 8 = 30.

Given the value of n, you will have to find sndd(n!), here n! means factorial of n. So n! = 1 × 2 × 3 × … × n.

Input The input contains at most 1000 lines of test cases. Each line contains a single integer that denotes a value of n (1 ≤ n ≤ 10^6). Input is terminated by a line containing a single zero.

Output For each line of input produce one line of output. This line contains an integer that denotes the modulo 10000007 (or 10^7 + 7) value of sndd(n).

Sample Input 4 5 0

Sample Output 30 90 История

Правки Rev. Язык Кто Когда Δ Комментарий
en1 Sukarna_Paul 2019-02-15 15:40:14 1199 Initial revision (published)