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 PHP7 (7.0.15) (judge verdict: Accepted)

<?php
//整数Nが与えられます。N!の正の約数の個数を10^9 + 7で割った余りを求めてください。
$n    = trim(fgets(STDIN));
$list = [];

// 6! = 2^1 3^1 2^2 5^1 2^1*3^1
// 6! = 2^4 3^2 5^1
for ($i = 2; $i <= $n; $i++) {
    $t = $i;
    for ($j = 2; $j * $j <= $i; $j++) {
        while ($t % $j === 0) {
            $list[$j] = isset($list[$j]) ? $list[$j] + 1 : 1;
            $t        = $t / $j;
        }
    }
    if ($t !== 1) {
        $list[$t] = isset($list[$t]) ? $list[$t] + 1 : 1;
    }
}
const MOD = 1000000007;
$res = 1;
foreach ($list as $value) {
    $res *= $value + 1;
    $res %= MOD;
}

print $res;