Problem:
Score : 300 points

Problem Statement

You are given an integer N.
Find the number of the positive divisors of N!, modulo 10^9+7.

Constraints

1≤N≤10^3

Input

The input is given from Standard Input in the following format:

N

Output

Print the number of the positive divisors of N!, modulo 10^9+7.

Sample Input 1

3

Sample Output 1

4

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

Sample Input 2

6

Sample Output 2

30

Sample Input 3

1000

Sample Output 3

972926972

Solution in PyPy3 (2.4.0) (judge verdict: Accepted)

N = int(input())

def factorization(n):
    arr = {}
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr[i] = cnt
            # arr.append([i, cnt])

    if temp != 1:
        arr[temp] = 1

    if arr == []:
        arr[n] = 1

    return arr

ans = {}
for i in range(1, N+1):
    arr = factorization(i)
    for key, value in arr.items():
        if key in ans:
            ans[key] += value
        else:
            ans[key] = value

count = 1
for v in ans.values():
    count *= v+1

print(count%(10**9+7))