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 C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;

public class Don
{
    public Don() { }
    private Reader r = new Reader();

    public void Solve()
    {
        var N = r.nextInt();

        var prime = new int[N + 1];

        // エラトステネスのふるい
        for(var i = 2; i <= N; i++)
        {
            prime[i] = 1;
        }

        for(var i = 2; i <= N; i++ )
        {
            if (prime[i] != 0)
            {
                for(var j = i * 2; j <= N; j += i)
                {
                    prime[j] = 0;
                }
            }
        }

        long ret = 1;
        for (var i = 2; i <= N; i++)
        {
            if (prime[i] != 0)
            {
                prime[i] = 0;
                for (var j = i; j <= N; j *= i)
                {
                    prime[i] += N / j;
                }
                ret %= 1000000007;
                ret *= prime[i] + 1;
            }
        }

        Console.WriteLine(ret);
    }

    public static void Main(string[] args)
    {
        new Don().Solve();
    }

}

class Reader
{
    string[] s;
    int i;
    char[] cs = new char[] { ' ' };

    public Reader()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length)
            return s[i++];
        var input = Console.ReadLine();
        while (input == "")
            input = Console.ReadLine();
        s = input.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return next();
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}