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 JavaScript (node.js v5.12) (judge verdict: Accepted)

function Main(input) {
    var INT_MAX = 1000000007;
    input = input.split("\n");
    var line = input[0].split(" ");
    var max = parseInt(line[0]);
    var prime = [2];
    var flag = 0;
    for(var i = 2; i<1000; i++){
        for(var j = 0; j<prime.length; j++){
            if(i%prime[j]===0){
                flag=0;
                break;
            } else {
                flag++;
            }
        }
        if(flag>0){
            prime.push(i);
            flag=0;
        }
    }
    var yakusuu = Array(1000).fill(0);
    for(var i = 2; i<=max; i++){
        var test = i;
        for(var j = 0; j<prime.length; j++){
            while(1){
                if(test%prime[j]===0){
                    yakusuu[prime[j]]++;
                    test = test / prime[j];
                } else {
                    break;
                }
            }
        }
 
    }
    var ans = 1;
    for(var i = 0; i<yakusuu.length; i++){
        if(yakusuu[i] === 0){
            continue;
        } else {
            ans*= (yakusuu[i]+1);
            if(ans>INT_MAX){
                ans = ans % INT_MAX;
            }
        }
    }
    
    console.log(ans)
 
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));